20 #include <vl/hostStructs.h>
89 virtual const char*
type()
const;
100 virtual bool createPSR();
113 virtual void taskedTick(
DtTime & dT);
117 virtual bool intrinsicOverride();
123 double speed,DtWeaponState weapon,
DtString & demeanor);
130 virtual void setCurrentAnimation(
const DtDiGuyAnimation * animation,
bool overridePosture =
false);
134 virtual void sendSetPosture(DtLifeformState post);
137 static void setCharacteristicsCallback(
DtSimMessage * msg,
void * usr);
138 virtual void processSetCharacterCharacteristics(
DtSimMessage* msg);
141 static void setAppearanceCallback(
DtSimMessage * msg,
void * usr);
142 virtual void processSetCharacterAppearance(
DtSimMessage* msg);
145 static void setHandItemCallback(
DtSimMessage * msg,
void * usr);
146 virtual void processSetCharacterHandItem(
DtSimMessage* msg);
149 static void setHeadCallback(
DtSimMessage * msg,
void * usr);
150 virtual void processSetCharacterHead(
DtSimMessage* msg);
152 static void setRestoreCallback(
DtSimMessage * msg,
void * usrData);
156 static void setAdjustDemeanorCallback(
DtSimMessage * msg,
void * usrData);
157 virtual void processSetAdjustDemeanor(
DtSimMessage* msg);
159 static void animationTaskCallback(
DtSimMessage * msg,
void * usrData);
166 virtual void reset();
170 double speed,DtWeaponState weapon,
const DtString & demeanor);
181 bool isAnimationAvailable(
const std::string& animation)
const;
184 bool isAppearanceAvailable(
const std::string& appearance)
const;
187 bool isHandItemAvailable(
const std::string& item)
const;
191 bool isHeadAvailable(
const std::string& head)
const;
194 bool isGestureAvailable(
const std::string& gesture)
const;
215 virtual void registerRadioMessageCallbacks();
218 virtual void registerDiGuyTasks();
222 virtual void determineInitialHandItem();
224 virtual DtVector groundClamp(
double heading,
const DtVector& location)
const;
245 virtual bool createCollisionPort();
246 virtual bool createAimDirectionPort();
247 virtual bool createOrderedAnimationPort();
248 virtual bool createOrderedHandItemPort();
250 virtual DtString determineDemeanor( DtWeaponState weaponState,
254 virtual void determineDirection();
256 virtual DtString chooseRandomAppearance();
259 virtual void updatePosition(
const DtTime & dT,DtTaitBryan & localOrientation);
263 virtual void initializeAdjustedDemeanorMap();
270 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.
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:325
Definition: diGuyController.h:48
double myCurrentAnimationSpeed
Definition: diGuyController.h:287
Definition: diGuyControllerDescriptor.h:19
DtDiGuyControllerPSR * myProcessState
Container for state data associated with this component.
Definition: diGuyController.h:303
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
bool myNeedUpdate
Definition: diGuyController.h:354
const DtDiGuyAnimation * myDefaultAnimation
Definition: diGuyController.h:278
DtUpdateRepositoryOutputPortGroup * myUpdateRepositoryOutputPortGroup
Used to update repository with any movement data.
Definition: diGuyController.h:351
const DtDiGuyAnimation * myCurrentAnimation
Definition: diGuyController.h:284
Description: This repository holds all information that is common to all the forms of all objects wit...
Definition: vrfMovingObjectStateRepository.h:29
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:46
DtLifeformStaticPosture myDefaultAnimationPosture
Definition: diGuyController.h:279
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:295
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
const DtDiGuyControllerDescriptor * myDiGuyDescriptor
Definition: diGuyController.h:274
bool myTickWhileDead
Definition: diGuyController.h:353
Definition: readerWriterRegistry.h:39
virtual const char * type() const =0
Returns a string identifies the class type of component.
Definition: bindableLuaComponent.h:53
DtTime myTimeElapsed
Definition: diGuyController.h:294
DtTaitBryan myTaskedOrientation
Definition: diGuyController.h:282
double myTransitionTime
The remaining time for the current posture transition. Gets decremented in tick() ...
Definition: diGuyController.h:342
Definition: diGuyController.h:42
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:277
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:281
DtAnalogInputPort * myAimDirectionPort
Input Port Name: aim-direction Input Port Description: Specifies the heading in which the entity shou...
Definition: diGuyController.h:319
Definition: diGuyController.h:45
DtStringInputPort * myOrderedHandItemPort
Input Port Name: ordered-hand-item Input Port Description: Specifies a hand item to be used...
Definition: diGuyController.h:330
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:276
bool myTaskInterrupted
Definition: diGuyController.h:280
DtLifeformStaticPosture
These are the available static postures for lifeform (human) entities.
Definition: lifeformStaticPostures.h:22
std::map< DtString, unsigned int > DtDemeanorToRankMap
Definition: diGuyController.h:51
DtDiGuyDirectionType
Definition: diGuyController.h:40
File: simMsg.h.
Definition: simMessage.h:35
Contains the DtLifeformStaticPosture enumeration declaration.
virtual void tick()
This gives the thread of control to the component.
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:293
virtual bool createPorts()
Called by init.
Definition: diGuyController.h:44
virtual bool createPortGroups()
Called by init.
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
DtWeaponState myCurrentAnimationWeaponState
Definition: diGuyController.h:285
int myLastPosition
Definition: diGuyController.h:357
Definition: diGuyController.h:47
const DtTaskControllerComponent & operator=(const DtTaskControllerComponent &orig)
assignment operator
DtDemeanorToRankMap myDemeanorRankMap
Definition: diGuyController.h:359
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
Definition: diGuyControllerPSR.h:33
DtLifeformStaticPosture myCurrentAnimationPosture
Definition: diGuyController.h:286
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:103
DtBooleanOutputPort * myIsChangingPosturePort
Output Port Name: is-changing-posture Output Port Description: Indicated that the DI Guy character is...
Definition: diGuyController.h:336
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:345
DtUpdateRepositoryOutputPortGroup is a data port group of a data consumer that contains methods and p...
Definition: updateRepositoryOutputPortGroup.h:28
Controls appearances and animations for an entity that is represented by a DI-Guy 3D visual represent...
Definition: diGuyController.h:69
bool myAmTransitioningPosture
Local flag for we know we're changing posture.
Definition: diGuyController.h:339
bool myAmOrdered
Definition: diGuyController.h:355
double myDirectionOfMovement
This is an angle, in radians, relative to the current heading (a value of PI represents "backwards")...
Definition: diGuyController.h:299
Definition: diGuyController.h:43
DtBooleanInputPort * myCollisionPort
Input Port Name: collision Input Port Description: Checks to see if we're avoiding a collision...
Definition: diGuyController.h:311