AITurretShape

Engine/source/T3D/turret/aiTurretShape.h

More...

Classes:

Protected Types

enum
MaskBits {
  TurretStateMask = Parent::TurretUpdateMask
  NextFreeMask = Parent::NextFreeMask
}

Private Types

Parent 

Protected Functions

ObjectRenderInst delegate hooked up in prepBatchRender if GameBase::gShowBoundingBox is true.

_scriptCallback(const char * function)

Utility function to call state script functions on the datablock.

bool
_testTargetLineOfSight(Point3F & aimPoint, ShapeBase * target, Point3F & sightPoint)

Public Functions

Advances simulation time for animations.

bool
bool

Called when the object is added to the sim.

bool
onNewDataBlock(GameBaseData * dptr, bool reload)

Called when a new datablock is set.

Called when the object is removed from the sim.

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Instructs this object to pack its state for transfer over the network.

prepBatchRender(SceneRenderState * state, S32 mountedImageIndex)

Used from ShapeBase::_prepRenderImage() to submit render instances for the main shape or its mounted elements.

Processes a move event and updates object state once every 32 milliseconds.

setGunSlotFiring(S32 slot, bool fire)

Sets the Object -> World transform.

setTurretState(U32 newState, bool force)
setTurretStateName(const char * newState, bool force)

Instructs this object to read state data previously packed with packUpdate.

Public Static Functions

Detailed Description

Protected Types

MaskBits

Enumerator

TurretStateMask = Parent::TurretUpdateMask
NextFreeMask = Parent::NextFreeMask

Private Types

typedef TurretShape Parent 

Protected Attributes

AITurretShapeData * mDataBlock 
SimSet mIgnoreObjects 

Ignore these objects when targeting.

SimObjectList mPotentialTargets 
Box3F mScanBox 
F32 mScanDistance 
F32 mScanDistanceSquared 
bool mScanForTargets 
F32 mScanHeading 
F32 mScanPitch 
S32 mScanTickFrequency 
S32 mScanTickFrequencyVariance 
AITurretShapeData::StateData * mState 
bool mStateActive 

Is the turret active?

TSThread * mStateAnimThread 
F32 mStateDelayTime 

Time till next state.

TargetInfo mTarget 

Information on the current target.

S32 mTicksToNextScan 
bool mTrackTarget 
Box3F mTransformedScanBox 
F32 mWeaponLeadVelocitySquared 
F32 mWeaponRangeSquared 

Public Attributes

MatrixF mScanWorkspaceScanMat 
MatrixF mScanWorkspaceScanWorldMat 

Protected Functions

_cleanupPotentialTargets()

_cleanupTargetAndTurret()

_gainedTarget(ShapeBase * target)

_initState()

_lostTarget()

_performScan()

_renderScanner(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * overrideMat)

ObjectRenderInst delegate hooked up in prepBatchRender if GameBase::gShowBoundingBox is true.

_scriptCallback(const char * function)

Utility function to call state script functions on the datablock.

Parameters:

function

Function

_setScanBox()

_testTargetLineOfSight(Point3F & aimPoint, ShapeBase * target, Point3F & sightPoint)

_trackTarget(F32 dt)

_updateTurretState(F32 dt)