VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
reactToCollisionEventActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies
3 ** All rights reserved.
4 *******************************************************************************/
5 
17 
18 #pragma once
19 
21 
23 #include <boost/signals2.hpp>
24 
26 class DtTimer;
27 
28 namespace makVrfEvents
29 {
30 class DtEvent;
31 }
32 
35 {
36 public:
39  DtLocalObject* owner,
40  DtSimulationServices* simManager,
41  DtComponentDescriptor* desc = nullptr,
42  DtReaderWriterRegistry* parentRegistry = nullptr);
43 
45  virtual ~DtReactToCollisionEventActuator() override;
46 
48  virtual const char* type() const override;
49 
51  virtual bool init() override;
52 
54  virtual void tick() override;
55 
57  virtual bool createPortGroups() override;
58 
60  virtual void processCollisionInteraction(const makVrfEvents::DtEvent& inter);
61 
63  virtual void onTimerFired();
64 
66  static void timerFiredCallback(DtTimer* timer);
67 
69  static DtSimComponent* creator(const DtString& name, DtLocalObject* owner,
70  DtSimulationServices* simManager, DtComponentDescriptor* desc = nullptr,
71  DtReaderWriterRegistry* parentRegistry = nullptr);
72 
73 private:
78 
79 private:
84 
86 
88  boost::signals2::scoped_connection myCollisionEventConnection;
89 };
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVector myLocalStoppedPosition
Definition: reactToCollisionEventActuator.h:81
Instances of DtTimer are used to maintain the information needed to represent some kind of scheduled ...
Definition: timer.h:38
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
double myStoppedDuration
Definition: reactToCollisionEventActuator.h:82
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
End User Description: DtActuator is the base class for all actuator model components. Developer Description: The DtActuator base class caches a pointer to the entity&#39;s radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor&#39;s DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it&#39;s location, rotation and so forth. These are created in the entity&#39;s DtVrfObjectStateRepository createParts() function. This call creates all the attached parts for all the actuators. These articulated state repositories are managed by the DtAttachmentManager. They are cached by their partType which is the DIS Enumeration describing the part from the disEnums.h file and was specified in the actuator&#39;s DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtEntityType used to look up articulated parts in the DtAttachementManager. When an actuator needs access to a particular articulated part it looks it up by the part&#39;s object type.
Definition: actuatorComponent.h:47
boost::signals2::scoped_connection myCollisionEventConnection
Keep our subscription alive for as long as the component exists.
Definition: reactToCollisionEventActuator.h:88
Definition: event.h:13
virtual bool init() override
Overridden to cache a pointer to the entity&#39;s radio in this class.
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
DtTimer * myStoppedTimer
Definition: reactToCollisionEventActuator.h:83
Actuator that listens for collision events and temporarily stops the vehicle.
Definition: reactToCollisionEventActuator.h:34
DtUpdateRepositoryOutputPortGroup * myUpdateRepositoryOutputPortGroup
Definition: reactToCollisionEventActuator.h:80
static int theReactToCollisionTimerType
Definition: reactToCollisionEventActuator.h:85
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
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
DtUpdateRepositoryOutputPortGroup is a data port group of a data consumer that contains methods and p...
Definition: updateRepositoryOutputPortGroup.h:31
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
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)