Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
W3DTankDraw Class Reference

#include <W3DTankDraw.h>

Inherits W3DModelDraw.

Inherited by W3DOverlordTankDraw.

Classes

struct  TreadObjectInfo
 

Public Member Functions

 W3DTankDraw (Thing *thing, const ModuleData *moduleData)
 
virtual void setHidden (Bool h)
 
virtual void doDrawModule (const Matrix3D *transformMtx)
 
virtual void setFullyObscuredByShroud (Bool fullyObscured)
 
- Public Member Functions inherited from W3DModelDraw
 W3DModelDraw (Thing *thing, const ModuleData *moduleData)
 
virtual void preloadAssets (TimeOfDay timeOfDay)
 preloading assets
 
virtual void setShadowsEnabled (Bool enable)
 
virtual void releaseShadows (void)
 frees all shadow resources used by this module - used by Options screen.
 
virtual void allocateShadows (void)
 create shadow resources if not already present. Used by Options screen.
 
virtual void setTerrainDecal (TerrainDecalType type)
 
virtual Bool isVisible () const
 for limiting tree sway, etc to visible objects
 
virtual void reactToTransformChange (const Matrix3D *oldMtx, const Coord3D *oldPos, Real oldAngle)
 
virtual void reactToGeometryChange ()
 
virtual Bool clientOnly_getRenderObjInfo (Coord3D *pos, Real *boundingSphereRadius, Matrix3D *transform) const
 
virtual Bool clientOnly_getRenderObjBoundBox (OBBoxClass *boundbox) const
 
virtual Bool clientOnly_getRenderObjBoneTransform (const AsciiString &boneName, Matrix3D *set_tm) const
 
virtual Int getPristineBonePositionsForConditionState (const ModelConditionFlags &condition, const char *boneNamePrefix, Int startIndex, Coord3D *positions, Matrix3D *transforms, Int maxBones) const
 
virtual Int getCurrentBonePositions (const char *boneNamePrefix, Int startIndex, Coord3D *positions, Matrix3D *transforms, Int maxBones) const
 
virtual Bool getCurrentWorldspaceClientBonePositions (const char *boneName, Matrix3D &transform) const
 
virtual Bool getProjectileLaunchOffset (const ModelConditionFlags &condition, WeaponSlotType wslot, Int specificBarrelToUse, Matrix3D *launchPos, WhichTurretType tur, Coord3D *turretRotPos, Coord3D *turretPitchPos=NULL) const
 
virtual void updateProjectileClipStatus (UnsignedInt shotsRemaining, UnsignedInt maxShots, WeaponSlotType slot)
 This will do the show/hide work if ProjectileBoneFeedbackEnabled is set.
 
virtual void updateDrawModuleSupplyStatus (Int maxSupply, Int currentSupply)
 This will do visual feedback on Supplies carried.
 
virtual void notifyDrawModuleDependencyCleared ()
 if you were waiting for something before you drew, it's ready now
 
virtual void replaceModelConditionState (const ModelConditionFlags &c)
 
virtual void replaceIndicatorColor (Color color)
 
virtual Bool handleWeaponFireFX (WeaponSlotType wslot, Int specificBarrelToUse, const FXList *fxl, Real weaponSpeed, const Coord3D *victimPos, Real damageRadius)
 
virtual Int getBarrelCount (WeaponSlotType wslot) const
 
virtual void setSelectable (Bool selectable)
 
virtual void setAnimationLoopDuration (UnsignedInt numFrames)
 
virtual void setAnimationCompletionTime (UnsignedInt numFrames)
 
virtual void setPauseAnimation (Bool pauseAnim)
 
virtual void setAnimationFrame (int frame)
 
virtual void updateSubObjects ()
 
virtual void showSubObject (const AsciiString &name, Bool show)
 
virtual ObjectDrawInterfacegetObjectDrawInterface ()
 
virtual const ObjectDrawInterfacegetObjectDrawInterface () const
 
RenderObjClassgetRenderObject ()
 
virtual Bool updateBonesForClientParticleSystems (void)
 this will reposition particle systems on the fly ML
 
virtual void onDrawableBoundToObject ()
 
virtual void setTerrainDecalSize (Real x, Real y)
 
virtual void setTerrainDecalOpacity (Real o)
 
- Public Member Functions inherited from DrawModule
 DrawModule (Thing *thing, const ModuleData *moduleData)
 
virtual Bool isLaser () const
 
virtual DebrisDrawInterfacegetDebrisDrawInterface ()
 
virtual const DebrisDrawInterfacegetDebrisDrawInterface () const
 
virtual TracerDrawInterfacegetTracerDrawInterface ()
 
virtual const TracerDrawInterfacegetTracerDrawInterface () const
 
virtual RopeDrawInterfacegetRopeDrawInterface ()
 
virtual const RopeDrawInterfacegetRopeDrawInterface () const
 
virtual LaserDrawInterfacegetLaserDrawInterface ()
 
virtual const LaserDrawInterfacegetLaserDrawInterface () const
 
- Public Member Functions inherited from DrawableModule
 DrawableModule (Thing *thing, const ModuleData *moduleData)
 < this abstract class needs memory pool hooks
 
- Public Member Functions inherited from Module
 Module (const ModuleData *moduleData)
 < this abstract class needs memory pool hooks
 
virtual NameKeyType getModuleNameKey () const =0
 
NameKeyType getModuleTagNameKey () const
 
virtual void onObjectCreated ()
 
virtual void onDelete (void)
 
- Public Member Functions inherited from MemoryPoolObject
void deleteInstance ()
 
- Public Member Functions inherited from Snapshot
 Snapshot (void)
 
 ~Snapshot (void)
 

Protected Types

enum  TreadType { TREAD_LEFT , TREAD_RIGHT , TREAD_MIDDLE }
 
enum  { MAX_TREADS_PER_TANK =4 }
 

Protected Member Functions

virtual void onRenderObjRecreated (void)
 
void createEmitters (void)
 Create particle effects.
 
void tossEmitters (void)
 Create particle effects.
 
void startMoveDebris (void)
 start creating debris from the tank treads
 
void stopMoveDebris (void)
 stop creating debris from the tank treads
 
void updateTreadObjects (void)
 update pointers to sub-objects like treads.
 
void updateTreadPositions (Real uvDelta)
 update uv coordinates on each tread
 
- Protected Member Functions inherited from W3DModelDraw
const ModelConditionInfogetCurState () const
 
void setModelState (const ModelConditionInfo *newState)
 
const ModelConditionInfofindBestInfo (const ModelConditionFlags &c) const
 
void handleClientTurretPositioning ()
 
void handleClientRecoil ()
 
void recalcBonesForClientParticleSystems ()
 
void stopClientParticleSystems ()
 
void doHideShowSubObjs (const std::vector< ModelConditionInfo::HideShowSubObjInfo > *vec)
 
virtual void adjustTransformMtx (Matrix3D &mtx) const
 
Real getCurAnimDistanceCovered () const
 
Bool setCurAnimDurationInMsec (Real duration)
 
Bool getFullyObscuredByShroud () const
 
- Protected Member Functions inherited from DrawableModule
DrawablegetDrawable ()
 
const DrawablegetDrawable () const
 
virtual void crc (Xfer *xfer)
 
virtual void xfer (Xfer *xfer)
 
virtual void loadPostProcess (void)
 
- Protected Member Functions inherited from Module
const ModuleDatagetModuleData () const
 
- Protected Member Functions inherited from MemoryPoolObject
virtual ~MemoryPoolObject ()
 
void * operator new (size_t s)
 
void operator delete (void *p)
 
virtual MemoryPoolgetObjectMemoryPool ()=0
 

Protected Attributes

ParticleSystemm_treadDebrisLeft
 debris emitters for when tank is moving
 
ParticleSystemm_treadDebrisRight
 
RenderObjClassm_prevRenderObj
 
TreadObjectInfo m_treads [MAX_TREADS_PER_TANK]
 
Int m_treadCount
 
Coord3D m_lastDirection
 orientation of tank last time it was drawn.
 

Additional Inherited Members

- Static Public Member Functions inherited from DrawModule
static ModuleType getModuleType ()
 
static Int getInterfaceMask ()
 
- Static Public Member Functions inherited from Module
static ModuleDatafriend_newModuleData (INI *ini)
 

Detailed Description

Definition at line 60 of file W3DTankDraw.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
MAX_TREADS_PER_TANK 

Definition at line 87 of file W3DTankDraw.h.

◆ TreadType

enum W3DTankDraw::TreadType
protected
Enumerator
TREAD_LEFT 
TREAD_RIGHT 
TREAD_MIDDLE 

Definition at line 86 of file W3DTankDraw.h.

Constructor & Destructor Documentation

◆ W3DTankDraw()

W3DTankDraw::W3DTankDraw ( Thing * thing,
const ModuleData * moduleData )

Definition at line 92 of file W3DTankDraw.cpp.

Member Function Documentation

◆ createEmitters()

void W3DTankDraw::createEmitters ( void )
protected

Create particle effects.

Definition at line 130 of file W3DTankDraw.cpp.

◆ doDrawModule()

void W3DTankDraw::doDrawModule ( const Matrix3D * transformMtx)
virtual

Map behavior states into W3D animations.

Reimplemented from W3DModelDraw.

Reimplemented in W3DOverlordTankDraw.

Definition at line 308 of file W3DTankDraw.cpp.

◆ onRenderObjRecreated()

void W3DTankDraw::onRenderObjRecreated ( void )
protectedvirtual

Reimplemented from W3DModelDraw.

Definition at line 300 of file W3DTankDraw.cpp.

◆ setFullyObscuredByShroud()

void W3DTankDraw::setFullyObscuredByShroud ( Bool fullyObscured)
virtual

collect some stats about the rendering cost of this draw module recurse through sub-objs to collect stats about the rendering cost of this draw module

Reimplemented from W3DModelDraw.

Definition at line 211 of file W3DTankDraw.cpp.

◆ setHidden()

void W3DTankDraw::setHidden ( Bool h)
virtual

Reimplemented from W3DModelDraw.

Reimplemented in W3DOverlordTankDraw.

Definition at line 201 of file W3DTankDraw.cpp.

◆ startMoveDebris()

void W3DTankDraw::startMoveDebris ( void )
protected

start creating debris from the tank treads

Start creating debris from the tank treads

Definition at line 177 of file W3DTankDraw.cpp.

◆ stopMoveDebris()

void W3DTankDraw::stopMoveDebris ( void )
protected

stop creating debris from the tank treads

Stop creating debris from the tank treads

Definition at line 192 of file W3DTankDraw.cpp.

◆ tossEmitters()

void W3DTankDraw::tossEmitters ( void )
protected

Create particle effects.

Definition at line 112 of file W3DTankDraw.cpp.

◆ updateTreadObjects()

void W3DTankDraw::updateTreadObjects ( void )
protected

update pointers to sub-objects like treads.

Grab pointers to the sub-meshes for each tread

Definition at line 243 of file W3DTankDraw.cpp.

◆ updateTreadPositions()

void W3DTankDraw::updateTreadPositions ( Real uvDelta)
protected

update uv coordinates on each tread

Update uv coordinates on each tread object to simulate movement

Definition at line 222 of file W3DTankDraw.cpp.

Member Data Documentation

◆ m_lastDirection

Coord3D W3DTankDraw::m_lastDirection
protected

orientation of tank last time it was drawn.

Definition at line 98 of file W3DTankDraw.h.

◆ m_prevRenderObj

RenderObjClass* W3DTankDraw::m_prevRenderObj
protected

Definition at line 84 of file W3DTankDraw.h.

◆ m_treadCount

Int W3DTankDraw::m_treadCount
protected

Definition at line 97 of file W3DTankDraw.h.

◆ m_treadDebrisLeft

ParticleSystem* W3DTankDraw::m_treadDebrisLeft
protected

debris emitters for when tank is moving

Definition at line 81 of file W3DTankDraw.h.

◆ m_treadDebrisRight

ParticleSystem* W3DTankDraw::m_treadDebrisRight
protected

Definition at line 82 of file W3DTankDraw.h.

◆ m_treads

TreadObjectInfo W3DTankDraw::m_treads[MAX_TREADS_PER_TANK]
protected

Definition at line 96 of file W3DTankDraw.h.


The documentation for this class was generated from the following files: