torque Torque Game Engine Documentation
TGE Version 1.5.2

ShapeBaseImageData Struct Reference

#include <shapeBase.h>

Inheritance diagram for ShapeBaseImageData:

Inheritance graph
[legend]

Infrastructure

Miscellaneous inherited methods.

 DECLARE_CONOBJECT (ShapeBaseImageData)
 ShapeBaseImageData ()
 ~ShapeBaseImageData ()
bool onAdd ()
 Called when the object is added to the sim.
bool preload (bool server, char errorBuffer[256])
 Called to prepare the datablock for use, after it has been unpacked.
S32 lookupState (const char *name)
 Get a state by name.
virtual void packData (BitStream *stream)
virtual void unpackData (BitStream *stream)
static void initPersistFields ()
 Register dynamic fields in a subclass of ConsoleObject.

Public Types

enum  Constants {
  MaxStates = 31,
  NumStateBits = 5
}
enum  LightType {
  NoLight = 0,
  ConstantLight,
  PulsingLight,
  WeaponFireLight,
  NumLightTypes
}

Data Fields

bool emap
 Environment mapping on?
bool correctMuzzleVector
 Adjust firing vector to eye's LOS point?
bool firstPerson
 Render the image when in first person?
bool useEyeOffset
 In first person, should we use the eyeTransform?
StringTableEntry shapeName
 Name of shape to render.
U32 mountPoint
 Mount point for the image.
MatrixF mountOffset
 Mount point offset, so we know where the image is.
MatrixF eyeOffset
 Offset from eye for first person.
ProjectileDataprojectile
 Information about what projectile this image fires.
F32 mass
 Mass!
bool usesEnergy
 Does this use energy instead of ammo?
F32 minEnergy
 Minimum energy for the weapon to be operable.
bool accuFire
 Should we automatically make image's aim converge with the crosshair?
bool cloakable
 Is this image cloakable when mounted?
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 * stateTransitionTriggerUp [MaxStates]
const char * stateTransitionTriggerDown [MaxStates]
const char * stateTransitionTimeout [MaxStates]
F32 stateTimeoutValue [MaxStates]
bool stateWaitForTimeout [MaxStates]
bool stateFire [MaxStates]
bool stateEjectShell [MaxStates]
F32 stateEnergyDrain [MaxStates]
bool stateAllowImageChange [MaxStates]
bool stateScaleAnimation [MaxStates]
bool stateDirection [MaxStates]
StateData::LoadedState stateLoaded [MaxStates]
StateData::SpinState stateSpin [MaxStates]
StateData::RecoilState stateRecoil [MaxStates]
const char * stateSequence [MaxStates]
bool stateSequenceRandomFlash [MaxStates]
bool stateIgnoreLoadedForReady [MaxStates]
AudioProfilestateSound [MaxStates]
const char * stateScript [MaxStates]
ParticleEmitterDatastateEmitter [MaxStates]
F32 stateEmitterTime [MaxStates]
const char * stateEmitterNode [MaxStates]
Lighting
S32 lightType
 Indicates the type of the light.
ColorF lightColor
S32 lightTime
 Indicates the time when the light effect started.
F32 lightRadius
 Extent of light.
Shape Data
Resource< TSShapeshape
 Shape handle.
U32 mCRC
 Checksum of shape.
bool computeCRC
 Should the shape's CRC be checked?
MatrixF mountTransform
 Transformation to get to the mountNode.
Nodes
S32 retractNode
 Retraction node ID.
S32 muzzleNode
 Muzzle node ID.
S32 ejectNode
 Ejection node ID.
S32 emitterNode
 Emitter node ID.
Animation
S32 spinSequence
 ID of the spin animation sequence.
S32 ambientSequence
 ID of the ambient animation sequence.
bool isAnimated
 This image contains at least one animated states.
bool hasFlash
 This image contains at least one muzzle flash animation state.
S32 fireState
 The ID of the fire state.
Shell casing data
DebrisDatacasing
 Information about shell casings.
S32 casingID
 ID of casing 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?

Private Types

typedef GameBaseData Parent

Data Structures

struct  StateData

Member Typedef Documentation

Reimplemented from GameBaseData.


Member Enumeration Documentation

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

NumStateBits 

Enumerator:
NoLight 
ConstantLight 
PulsingLight 
WeaponFireLight 
NumLightTypes 


Constructor & Destructor Documentation

ShapeBaseImageData::ShapeBaseImageData (  ) 

ShapeBaseImageData::~ShapeBaseImageData (  ) 


Member Function Documentation

ShapeBaseImageData::DECLARE_CONOBJECT ( ShapeBaseImageData   ) 

bool ShapeBaseImageData::onAdd (  )  [virtual]

Called when the object is added to the sim.

Reimplemented from GameBaseData.

bool ShapeBaseImageData::preload ( bool  server,
char  errorBuffer[256] 
) [virtual]

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

Parameters:
server Set if we're running on the server (and therefore don't need to load things like textures or sounds).
errorBuffer If an error occurs in loading, this is set to a short string describing the error.
Returns:
True if all went well; false if something failed.
See also:
preload() and File Downloading

Reimplemented from GameBaseData.

S32 ShapeBaseImageData::lookupState ( const char *  name  ) 

Get a state by name.

static void ShapeBaseImageData::initPersistFields (  )  [static]

Register dynamic fields in a subclass of ConsoleObject.

See also:
addField(), addFieldV(), addDepricatedField(), addGroup(), endGroup()

Reimplemented from GameBaseData.

virtual void ShapeBaseImageData::packData ( BitStream stream  )  [virtual]

Reimplemented from SimDataBlock.

virtual void ShapeBaseImageData::unpackData ( BitStream stream  )  [virtual]

Reimplemented from GameBaseData.


Field Documentation

const char* ShapeBaseImageData::stateName[MaxStates]

const char* ShapeBaseImageData::stateSequence[MaxStates]

const char* ShapeBaseImageData::stateScript[MaxStates]

const char* ShapeBaseImageData::stateEmitterNode[MaxStates]

Environment mapping on?

Adjust firing vector to eye's LOS point?

Render the image when in first person?

In first person, should we use the eyeTransform?

Mount point for the image.

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

Offset from eye for first person.

Information about what projectile this image fires.

Does this use energy instead of ammo?

Minimum energy for the weapon to be operable.

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

Is this image cloakable when mounted?

Indicates the type of the light.

One of: ConstantLight, PulsingLight, WeaponFireLight.

Indicates the time when the light effect started.

Used by WeaponFireLight to produce a short-duration flash.

Checksum of shape.

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

Should the shape's CRC be checked?

Transformation to get to the mountNode.

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.

Ejection node ID.

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

Emitter node ID.

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

ID of the spin animation sequence.

ID of the ambient animation sequence.

This image contains at least one animated states.

This image contains at least one muzzle flash animation state.

The ID of the fire state.

Information about shell casings.

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.

Vector along which to eject shells from the image.

Variance from this vector in degrees.

Velocity with which to eject shell casings.

Array of states.

Are the states loaded yet?




All Rights Reserved GarageGames.com, Inc. 1999-2005
Auto-magically Generated with Doxygen