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() override;
42 
45  virtual const char* type() const override;
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() override;
61 
63  virtual bool createPorts() override;
64 
69  virtual bool aimGun() override;
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
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
virtual const char * type() const override
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual bool createPorts() override
Overridden to create local ports.
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...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
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 void tick() override
Update the gun elevation. If elevation is correct and the trigger port says fire, then fire...
DtHumanLocalObjectFacade myHumanLocalObjectFacade
Member to allow for access to platform specific data.
Definition: humanGunActuator.h:98
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)