VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
humanWeaponStateActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
16 
17 class DtIntegerInputPort;
18 class DtStringOutputPort;
21 class DtVrfBalGunPSR;
22 
34 {
35 
36 public:
37 
41  DtLocalObject* owner,
42  DtSimulationServices* simManager,
43  DtComponentDescriptor* desc = 0,
44  DtReaderWriterRegistry* parentRegistry = 0);
45 
47  virtual ~DtHumanWeaponStateActuator() override;
48 
51  virtual const char* type() const override;
52 
57  virtual void tick() override;
58 
62  virtual void preFirstTickInit() override;
63 
67  static DtSimComponent * creator(const DtString& name,
68  DtLocalObject* owner,
69  DtSimulationServices* simManager,
70  DtComponentDescriptor* desc = 0,
71  DtReaderWriterRegistry* parentRegistry = 0);
72 
73 protected:
74 
76  virtual bool createPorts() override;
77 
81  virtual bool postureSuitableForFiring(DtLifeformState posture);
82 
83 
84 protected:
85 
88 
91  const DtHumanWeaponStateActuator& orig);
92 
95  const DtHumanWeaponStateActuator& orig);
96 
97 protected:
98 
101 
108 
115 
117 
119 
121 
128 
131  virtual void lookupAndCacheBalGunPSR();
132 
135 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtHumanWeaponStateActuatorDescriptor; a descriptor for the DtHumanWeaponStateActuator component...
Definition: humanWeaponStateActuatorDescriptor.h:19
DtIntegerInputPort * myLifeFormWeaponStatePort
Input Port Name: weapon-state Input Port Description: Lifeform posture state enumeration. Input Port Range: Input Port Default Value: Input Group Parent:
Definition: humanWeaponStateActuator.h:107
Instances of DtStringOutputPort are output ports through which data producers can send a DtString obj...
Definition: stringIOPort.h:52
DtVrfBalGunPSR * myBalGunPSR
Cached pointer to the sibling ballistic-gun PSR living in the same sysdef. Used to obtain our weaponI...
Definition: humanWeaponStateActuator.h:127
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
Description: This repository holds all information that is common to all the forms of humans within t...
Definition: humanStateRepository.h:33
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
Contains class declarations for DtIntegerInputPort, DtIntegerOutputPort, and DtIntegerPortData.
Definition: integerIOPort.h:25
End User Description: DtActuator is the base class for all actuator model components. Developer Description: The DtActuator base class caches a pointer to the entity's radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor's DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it's location, rotation and so forth. These are created in the entity's DtVrfObjectStateRepository createParts() function. This call creates all the attached parts for all the actuators. These articulated state repositories are managed by the DtAttachmentManager. They are cached by their partType which is the DIS Enumeration describing the part from the disEnums.h file and was specified in the actuator's DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtEntityType used to look up articulated parts in the DtAttachementManager. When an actuator needs access to a particular articulated part it looks it up by the part's object type.
Definition: actuatorComponent.h:47
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation frame...
DtHumanLocalObjectFacade myHumanLocalObjectFacade
Member to allow for access to platform specific data.
Definition: humanWeaponStateActuator.h:134
DtHumanWeaponStateActuator updates the weapon state for the an individual lifeform entity...
Definition: humanWeaponStateActuator.h:33
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
const DtHumanWeaponStateActuatorDescriptor * myWeaponStateDescriptor
Definition: humanWeaponStateActuator.h:120
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:97
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
DtHumanStateRepository * myHumanSR
Definition: humanWeaponStateActuator.h:118
DtStringOutputPort * myHandItemPort
Output Port Name: hand-item Output Port Description: Outputs the hand item to be used. Output Port Range: Output Port Default Value: Output Group Parent:
Definition: humanWeaponStateActuator.h:114
Class DtVrfBalGunPSR: Used to hold checkpointable state for the processes associated with ballistic g...
Definition: vrfBalGunPSR.h:36
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)