VR-Engage  2.3
Loading...
Searching...
No Matches
vreLaserGuidedLauncherController.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreLaserGuidedLauncherController.h
7//! \ingroup vreVrfmodel
8//! \brief Controller for laser-guided launcher systems
9//!
10//! This file defines the DtVreLaserGuidedLauncherController class which extends
11//! the integrated laser guided launcher controller with support for "lock on after
12//! launch" functionality. It is designed to be used with the VRE_Fire_Missile lua task.
13
14#pragma once
15
16#include "vreVrfmodel/export.h"
17#include <vrfmodel/integratedLaserGuidedLauncherController.h>
19
20class DtLaserGuidedLauncherControllerDescriptor;
21class DtLaserLauncherPSR;
22class DtVectorOutputPort;
23class DtSimMessage;
24
25namespace makVrf
26{
27class DtLaserDesignatorStateComponent;
28}
29
30namespace makVre
31{
32//! \brief Type identifier for the VRE laser guided launcher controller component
33const char DtVreLaserGuidedLauncherControllerType[] = "vre-integrated-laser-guided-launcher-controller";
34
35//! \brief Controller for managing laser-guided missile systems
36//!
37//! DtVreLaserGuidedLauncherController extends the base integrated laser guided launcher
38//! with support for "lock on after launch" mode. This controller is specifically designed
39//! to be used with the VRE_Fire_Missile lua task and supports advanced laser-guided
40//! weapon functionality such as post-launch target designation and acquisition.
42 public DtVreSimComponent<DtIntegratedLaserGuidedLauncherController>
43{
44public:
45 //! \brief Constructor
46 //! \param name The name of this component
47 //! \param owner The local object that owns this component
48 //! \param simManager The simulation services manager
49 //! \param compDesc Component descriptor with configuration parameters
50 //! \param parentRegistry Optional parent registry for reader/writer functionality
51 //!
52 //! Creates a new laser guided launcher controller with the specified parameters.
54 DtLocalObject* owner,
55 DtSimulationServices* simManager,
56 DtComponentDescriptor* compDesc = 0,
57 DtReaderWriterRegistry* parentRegistry = 0);
58
59 //! \brief Virtual destructor
60 //!
61 //! Cleans up resources used by the laser guided launcher controller.
63
64 //! \brief Gets the type identifier for this component
65 //! \return String identifying the component type (DtVreLaserGuidedLauncherControllerType)
66 //!
67 //! Implements the DtSimComponent::type() method to return the
68 //! type identifier for this component.
69 virtual const char* type() const override;
70
71 //! \brief Factory method to create a new instance of this component
72 //! \param name The name for the new component
73 //! \param owner The local object that will own this component
74 //! \param simManager The simulation services manager
75 //! \param desc Optional component descriptor
76 //! \param parentRegistry Optional parent registry for reader/writer functionality
77 //! \return Pointer to the newly created component
78 //!
79 //! Static factory method used by the component creation system to instantiate
80 //! new instances of this component type.
81 static DtSimComponent* creator(const DtString& name,
82 DtLocalObject* owner,
83 DtSimulationServices* simManager,
84 DtComponentDescriptor* desc = 0,
85 DtReaderWriterRegistry* parentRegistry = 0);
86
87 //! \brief Default constructor (not implemented)
89
90 //! \brief Copy constructor (not implemented)
92
93 //! \brief Assignment operator (not implemented)
95
96protected:
97 //! \brief Synchronizes this launcher's laser code from the tracked designator before firing.
98 //!
99 //! The fire-laser-guided-missile task identifies the launcher but does not carry a laser code.
100 //! When a gimbaled sensor is tracking a designator, use its existing trackingCode state property
101 //! to configure only this selected launcher before the base task handler starts firing.
102 //!
103 //! \param msg The received fire-laser-guided-missile task message.
104 virtual void processFireLaserGuidedMissileTask(DtSimMessage* msg) override;
105
106 //! \brief Determines if the launcher has permission to fire
107 //! \param localSpotPosition The target position in local coordinates
108 //! \return True if firing is permitted, false otherwise
109 //!
110 //! Overridden to check top level tasks for "vre_fire_missile", as Fire at Target is a
111 //! subtask when firing as a role player. This allows for proper fire permission checking
112 //! in VR-Engage scenarios.
113 //! VRE NOTE (VRF trunk r292798 port): base permissionToFire() was removed upstream;
114 //! see the note in vreLaserGuidedLauncherController.cxx.
115 // virtual bool permissionToFire(const DtVector& localSpotPosition) const override;
116};
117} // namespace makVre
DtVreLaserGuidedLauncherController(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *compDesc=0, DtReaderWriterRegistry *parentRegistry=0)
Constructor.
virtual const char * type() const override
Gets the type identifier for this component.
virtual void processFireLaserGuidedMissileTask(DtSimMessage *msg) override
Synchronizes this launcher's laser code from the tracked designator before firing.
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Factory method to create a new instance of this component.
DtVreLaserGuidedLauncherController(const DtVreLaserGuidedLauncherController &orig)=delete
Copy constructor (not implemented)
virtual ~DtVreLaserGuidedLauncherController() override
Virtual destructor.
DtVreLaserGuidedLauncherController()=delete
Default constructor (not implemented)
DtVreLaserGuidedLauncherController & operator=(const DtVreLaserGuidedLauncherController &orig)=delete
Assignment operator (not implemented)
DtVreSimComponent(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Definition vreSimComponent.h:63
Defines export macros for the vreVrfmodel library.
#define VREVRFMODEL_DLL
Definition export.h:22
!
Definition glsVreMessageUtil.h:50
const char DtVreLaserGuidedLauncherControllerType[]
Type identifier for the VRE laser guided launcher controller component.
Definition vreLaserGuidedLauncherController.h:33
Definition connectorAccessory.h:38
Base template class for VR-Engage simulation components.