Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

Engine.xProcMesh


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
//=============================================================================
// xProcMesh - Procedural mesh actor
// Copyright 2001 Digital Extremes - All Rights Reserved.
// Confidential.
//=============================================================================
class xProcMesh extends Actor
	placeable
    exportstructs
	native;

struct ProcMeshVertex // struct reordering breaks this
{
	var Vector	Position;
	var Vector  Normal;
	var Color   Color;
	var float   U,V;
};

var const array<ProcMeshVertex>	Vertices;
var const array<int> SectionOffsets;

var() float	Dampening; // should be less than < 1.0f
var() Range DampeningRange;
var() Range MovementClamp;
var() Range ForceClamp;
var() float ForceAttenuation;
var() float Tension;
var() float RestTension;
var() bool  CheckCollision;
var() float Noise;
var() Range NoiseForce;
var() Range NoiseTimer;
var transient float NoiseCounter;
var() enum EProcMeshType
{
	MT_Water,
	MT_Deform,
} ProcType;
var(Force) bool bForceAffected;
var() bool  bRigidEdges;

var const transient pointer pProcData; // todo: take this out and serialize most things

var() class<Effects>    HitEffect;
var() class<Effects>    BigHitEffect;
var() float             BigMomentumThreshold;
var() float             BigTouchThreshold;
var() float             ShootStrength;
var() float             TouchStrength;
var() float             InfluenceRadius;


// support fluid funcs
// Ripple water at a particlar location.
// Ignores 'z' componenet of position.
native final function ProcPling(vector Position, float Strength, float Radius, out vector EffectLocation, out vector EffectNormal);

// Default behaviour when shot is to apply an impulse and kick the KActor.
simulated function TakeDamage(int Damage, Pawn instigatedBy, Vector hitlocation, 
						Vector momentum, class<DamageType> damageType)
{
    local vector EffectNormal;
    local vector EffectLocation;

	ProcPling(hitLocation, ShootStrength, 0, EffectLocation, EffectNormal);
	if(VSize(Momentum) > BigMomentumThreshold && BigHitEffect != None )
		spawn(BigHitEffect, self, , EffectLocation, rotator(EffectNormal));
	else if ( HitEffect != None )
		spawn(HitEffect, self, , EffectLocation,rotator(EffectNormal));
}

simulated function Touch(Actor Other)
{
	local vector touchLocation;
    local vector EffectNormal;
    local vector EffectLocation;
    local float touchValue;

	Super.Touch(Other);

	if ( (Other == None) || !Other.bDisturbFluidSurface )
		return;
		
	touchLocation = Other.Location;

    touchValue = VSize(Velocity);

	ProcPling(touchLocation, TouchStrength, Other.CollisionRadius, EffectLocation, EffectNormal);

	if(touchValue > BigTouchThreshold && BigHitEffect != None )
		spawn(BigHitEffect, self, , EffectLocation, rotator(EffectNormal));
	else if ( HitEffect != None )
		spawn(HitEffect, self, , EffectLocation,rotator(EffectNormal));
}

defaultproperties
{
    DrawType=DT_Particle
	Texture=S_Emitter
    Dampening=0.5
    DampeningRange=(Min=-4.0,Max=4.0)
    MovementClamp=(Min=-50.0,Max=50.0)
    ForceClamp=(Min=-20.0,Max=20.0)   
    Tension=0.4
    RestTension=0.4
    CheckCollision=true
    Noise=0.1
    NoiseForce=(Min=-1.0,Max=1.0)
    NoiseTimer=(Min=2.0,Max=3.0)
	ProcType=MT_Water
    bNoDelete=true
    bStatic=false
    bRigidEdges=false
    ForceAttenuation=1.0
    InfluenceRadius=0.0

    bStaticLighting=False	
	bCollideActors=True
	bCollideWorld=False
    bProjTarget=True
	bBlockActors=False
	bBlockNonZeroExtentTraces=True
	bBlockZeroExtentTraces=True
	bWorldGeometry=False
    bUseCylinderCollision=true
    CollisionHeight=80.0
    CollisionRadius=80.0

    bLightingVisibility=false
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Di 5.9.2006 22:28:42.000 - Creation time: Do 14.8.2014 09:58:56.348 - Created with UnCodeX