Torque3D Documentation / _generateds / ShapeBaseImageData

ShapeBaseImageData

Engine/source/T3D/shapeBase.h

More...

Classes:

State Data

Individual state data used to initialize struct array

const char *
stateName [MaxStates]
const char *
const char *
const char *
stateTransitionAmmo [MaxStates]
const char *
const char *
const char *
const char *
stateTransitionWet [MaxStates]
const char *
const char *
const char *
const char *
const char *
const char *
const char *
const char *
const char *
const char *
const char *
const char *
const char *
const char *
stateTimeoutValue [MaxStates]
bool
stateWaitForTimeout [MaxStates]
bool
stateFire [MaxStates]
bool
stateAlternateFire [MaxStates]
bool
stateReload [MaxStates]
bool
stateEjectShell [MaxStates]
stateEnergyDrain [MaxStates]
bool
bool
stateScaleAnimation [MaxStates]
bool
bool
bool
bool
stateDirection [MaxStates]
const char *
stateSequence [MaxStates]
bool
const char *
stateShapeSequence [MaxStates]
bool
bool
stateSound [MaxStates]
const char *
stateScript [MaxStates]
stateEmitterTime [MaxStates]
const char *
stateEmitterNode [MaxStates]

Lighting

Indicates the type of the light.

The duration in SimTime of Pulsing or WeaponFire type lights.

Extent of light.

Brightness of the light ( if it is WeaponFireLight ).

Shape Data

shape [MaxShapes]

Shape handle.

bool
shapeIsValid [MaxShapes]

Indicates that the shape has been loaded and is valid.

mCRC [MaxShapes]

Checksum of shape.

bool

Should the shape's CRC be checked?

mountTransform [MaxShapes]

Transformation to get to the mountNode.

Nodes

retractNode [MaxShapes]

Retraction node ID.

muzzleNode [MaxShapes]

Muzzle node ID.

ejectNode [MaxShapes]

Ejection node ID.

emitterNode [MaxShapes]

Emitter node ID.

eyeMountNode [MaxShapes]

eyeMount node ID.

eyeNode [MaxShapes]

Eye node ID.

Animation

spinSequence [MaxShapes]

ID of the spin animation sequence.

ambientSequence [MaxShapes]

ID of the ambient animation sequence.

bool
isAnimated [MaxShapes]

This image contains at least one animated states.

bool
hasFlash [MaxShapes]

This image contains at least one muzzle flash animation state.

The ID of the fire state.

The ID of the alternate fire state.

The ID of the reload state.

Shell casing data

Information about shell casings.

ID of casing datablock.

Vector along which to eject shells from the image.

Variance from this vector in degrees.

Velocity with which to eject shell casings.

State Array

State array is initialized onAdd from the individual state struct array elements.

state [MaxStates]

Array of states.

bool

Are the states loaded yet?

Infrastructure

Miscellaneous inherited methods.

bool

Called when the object is added to the sim.

bool
preload(bool server, String & errorStr)

Called to prepare the datablock for use, after it has been unpacked.

lookupState(const char * name)

Get a state by name.

Called after any property of the object is changed in the world editor.

Callbacks

DECLARE_CALLBACK(void , onMount , (SceneObject *obj, S32 slot, F32 dt) )
DECLARE_CALLBACK(void , onUnmount , (SceneObject *obj, S32 slot, F32 dt) )

Public Types

enum
Constants {
  MaxStates = 31
  MaxShapes = 2
  MaxGenericTriggers = 4
  StandardImageShape = 0
  FirstPersonImageShape = 1
  NumStateBits = 5
}
enum
LightType {
  NoLight = 0
  ConstantLight 
  SpotLight 
  PulsingLight 
  WeaponFireLight 
  NumLightTypes 
}

Private Types

Parent 

Public Attributes

bool

Should we automatically make image's aim converge with the crosshair?

bool

Indicates that all shapes should be animated in sync.

bool

Indicates that the image should be animated on the server.

bool

Is this image cloakable when mounted?

bool

Adjust 1st person firing vector to eye's LOS point?

bool

Adjust 3rd person firing vector to camera's LOS point?

bool

Environment mapping on?

Offset from eye for first person.

bool

Render the image when in first person?

Passed along to the mounting shape to modify animation sequences played in 3rd person.

Passed along to the mounting shape to modify animation sequences played in first person.

Mass!

Maximum number of sounds this image can play at a time.

Minimum energy for the weapon to be operable.

Mount point offset, so we know where the image is.

Mount point for the image.

Information about what projectile this image fires.

The amount of time to transition between the previous sequence and new sequence when the script prefix has changed.

Name of shape to render.

Name of shape to render in first person (optional).

bool

In first person, should we attach the camera to the image's eye node? Player still ultimately decides on what to do, especially for multiple mounted images.

bool

In first person, should we use the eyeTransform?

bool

Indicates the special first person shape should be used (true when shapeNameFP and useEyeOffset are defined)

bool

If true it we will allow multiple timeout transitions to occur within a single tick ( eg.

bool

Does this use energy instead of ammo?

Detailed Description

State Data

Individual state data used to initialize struct array

const char * fireStateName 
const char * stateName [MaxStates]
const char * stateTransitionLoaded [MaxStates]
const char * stateTransitionNotLoaded [MaxStates]
const char * stateTransitionAmmo [MaxStates]
const char * stateTransitionNoAmmo [MaxStates]
const char * stateTransitionTarget [MaxStates]
const char * stateTransitionNoTarget [MaxStates]
const char * stateTransitionWet [MaxStates]
const char * stateTransitionNotWet [MaxStates]
const char * stateTransitionMotion [MaxStates]
const char * stateTransitionNoMotion [MaxStates]
const char * stateTransitionTriggerUp [MaxStates]
const char * stateTransitionTriggerDown [MaxStates]
const char * stateTransitionAltTriggerUp [MaxStates]
const char * stateTransitionAltTriggerDown [MaxStates]
const char * stateTransitionGeneric0In [MaxStates]
const char * stateTransitionGeneric0Out [MaxStates]
const char * stateTransitionGeneric1In [MaxStates]
const char * stateTransitionGeneric1Out [MaxStates]
const char * stateTransitionGeneric2In [MaxStates]
const char * stateTransitionGeneric2Out [MaxStates]
const char * stateTransitionGeneric3In [MaxStates]
const char * stateTransitionGeneric3Out [MaxStates]
const char * stateTransitionTimeout [MaxStates]
F32 stateTimeoutValue [MaxStates]
bool stateWaitForTimeout [MaxStates]
bool stateFire [MaxStates]
bool stateAlternateFire [MaxStates]
bool stateReload [MaxStates]
bool stateEjectShell [MaxStates]
F32 stateEnergyDrain [MaxStates]
bool stateAllowImageChange [MaxStates]
bool stateScaleAnimation [MaxStates]
bool stateScaleAnimationFP [MaxStates]
bool stateSequenceTransitionIn [MaxStates]
bool stateSequenceTransitionOut [MaxStates]
bool stateSequenceNeverTransition [MaxStates]
F32 stateSequenceTransitionTime [MaxStates]
bool stateDirection [MaxStates]
StateData::LoadedState stateLoaded [MaxStates]
StateData::SpinState stateSpin [MaxStates]
StateData::RecoilState stateRecoil [MaxStates]
const char * stateSequence [MaxStates]
bool stateSequenceRandomFlash [MaxStates]
const char * stateShapeSequence [MaxStates]
bool stateScaleShapeSequence [MaxStates]
bool stateIgnoreLoadedForReady [MaxStates]
SFXTrack * stateSound [MaxStates]
const char * stateScript [MaxStates]
ParticleEmitterData * stateEmitter [MaxStates]
F32 stateEmitterTime [MaxStates]
const char * stateEmitterNode [MaxStates]

Camera Shake ( while firing )

bool shakeCamera 
VectorF camShakeFreq 
VectorF camShakeAmp 
F32 camShakeDuration 
F32 camShakeRadius 
F32 camShakeFalloff 

Lighting

S32 lightType 

Indicates the type of the light.

One of: ConstantLight, PulsingLight, WeaponFireLight.

LinearColorF lightColor 
S32 lightDuration 

The duration in SimTime of Pulsing or WeaponFire type lights.

F32 lightRadius 

Extent of light.

F32 lightBrightness 

Brightness of the light ( if it is WeaponFireLight ).

Shape Data

Resource< TSShape > shape [MaxShapes]

Shape handle.

bool shapeIsValid [MaxShapes]

Indicates that the shape has been loaded and is valid.

U32 mCRC [MaxShapes]

Checksum of shape.

       Calculated by the ResourceManager, see
       ResourceManager::load(). 

bool computeCRC 

Should the shape's CRC be checked?

MatrixF mountTransform [MaxShapes]

Transformation to get to the mountNode.

Nodes

S32 retractNode [MaxShapes]

Retraction node ID.

       When the player bumps against an object and the image is retracted to
       avoid having it interpenetrating the object, it is retracted towards
       this node. 

S32 muzzleNode [MaxShapes]

Muzzle node ID.

S32 ejectNode [MaxShapes]

Ejection node ID.

       The eject node is the node on the image from which shells are ejected. 

S32 emitterNode [MaxShapes]

Emitter node ID.

       The emitter node is the node from which particles are emitted. 

S32 eyeMountNode [MaxShapes]

eyeMount node ID.

Optionally used to mount an image to the player's eye node for first person.

S32 eyeNode [MaxShapes]

Eye node ID.

Optionally used to attach the camera to for camera motion control from the image.

Animation

S32 spinSequence [MaxShapes]

ID of the spin animation sequence.

S32 ambientSequence [MaxShapes]

ID of the ambient animation sequence.

bool isAnimated [MaxShapes]

This image contains at least one animated states.

bool hasFlash [MaxShapes]

This image contains at least one muzzle flash animation state.

S32 fireState 

The ID of the fire state.

S32 altFireState 

The ID of the alternate fire state.

S32 reloadState 

The ID of the reload state.

Shell casing data

DebrisData * casing 

Information about shell casings.

S32 casingID 

ID of casing datablock.

When the network tells the client about the casing, it it transmits the ID of the datablock. The datablocks having previously been transmitted, all the client needs to do is call Sim::findObject() and look up the the datablock.

Point3F shellExitDir 

Vector along which to eject shells from the image.

F32 shellExitVariance 

Variance from this vector in degrees.

F32 shellVelocity 

Velocity with which to eject shell casings.

State Array

State array is initialized onAdd from the individual state struct array elements.

StateData state [MaxStates]

Array of states.

bool statesLoaded 

Are the states loaded yet?

Infrastructure

Miscellaneous inherited methods.

DECLARE_CONOBJECT(ShapeBaseImageData )

ShapeBaseImageData()

~ShapeBaseImageData()

onAdd()

Reimplemented from: GameBaseData

preload(bool server, String & errorStr)

Reimplemented from: GameBaseData

lookupState(const char * name)

Get a state by name.

packData(BitStream * stream)

Reimplemented from: SimDataBlock

unpackData(BitStream * stream)

Reimplemented from: GameBaseData

inspectPostApply()

Reimplemented from: GameBaseData

initPersistFields()

Callbacks

DECLARE_CALLBACK(void , onMount , (SceneObject *obj, S32 slot, F32 dt) )

DECLARE_CALLBACK(void , onUnmount , (SceneObject *obj, S32 slot, F32 dt) )

Public Types

Constants

Enumerator

MaxStates = 31

We get one less than state bits because of the way data is packed.

MaxShapes = 2

The number of allowed shapes per image.

Only the first shape is required.

MaxGenericTriggers = 4

The number of generic triggers for the image.

StandardImageShape = 0

Shape index used for the standard image shape.

FirstPersonImageShape = 1

Shape index used for the optional first person image shape.

NumStateBits = 5
LightType

Enumerator

NoLight = 0
ConstantLight
SpotLight
PulsingLight
WeaponFireLight
NumLightTypes

Private Types

typedef GameBaseData Parent 

Public Attributes

bool accuFire 

Should we automatically make image's aim converge with the crosshair?

bool animateAllShapes 

Indicates that all shapes should be animated in sync.

bool animateOnServer 

Indicates that the image should be animated on the server.

In most cases you'll want this set if you're using useEyeNode. You may also want to set this if the muzzlePoint is animated while it shoots. You can set this to false even if these previous cases are true if the image's shape is set up in the correct position and orientation in the 'root' pose and none of the nodes are animated at key times, such as the muzzlePoint essentially remaining at the same position at the start of the fire state (it could animate just fine after the projectile is away as the muzzle vector is only calculated at the start of the state). You'll also want to set this to true if you're animating the camera using an image's 'eye' node – unless the movement is very subtle and doesn't need to be reflected on the server.

bool cloakable 

Is this image cloakable when mounted?

bool correctMuzzleVector 

Adjust 1st person firing vector to eye's LOS point?

bool correctMuzzleVectorTP 

Adjust 3rd person firing vector to camera's LOS point?

bool emap 

Environment mapping on?

MatrixF eyeOffset 

Offset from eye for first person.

bool firstPerson 

Render the image when in first person?

StringTableEntry imageAnimPrefix 

Passed along to the mounting shape to modify animation sequences played in 3rd person.

[optional]

StringTableEntry imageAnimPrefixFP 

Passed along to the mounting shape to modify animation sequences played in first person.

[optional]

F32 mass 

Mass!

S32 maxConcurrentSounds 

Maximum number of sounds this image can play at a time.

Any value <= 0 indicates that it can play an infinite number of sounds.

F32 minEnergy 

Minimum energy for the weapon to be operable.

MatrixF mountOffset 

Mount point offset, so we know where the image is.

U32 mountPoint 

Mount point for the image.

ProjectileData * projectile 

Information about what projectile this image fires.

F32 scriptAnimTransitionTime 

The amount of time to transition between the previous sequence and new sequence when the script prefix has changed.

StringTableEntry shapeName 

Name of shape to render.

StringTableEntry shapeNameFP 

Name of shape to render in first person (optional).

bool useEyeNode 

In first person, should we attach the camera to the image's eye node? Player still ultimately decides on what to do, especially for multiple mounted images.

bool useEyeOffset 

In first person, should we use the eyeTransform?

bool useFirstPersonShape 

Indicates the special first person shape should be used (true when shapeNameFP and useEyeOffset are defined)

bool useRemainderDT 

If true it we will allow multiple timeout transitions to occur within a single tick ( eg.

they have a very small timeout ).

bool usesEnergy 

Does this use energy instead of ammo?