VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ballisticGunJoy.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
14 #include "vrfmodel/ballisticGun.h"
15 #include <vl/fireInteraction.h>
16 #include <vl/detonationInteraction.h>
17 #include "vrfcore/timer.h"
18 #include <vl/hostStructs.h>
19 
20 class DtSimManager;
22 class DtBooleanInputPort;
24 class DtVrfObject;
25 
32 {
33 public:
34 
37  DtBallisticGunJoy(const DtString & name, DtVrfObject* owner,
38  DtSimManager *simManager, DtComponentDescriptor* desc,
39  DtReaderWriterRegistry * const parentRegistry = 0);
40 
41 public:
43  virtual ~DtBallisticGunJoy();
44 
47  virtual const char* type() const;
48 
50  virtual bool createPorts();
51 
54  virtual void setComponentDescriptor(DtComponentDescriptor * descriptor);
55 
58  virtual void tick();
59 
64  virtual DtReal setTarget(DtArticulatedPartStateRepository *rotBody);
65 
70  virtual DtFireInteraction* manualFireInteraction(
72 
73  virtual DtDetonationInteraction* manualDetonationInteraction(
74  DtArticulatedPartStateRepository* rotBody, DtReal& detTime, DtReal dist);
75 
82  virtual const DtVrfObject* targetSelection(
83  DtArticulatedPartStateRepository* rotBody, DtReal& dist);
84 
85  virtual DtReal distanceToTarget();
86 
94  static void detonationCallback(DtTimer * timer);
95 
99  static DtSimComponent * creator(const DtString& name,
100  DtVrfObject* owner,
101  DtSimManager* simManager,
102  DtComponentDescriptor* desc = 0,
103  DtReaderWriterRegistry* parentRegistry = 0);
104 
105 private:
109 
111  DtBallisticGunJoy(const DtBallisticGunJoy & orig);
112 
114  const DtBallisticGunJoy & operator=(const DtBallisticGunJoy & orig);
115 
116 protected:
117 
120 
127 
134 
136 
140 };
141 
DtBallisticGunJoy extends the DtBallisticGun actuator class with the ability to be controlled from a ...
Definition: ballisticGunJoy.h:31
DtBooleanInputPort * myActiveJoystickPort
Input Port Name: joystick-active Input Port Description: Input Port Range: Input Port Default Value...
Definition: ballisticGunJoy.h:133
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
Instances of DtTimer are used to maintain the information needed to represent some kind of scheduled ...
Definition: timer.h:45
DtBallisticGun provides a simple model of a ballistic gun.
Definition: ballisticGun.h:44
Contains class declarations for DtConstrainedAnalogInputPort and DtConstrainedAnalogOutputPort.
Definition: constrainedAnalogIOPort.h:27
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
Definition: readerWriterRegistry.h:39
DtConstrainedAnalogInputPort * myElevationPort
Input Port Name: elevation Input Port Description: Input Port Range: -1.
Definition: ballisticGunJoy.h:126
virtual const char * type() const
Returns a string identifies the class type of component.
DtBallisticGunDescriptor; a descriptor for the DtBallisticGun component.
Definition: ballisticGunDescriptor.h:36
const DtBallisticGun & operator=(const DtBallisticGun &orig)
assignment operator; not implemented
virtual void setComponentDescriptor(DtComponentDescriptor *componentDescriptor)
The component descriptor specified in the order of battle file or parameter file that was used to cre...
static DtSimComponent * creator(const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Contains class declarations for DtBooleanInputPort, DtBooleanOutputPort, and DtBooleanPortData.
Definition: boolIOPort.h:25
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:29
DtDetonationPdu DtDetonationInteraction
Definition: DistributedSimulationDriver3A.h:14
virtual void tick()
Update the gun elevation.
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
bool myReportedNoArticulation
A flag to remember whether a warning message was printed about not finding an articulated part...
Definition: ballisticGunJoy.h:139
static void detonationCallback(DtTimer *timer)
Casts the user data portion of the DtTimer passed to it to a DtDetonationTimerData object...
virtual bool createPorts()
Overridden to create local ports.

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)