VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
humanGunActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 #pragma once
11 
12 #include "vrfmodel/ballisticGun.h"
14 
16 class DtAnalogInputPort;
17 
27 {
28 
29 public:
30 
33  DtHumanGunActuator(const DtString& name,
34  DtLocalObject* owner,
35  DtSimulationServices* simManager,
36  DtComponentDescriptor* desc = 0,
37  DtReaderWriterRegistry* parentRegistry = 0);
38 
39 
41  virtual ~DtHumanGunActuator();
42 
45  virtual const char* type() const;
46 
47 public:
48 
52  static DtSimComponent * creator(const DtString& name,
53  DtLocalObject* owner,
54  DtSimulationServices* simManager,
55  DtComponentDescriptor* desc = 0,
56  DtReaderWriterRegistry* parentRegistry = 0);
57 
58 protected:
60  virtual void tick();
61 
63  virtual bool createPorts();
64 
69  virtual bool aimGun();
70 
71 protected:
72 
75 
78 
80  const DtHumanGunActuator & operator=(const DtHumanGunActuator & orig);
81 
82 protected:
83 
85 
88 
94 
96 
99 };
100 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtBallisticGun provides a simple model of a ballistic gun.
Definition: ballisticGun.h:43
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
virtual const char * type() const
Returns a string identifies the class type of component. Type values are defined in compTypes...
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
const DtBallisticGun & operator=(const DtBallisticGun &orig)
assignment operator; not implemented
DtHumanGunActuatorDescriptor * myHumanGunDescriptor
Definition: humanGunActuator.h:84
DtHumanGunActuator provides a simple model of a hand held gun.
Definition: humanGunActuator.h:26
virtual bool aimGun()
Aims the gun based on input ports. Uses the myAimElevationInputPort to determine the correct elevatio...
virtual void tick()
Update the gun elevation. If elevation is correct and the trigger port says fire, then fire...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
Contains class declarations for DtAnalogInputPort, DtAnalogOutputPort, and DtAnalogPortData.
Definition: analogIOPort.h:25
DtHumanGunActuatorDescriptor; a descriptor for the DtHumanGunActuator component.
Definition: humanGunActuatorDescriptor.h:19
DtAnalogInputPort * myAimAzimuthInputPort
Input Port Name: aim-azimuth Input Port Description: Azimuth at which to aim, in radians. Input Port Range: -pi to pi Input Port Default Value: 0 .
Definition: humanGunActuator.h:93
virtual bool createPorts()
Overridden to create local ports.
DtHumanLocalObjectFacade myHumanLocalObjectFacade
Member to allow for access to platform specific data.
Definition: humanGunActuator.h:98
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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)