21 #include <vl/hostStructs.h>
90 virtual const char*
type()
const;
101 virtual bool createPSR();
114 virtual void taskedTick(
DtTime& dT );
118 virtual bool intrinsicOverride();
129 virtual void sendSetPosture( DtLifeformState post );
132 static void setCharacteristicsCallback(
DtSimMessage* msg,
void* usr );
133 virtual void processSetCharacterCharacteristics(
DtSimMessage* msg );
136 static void setAppearanceCallback(
DtSimMessage* msg,
void* usr );
137 virtual void processSetCharacterAppearance(
DtSimMessage* msg );
140 static void setHandItemCallback(
DtSimMessage* msg,
void* usr );
141 virtual void processSetCharacterHandItem(
DtSimMessage* msg );
144 static void setHeadCallback(
DtSimMessage* msg,
void* usr );
145 virtual void processSetCharacterHead(
DtSimMessage* msg );
148 static void setUnitPatchesCallback(
DtSimMessage* msg,
void* usr );
149 virtual void processSetUnitPatches(
DtSimMessage* msg );
152 static void setRankPatchCallback(
DtSimMessage* msg,
void* usr );
156 static void setNametagCallback(
DtSimMessage* msg,
void* usr );
159 static void setRestoreCallback(
DtSimMessage* msg,
void* usrData );
163 static void setAdjustDemeanorCallback(
DtSimMessage* msg,
void* usrData );
164 virtual void processSetAdjustDemeanor(
DtSimMessage* msg );
166 static void animationTaskCallback(
DtSimMessage* msg,
void* usrData );
173 virtual void reset();
188 virtual bool intrinsicTick( DtWeaponState weaponState, DtDamageState damageState,
192 virtual double lookupTimeToStop( DtWeaponState weaponState, DtDamageState damageState,
196 virtual const DtDiGuyAnimation* chooseAnimation( DtWeaponState weaponState, DtDamageState damageState,
200 virtual void updateAnimationState( DtWeaponState weapon, DtDamageState damageState,
214 bool isAnimationAvailable(
const std::string& animation )
const;
217 bool isAppearanceAvailable(
const std::string& appearance )
const;
220 bool isHandItemAvailable(
const std::string& item )
const;
224 bool isHeadAvailable(
const std::string& head )
const;
227 bool isGestureAvailable(
const std::string& gesture )
const;
245 virtual void registerRadioMessageCallbacks();
248 virtual void registerDiGuyTasks();
252 virtual void determineInitialHandItem();
254 virtual DtVector groundClamp(
double heading,
const DtVector& location )
const;
275 virtual bool createCollisionPort();
276 virtual bool createAimDirectionPort();
277 virtual bool createOrderedAnimationPort();
278 virtual bool createOrderedHandItemPort();
279 virtual bool createEtaToDestinationInputPort();
280 virtual bool createChangingPosturePort();
281 virtual bool createNegateSpeedPort();
285 void checkAndSetDefaultPatches();
288 virtual void updateDemeanorAndPosture( DtWeaponState weaponState, DtDamageState damageState,
292 virtual void determineDirection();
294 virtual DtString chooseRandomAppearance();
297 virtual void updatePosition(
const DtTime & dT,DtTaitBryan & localOrientation);
301 virtual void initializeAdjustedDemeanorMap();
308 virtual double diGuyHeading()
const;
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
Stores data representing all the possible appearances, animations, hand items, heads, etc. that are available to a particular character type. It is used by the sim engine at runtime. Populated from both DI-Guy instance and character_animations_table.mtl file.
Definition: diGuyCharacterData.h:63
DtStringInputPort * myOrderedAnimationPort
Input Port Name: ordered-animation Input Port Description: Specifies an animation to be used as long ...
Definition: diGuyController.h:369
Definition: diGuyController.h:49
double myCurrentAnimationSpeed
Definition: diGuyController.h:326
std::pair< DtString, double > myLastTimeToStop
Cached time required to stop from current action. Lookup method is const, but we want to be able to c...
Definition: diGuyController.h:330
Definition: diGuyControllerDescriptor.h:19
DtDiGuyControllerPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: diGuyController.h:347
bool myNeedUpdate
Definition: diGuyController.h:411
const DtDiGuyAnimation * myDefaultAnimation
Definition: diGuyController.h:316
DtUpdateRepositoryOutputPortGroup * myUpdateRepositoryOutputPortGroup
Used to update repository with any movement data. As long as this controller has control of this port...
Definition: diGuyController.h:408
const DtDiGuyAnimation * myCurrentAnimation
Definition: diGuyController.h:322
Description: This repository holds all information that is common to all the forms of all objects wit...
Definition: vrfMovingObjectStateRepository.h:31
DtAnalogInputPort * myEtaToDestinationInputPort
Input Port Name: eta-to-last-vertex Input Port Description: Specifies the eta to reach the last verte...
Definition: diGuyController.h:380
DtRwNLengthStringVector is a named, readable/writable vector of strings of arbitrary length...
Definition: rwNLengthStringVector.h:28
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
Definition: diGuyController.h:47
bool myForceAnimationUpdate
Definition: diGuyController.h:421
DtLifeformStaticPosture myDefaultAnimationPosture
Definition: diGuyController.h:317
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
virtual void bindLuaFunctions(lua_State *)=0
Override to bind lua functions.
bool myAmRotating
Definition: diGuyController.h:338
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
const DtDiGuyControllerDescriptor * myDiGuyDescriptor
Definition: diGuyController.h:312
bool myTickWhileDead
Definition: diGuyController.h:410
Definition: readerWriterRegistry.h:39
Definition: bindableLuaComponent.h:53
DtTime myTimeElapsed
Definition: diGuyController.h:337
DtTaitBryan myTaskedOrientation
Definition: diGuyController.h:320
double myTransitionTime
The remaining time for the current posture transition. Gets decremented in tick() ...
Definition: diGuyController.h:400
Definition: diGuyController.h:43
virtual void taskComplete(bool success=true)
If we are currently tasked, this will cause us to notify the entity that we're done and delete the ta...
DtVrfMovingObjectStateRepository * myLocalState
Definition: diGuyController.h:315
virtual void reset()
For those reader/writer items that support it, resets the reader/writer value to original state Defau...
const DtDiGuyAnimation * myTaskedAnimation
Definition: diGuyController.h:319
DtAnalogInputPort * myAimDirectionPort
Input Port Name: aim-direction Input Port Description: Specifies the heading in which the entity shou...
Definition: diGuyController.h:363
Definition: diGuyController.h:46
DtStringInputPort * myOrderedHandItemPort
Input Port Name: ordered-hand-item Input Port Description: Specifies a hand item to be used...
Definition: diGuyController.h:374
Instances of DtAnalogOutputPort are input ports through which data producers can send real numbers...
Definition: analogIOPort.h:45
The DtDiGuyAnimation class is a class that stores the DI-Guy animation information that is used to en...
Definition: diGuyAnimation.h:29
const DtDiGuyCharacterData * myCharacterData
Definition: diGuyController.h:314
bool myTaskInterrupted
Definition: diGuyController.h:318
DtLifeformStaticPosture
These are the available static postures for lifeform (human) entities. Static postures are equivalent...
Definition: lifeformStaticPostures.h:22
DtBooleanInputPort * myNegateSpeedPort
Input Port Name: is-action-speed-negated Input Port Description: Indicates that the speed used for ac...
Definition: diGuyController.h:394
std::map< DtString, unsigned int > DtDemeanorToRankMap
Definition: diGuyController.h:52
DtDiGuyDirectionType
Definition: diGuyController.h:41
File: simMsg.h.
Definition: simMessage.h:35
Contains the DtLifeformStaticPosture enumeration declaration.
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtDamageState myCurrentDamageState
Definition: diGuyController.h:324
virtual bool tickWhileDestroyed() const
If the component returns true here, it will be ticked regardless of the destroyed state of the host e...
double myAnimationDuration
These values are stored in the PSR Do we want this animation to be performed only once...
Definition: diGuyController.h:336
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
Definition: diGuyController.h:45
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
DtWeaponState myCurrentAnimationWeaponState
Definition: diGuyController.h:323
int myLastPosition
Definition: diGuyController.h:414
Definition: diGuyController.h:48
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtDemeanorToRankMap myDemeanorRankMap
Definition: diGuyController.h:416
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
virtual void clearTask() override
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
Definition: diGuyControllerPSR.h:33
DtLifeformStaticPosture myCurrentAnimationPosture
Definition: diGuyController.h:325
DtBooleanOutputPort * myIsChangingPosturePort
Output Port Name: is-changing-posture Output Port Description: Indicates that the DI Guy character is...
Definition: diGuyController.h:386
virtual void bindLuaGlobals(lua_State *)=0
Override to bind lua globals.
double myCurrentHeading
The last heading for the entity. Will be used when setting animation for rotating on the spot...
Definition: diGuyController.h:403
DtUpdateRepositoryOutputPortGroup is a data port group of a data consumer that contains methods and p...
Definition: updateRepositoryOutputPortGroup.h:31
Controls appearances and animations for an entity that is represented by a DI-Guy 3D visual represent...
Definition: diGuyController.h:70
bool myAmTransitioningPosture
Local flag for we know we're changing posture.
Definition: diGuyController.h:397
bool myAmOrdered
Definition: diGuyController.h:412
double myDirectionOfMovement
This is an angle, in radians, relative to the current heading (a value of PI represents "backwards")...
Definition: diGuyController.h:343
Definition: diGuyController.h:44
DtHumanLocalObjectFacade myHumanLocalObjectFacade
Member to allow for access to human specific data.
Definition: diGuyController.h:419
DtBooleanInputPort * myCollisionPort
Input Port Name: collision Input Port Description: Checks to see if we're avoiding a collision...
Definition: diGuyController.h:355
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86