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();
124 double speed,DtWeaponState weapon,
DtString & demeanor);
131 virtual void setCurrentAnimation(
const DtDiGuyAnimation * animation,
bool overridePosture =
false);
135 virtual void sendSetPosture(DtLifeformState post);
138 static void setCharacteristicsCallback(
DtSimMessage* msg,
void* usr );
139 virtual void processSetCharacterCharacteristics(
DtSimMessage* msg );
142 static void setAppearanceCallback(
DtSimMessage* msg,
void* usr );
143 virtual void processSetCharacterAppearance(
DtSimMessage* msg );
146 static void setHandItemCallback(
DtSimMessage* msg,
void* usr );
147 virtual void processSetCharacterHandItem(
DtSimMessage* msg );
150 static void setHeadCallback(
DtSimMessage* msg,
void* usr );
151 virtual void processSetCharacterHead(
DtSimMessage* msg );
154 static void setUnitPatchesCallback(
DtSimMessage* msg,
void* usr );
155 virtual void processSetUnitPatches(
DtSimMessage* msg );
158 static void setRankPatchCallback(
DtSimMessage* msg,
void* usr );
162 static void setNametagCallback(
DtSimMessage* msg,
void* usr );
165 static void setRestoreCallback(
DtSimMessage* msg,
void* usrData );
169 static void setAdjustDemeanorCallback(
DtSimMessage * msg,
void * usrData);
170 virtual void processSetAdjustDemeanor(
DtSimMessage* msg);
172 static void animationTaskCallback(
DtSimMessage * msg,
void * usrData);
179 virtual void reset();
183 DtWeaponState weaponState,
const DtString& demeanor )
const;
187 double speed, DtWeaponState weaponState,
const DtString& demeanor,
bool debug =
true )
const;
191 double speed, DtWeaponState weapon,
const DtString& demeanor );
202 bool isAnimationAvailable(
const std::string& animation)
const;
205 bool isAppearanceAvailable(
const std::string& appearance)
const;
208 bool isHandItemAvailable(
const std::string& item)
const;
212 bool isHeadAvailable(
const std::string& head)
const;
215 bool isGestureAvailable(
const std::string& gesture)
const;
233 virtual void registerRadioMessageCallbacks();
236 virtual void registerDiGuyTasks();
240 virtual void determineInitialHandItem();
242 virtual DtVector groundClamp(
double heading,
const DtVector& location)
const;
263 virtual bool createCollisionPort();
264 virtual bool createAimDirectionPort();
265 virtual bool createOrderedAnimationPort();
266 virtual bool createOrderedHandItemPort();
267 virtual bool createEtaToDestinationInputPort();
268 virtual bool createChangingPosturePort();
269 virtual bool createNegateSpeedPort();
273 void checkAndSetDefaultPatches();
275 virtual DtString determineDemeanor( DtWeaponState weaponState,
279 virtual void determineDirection();
281 virtual DtString chooseRandomAppearance();
284 virtual void updatePosition(
const DtTime & dT,DtTaitBryan & localOrientation);
288 virtual void initializeAdjustedDemeanorMap();
295 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:356
Definition: diGuyController.h:49
double myCurrentAnimationSpeed
Definition: diGuyController.h:313
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:317
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:334
bool myNeedUpdate
Definition: diGuyController.h:398
const DtDiGuyAnimation * myDefaultAnimation
Definition: diGuyController.h:303
DtUpdateRepositoryOutputPortGroup * myUpdateRepositoryOutputPortGroup
Used to update repository with any movement data. As long as this controller has control of this port...
Definition: diGuyController.h:395
const DtDiGuyAnimation * myCurrentAnimation
Definition: diGuyController.h:309
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:367
DtRwNLengthStringVector is a named, readable/writable vector of strings of arbitrary length...
Definition: rwNLengthStringVector.h:28
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
Definition: diGuyController.h:47
DtLifeformStaticPosture myDefaultAnimationPosture
Definition: diGuyController.h:304
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:20
virtual void bindLuaFunctions(lua_State *)=0
Override to bind lua functions.
bool myAmRotating
Definition: diGuyController.h:325
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:299
bool myTickWhileDead
Definition: diGuyController.h:397
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
Definition: bindableLuaComponent.h:53
DtTime myTimeElapsed
Definition: diGuyController.h:324
DtTaitBryan myTaskedOrientation
Definition: diGuyController.h:307
double myTransitionTime
The remaining time for the current posture transition. Gets decremented in tick() ...
Definition: diGuyController.h:387
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...
virtual void clearTask()
If component is currently tasked, calls clearPendingSubtasks(), sets the tasked flag to false...
DtVrfMovingObjectStateRepository * myLocalState
Definition: diGuyController.h:302
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:306
DtAnalogInputPort * myAimDirectionPort
Input Port Name: aim-direction Input Port Description: Specifies the heading in which the entity shou...
Definition: diGuyController.h:350
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:361
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:301
bool myTaskInterrupted
Definition: diGuyController.h:305
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:381
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:311
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:323
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:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
DtWeaponState myCurrentAnimationWeaponState
Definition: diGuyController.h:310
int myLastPosition
Definition: diGuyController.h:401
Definition: diGuyController.h:48
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtDemeanorToRankMap myDemeanorRankMap
Definition: diGuyController.h:403
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
Definition: diGuyControllerPSR.h:33
DtLifeformStaticPosture myCurrentAnimationPosture
Definition: diGuyController.h:312
DtBooleanOutputPort * myIsChangingPosturePort
Output Port Name: is-changing-posture Output Port Description: Indicates that the DI Guy character is...
Definition: diGuyController.h:373
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:390
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:384
bool myAmOrdered
Definition: diGuyController.h:399
double myDirectionOfMovement
This is an angle, in radians, relative to the current heading (a value of PI represents "backwards")...
Definition: diGuyController.h:330
Definition: diGuyController.h:44
DtHumanLocalObjectFacade myHumanLocalObjectFacade
Member to allow for access to human specific data.
Definition: diGuyController.h:406
DtBooleanInputPort * myCollisionPort
Input Port Name: collision Input Port Description: Checks to see if we're avoiding a collision...
Definition: diGuyController.h:342
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