VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreLauncherActuator Class Reference

Detailed Description

DtVreLauncherActuator extends the base launcher actuator to provide specialized missile firing capabilities, particularly for systems like the FGM-148 Javelin. It maintains the attack mode state of the launcher (e.g., direct attack or top attack modes) and passes this state as part of the creation parameters when instantiating a missile. This allows the missile to behave according to the selected attack mode.

#include <vreLauncherActuator.h>

Inheritance diagram for makVre::DtVreLauncherActuator:
[legend]

Public Member Functions

 DtVreLauncherActuator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVreLauncherActuator () override
 
virtual const char * type () const override
 
virtual void preFirstTickInit () override
 
virtual void tick () override
 
virtual void prePutSelf () override
 
virtual DtVector muzzleLocalPosition () override
 

Static Public Member Functions

static DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 

Protected Member Functions

virtual bool createPSR () override
 
virtual DtCreateObjectHandle createMissile (DtVrfLocalObjectCreateInformation &createdInfo) override
 
 DtVreLauncherActuator ()
 
 DtVreLauncherActuator (const DtVreLauncherActuator &orig)
 
const DtVreLauncherActuatoroperator= (const DtVreLauncherActuator &orig)
 

Protected Attributes

DtTopAndDirectLauncherPSRmyLauncherPSR
 

Constructor & Destructor Documentation

◆ DtVreLauncherActuator() [1/3]

makVre::DtVreLauncherActuator::DtVreLauncherActuator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )

Constructor.

Parameters
nameThe name of this component
ownerThe local object that owns this component
simManagerThe simulation services manager
descComponent descriptor with configuration parameters
parentRegistryOptional parent registry for reader/writer functionality

Creates a new launcher actuator component with the specified parameters.

Referenced by DtVreLauncherActuator(), and operator=().

◆ ~DtVreLauncherActuator()

virtual makVre::DtVreLauncherActuator::~DtVreLauncherActuator ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the launcher actuator component.

◆ DtVreLauncherActuator() [2/3]

makVre::DtVreLauncherActuator::DtVreLauncherActuator ( )
protected

Default constructor (not implemented)

Default constructor is protected and not implemented to prevent creation of instances without proper initialization.

◆ DtVreLauncherActuator() [3/3]

makVre::DtVreLauncherActuator::DtVreLauncherActuator ( const DtVreLauncherActuator & orig)
protected

Copy constructor (not implemented)

Copy constructor is protected and not implemented to prevent copy construction.

References DtVreLauncherActuator().

Member Function Documentation

◆ type()

virtual const char * makVre::DtVreLauncherActuator::type ( ) const
overridevirtual

Gets the type identifier for this component.

Returns
String identifying the component type (DtVreLauncherActuatorType)

Implements the DtSimComponent::type() method to return the type identifier for this component.

◆ preFirstTickInit()

virtual void makVre::DtVreLauncherActuator::preFirstTickInit ( )
overridevirtual

Performs initialization before the first simulation tick.

Sets the missile attack mode in extended data from the process state repository. This ensures that the attack mode is properly initialized before the simulation begins, allowing missiles to be created with the correct parameters.

◆ tick()

virtual void makVre::DtVreLauncherActuator::tick ( )
overridevirtual

Overridden to add setting <systemName>.current-munition.

◆ prePutSelf()

virtual void makVre::DtVreLauncherActuator::prePutSelf ( )
overridevirtual

Called before writing this object out to a file. Gets the current value of "attackMode" from extended data and saves it to the process state repository before writing it out. This ensures that the attack mode state is properly preserved when the scenario is saved.

◆ muzzleLocalPosition()

virtual DtVector makVre::DtVreLauncherActuator::muzzleLocalPosition ( )
overridevirtual

Overridden to use the muzzle offset from the descriptor. Base class function isn't working.

Returns
muzzle offset in local coordinates.

◆ creator()

static DtSimComponent * makVre::DtVreLauncherActuator::creator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )
static

Factory method to create a new instance of this component.

Parameters
nameThe name for the new component
ownerThe local object that will own this component
simManagerThe simulation services manager
descOptional component descriptor
parentRegistryOptional parent registry for reader/writer functionality
Returns
Pointer to the newly created component

Static factory method used by the component creation system to instantiate new instances of this component type.

◆ createPSR()

virtual bool makVre::DtVreLauncherActuator::createPSR ( )
overrideprotectedvirtual

Creates the process state repository for the actuator.

Returns
True if PSR creation is successful, false otherwise

Overrides the base class implementation to create and cache a pointer to the derived type of process state repository (DtJavelinLauncherPSR). This allows direct access to Javelin-specific state information.

◆ createMissile()

virtual DtCreateObjectHandle makVre::DtVreLauncherActuator::createMissile ( DtVrfLocalObjectCreateInformation & createdInfo)
overrideprotectedvirtual

Creates a missile object with the appropriate attack mode.

Parameters
createdInfoInformation about the object to be created
Returns
Handle to the created missile object

Overrides the base class implementation to pass the current attackMode extended state parameter as a creation parameter for the missile. This allows the missile to be created with the correct attack mode (e.g., direct attack or top attack for Javelin missiles).

◆ operator=()

const DtVreLauncherActuator & makVre::DtVreLauncherActuator::operator= ( const DtVreLauncherActuator & orig)
protected

Assignment operator (not implemented)

Returns
Reference to this object

Assignment operator is protected and not implemented to prevent assignment.

References DtVreLauncherActuator().

Member Data Documentation

◆ myLauncherPSR

DtTopAndDirectLauncherPSR* makVre::DtVreLauncherActuator::myLauncherPSR
protected

Pointer to the Missile launcher process state repository.

Stores a typed pointer to the process state repository for more efficient access to missile-specific state data such as attack mode. This allows the actuator to directly access and modify state without type casting.


The documentation for this class was generated from the following file: