VR-Forces Developer's Guide
 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"
17 #include "vrfcore/timer.h"
18 
21 class DtBooleanInputPort;
23 
24 namespace makVrf
25 {
26  class DtArticulatedPartStateRepository;
27 }
28 
35 {
36 public:
37 
40  DtBallisticGunJoy(const DtString & name, DtLocalObject* owner,
42  DtReaderWriterRegistry * const parentRegistry = 0);
43 
44 public:
46  virtual ~DtBallisticGunJoy();
47 
50  virtual const char* type() const;
51 
53  virtual bool createPorts();
54 
57  virtual void setComponentDescriptor(DtComponentDescriptor * descriptor);
58 
61  virtual void tick();
62 
67  virtual DtReal setTarget(makVrf::DtArticulatedPartStateRepository *rotBody);
68 
73  virtual makVrfEvents::DtFireEvent* manualFireInteraction(
75 
76  virtual makVrfEvents::DtDetonationEvent* manualDetonationInteraction(
77  makVrf::DtArticulatedPartStateRepository* rotBody, DtReal& detTime, DtReal dist);
78 
85  virtual DtUUID targetSelection(
86  makVrf::DtArticulatedPartStateRepository* rotBody, DtReal& dist);
87 
88  virtual DtReal distanceToTarget();
89 
97  static void detonationCallback(DtTimer * timer);
98 
102  static DtSimComponent * creator(const DtString& name,
103  DtLocalObject* owner,
104  DtSimulationServices* simManager,
105  DtComponentDescriptor* desc = 0,
106  DtReaderWriterRegistry* parentRegistry = 0);
107 
108 private:
112 
114  DtBallisticGunJoy(const DtBallisticGunJoy & orig);
115 
117  const DtBallisticGunJoy & operator=(const DtBallisticGunJoy & orig);
118 
119 protected:
120 
123 
130 
137 
139 
143 };
144 
UUID is a unique ID wrapper class.
Definition: uuid.h:59
DtBallisticGunJoy extends the DtBallisticGun actuator class with the ability to be controlled from a ...
Definition: ballisticGunJoy.h:34
DtBooleanInputPort * myActiveJoystickPort
Input Port Name: joystick-active Input Port Description: Input Port Range: Input Port Default Value...
Definition: ballisticGunJoy.h:136
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
Instances of DtTimer are used to maintain the information needed to represent some kind of scheduled ...
Definition: timer.h:38
Definition: fireEvent.h:16
DtBallisticGun provides a simple model of a ballistic gun.
Definition: ballisticGun.h:43
Contains class declarations for DtConstrainedAnalogInputPort and DtConstrainedAnalogOutputPort.
Definition: constrainedAnalogIOPort.h:30
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
DtConstrainedAnalogInputPort * myElevationPort
Input Port Name: elevation Input Port Description: Input Port Range: -1. to 1. Input Port Default Va...
Definition: ballisticGunJoy.h:129
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)
Definition: detonationEvent.h:20
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...
Contains class declarations for DtBooleanInputPort, DtBooleanOutputPort, and DtBooleanPortData.
Definition: boolIOPort.h:25
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
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:40
bool myReportedNoArticulation
A flag to remember whether a warning message was printed about not finding an articulated part...
Definition: ballisticGunJoy.h:142
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.
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)