|
VR-Engage
2.2
|
This controller is a provider to the DtVrfObjectTerrainPreloadManager. It uses the current movement speed and direction of the entity to predict the terrain area that will be needed in the near future by its host entity. The controller adjusts preloading based on whether the entity is in a normal movement state or is falling, which requires different terrain loading patterns.
Uses Descriptor Type: DtVreMovementBasedTerrainPreloadControllerDescriptor
#include <vreMovementBasedTerrainPreloadController.h>
Public Member Functions | |
| DtVreMovementBasedTerrainPreloadController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtVreMovementBasedTerrainPreloadController () override |
| virtual const char * | type () const override |
| virtual void | calculateTerrainPreLoad (DtVrfObjectTerrainPreloadArgs &args) override |
| virtual bool | createPorts () override |
Public Member Functions inherited from makVre::DtVreSimComponent< DtMovementBasedTerrainPreloadController > | |
| DtVreSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| virtual | ~DtVreSimComponent () |
| bool | isPlayerControlled (const std::string &role="") const |
| DtString | entitySystemName () const |
Static Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
Protected Attributes | |
| DtBooleanInputPort * | myFallingInputPort |
Private Member Functions | |
| DtVreMovementBasedTerrainPreloadController () | |
| DtVreMovementBasedTerrainPreloadController (const DtVreMovementBasedTerrainPreloadController &orig) | |
| DtVreMovementBasedTerrainPreloadController & | operator= (const DtVreMovementBasedTerrainPreloadController &orig) |
|
private |
Default constructor (not implemented)
Default constructor is private and not implemented to prevent creation of instances without proper initialization.
Referenced by DtVreMovementBasedTerrainPreloadController(), and operator=().
|
private |
Copy constructor (not implemented)
Copy constructor is private and not implemented to prevent copy construction.
References DtVreMovementBasedTerrainPreloadController().
| makVre::DtVreMovementBasedTerrainPreloadController::DtVreMovementBasedTerrainPreloadController | ( | const DtString & | name, |
| DtLocalObject * | owner, | ||
| DtSimulationServices * | simManager, | ||
| DtComponentDescriptor * | desc = 0, | ||
| DtReaderWriterRegistry * | parentRegistry = 0 ) |
Constructor.
| name | The name of this component |
| owner | The local object that owns this component |
| simManager | The simulation services manager |
| desc | Component descriptor with configuration parameters |
| parentRegistry | Optional parent registry for reader/writer functionality |
Creates a new movement-based terrain preload controller with the specified parameters.
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the movement-based terrain preload controller component.
|
private |
Assignment operator (not implemented)
Assignment operator is private and not implemented to prevent assignment.
References DtVreMovementBasedTerrainPreloadController().
|
overridevirtual |
Gets the type identifier for this component.
Implements the DtSimComponent::type() method to return the type identifier for this component.
|
overridevirtual |
Calculates the terrain area to preload.
| args | Arguments containing information for terrain preload calculation |
Overridden to check the falling port and adjust the preload shape accordingly. If the entity is falling, the preload shape is forced to be a chord, which provides a more appropriate preload area for falling entities. This ensures that terrain is properly loaded in the expected landing area.
|
static |
Factory method to create a new instance of this component.
| name | The name for the new component |
| owner | The local object that will own this component |
| simManager | The simulation services manager |
| desc | Optional component descriptor |
| parentRegistry | Optional parent registry for reader/writer functionality |
Static factory method used by the component creation system to instantiate new instances of this component type.
|
overridevirtual |
Creates input and output ports for the component.
Creates, initializes, and adds to the port group all the ports needed by this component, including the falling input port which influences terrain preloading behavior.
|
protected |
Input port for entity falling state.
Boolean input port that indicates whether the entity is in a falling state. When true, the terrain preloading shape is adjusted to better accommodate the trajectory of a falling entity.