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

Detailed Description

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>

Inheritance diagram for makVre::DtVreMovementBasedTerrainPreloadController:
[legend]

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)
 
DtVreMovementBasedTerrainPreloadControlleroperator= (const DtVreMovementBasedTerrainPreloadController &orig)
 

Constructor & Destructor Documentation

◆ DtVreMovementBasedTerrainPreloadController() [1/3]

makVre::DtVreMovementBasedTerrainPreloadController::DtVreMovementBasedTerrainPreloadController ( )
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=().

◆ DtVreMovementBasedTerrainPreloadController() [2/3]

makVre::DtVreMovementBasedTerrainPreloadController::DtVreMovementBasedTerrainPreloadController ( const DtVreMovementBasedTerrainPreloadController & orig)
private

Copy constructor (not implemented)

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

References DtVreMovementBasedTerrainPreloadController().

◆ DtVreMovementBasedTerrainPreloadController() [3/3]

makVre::DtVreMovementBasedTerrainPreloadController::DtVreMovementBasedTerrainPreloadController ( 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 movement-based terrain preload controller with the specified parameters.

◆ ~DtVreMovementBasedTerrainPreloadController()

virtual makVre::DtVreMovementBasedTerrainPreloadController::~DtVreMovementBasedTerrainPreloadController ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the movement-based terrain preload controller component.

Member Function Documentation

◆ operator=()

DtVreMovementBasedTerrainPreloadController & makVre::DtVreMovementBasedTerrainPreloadController::operator= ( const DtVreMovementBasedTerrainPreloadController & orig)
private

Assignment operator (not implemented)

Returns
Reference to this object

Assignment operator is private and not implemented to prevent assignment.

References DtVreMovementBasedTerrainPreloadController().

◆ type()

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

Gets the type identifier for this component.

Returns
String identifying the component type (DtVreMovementBasedTerrainPreloadControllerType)

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

◆ calculateTerrainPreLoad()

virtual void makVre::DtVreMovementBasedTerrainPreloadController::calculateTerrainPreLoad ( DtVrfObjectTerrainPreloadArgs & args)
overridevirtual

Calculates the terrain area to preload.

Parameters
argsArguments 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.

◆ creator()

static DtSimComponent * makVre::DtVreMovementBasedTerrainPreloadController::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.

◆ createPorts()

virtual bool makVre::DtVreMovementBasedTerrainPreloadController::createPorts ( )
overridevirtual

Creates input and output ports for the component.

Returns
True if ports are successfully created, false otherwise

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.

Member Data Documentation

◆ myFallingInputPort

DtBooleanInputPort* makVre::DtVreMovementBasedTerrainPreloadController::myFallingInputPort
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.


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