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
//=============================================================================
// 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
{
     Dampening=0.500000
     DampeningRange=(Min=-4.000000,Max=4.000000)
     MovementClamp=(Min=-50.000000,Max=50.000000)
     ForceClamp=(Min=-20.000000,Max=20.000000)
     ForceAttenuation=1.000000
     Tension=0.400000
     RestTension=0.400000
     CheckCollision=Wahr
     Noise=0.100000
     NoiseForce=(Min=-1.000000,Max=1.000000)
     NoiseTimer=(Min=2.000000,Max=3.000000)
     DrawType=DT_Particle
     bLightingVisibility=Falsch
     bNoDelete=Wahr
     Texture=Texture'Engine.S_Emitter'
     CollisionRadius=80.000000
     CollisionHeight=80.000000
     bCollideActors=Wahr
     bProjTarget=Wahr
     bUseCylinderCollision=Wahr
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fr 30.3.2007 08:43:36.000 - Creation time: Mo 16.4.2007 11:20:57.953 - Created with UnCodeX