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

Detailed Description

DtVreSpawnController extends the base spawn controller to provide performance optimizations for vehicle creation. It modifies the entity creation process to avoid automatically adding spawned vehicles to the Vortex physics world until needed, which significantly improves performance when creating vehicles at spawn points.

#include <vreSpawnController.h>

Inheritance diagram for makVre::DtVreSpawnController:
[legend]

Public Member Functions

 DtVreSpawnController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *parentRegistry)
 

Static Public Member Functions

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

Protected Member Functions

virtual DtCreateObjectHandle createObject (const DtUUID &spawnObjectUUID, const DtSimObject *sinkPoint, const DtRwSpawnData *spawnData, bool &dataAvailable, const DtPlan &entityPlan) override
 

Private Member Functions

 DtVreSpawnController ()
 
 DtVreSpawnController (const DtVreSpawnController &other)
 
DtVreSpawnControlleroperator= (const DtVreSpawnController &other)
 

Constructor & Destructor Documentation

◆ DtVreSpawnController() [1/3]

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

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 spawn controller component with the specified parameters.

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

◆ DtVreSpawnController() [2/3]

makVre::DtVreSpawnController::DtVreSpawnController ( )
private

Default constructor (not implemented)

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

◆ DtVreSpawnController() [3/3]

makVre::DtVreSpawnController::DtVreSpawnController ( const DtVreSpawnController & other)
private

Copy constructor (not implemented)

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

References DtVreSpawnController().

Member Function Documentation

◆ creator()

static DtSimComponent * makVre::DtVreSpawnController::creator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc,
DtReaderWriterRegistry * parentRegistry )
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.

◆ createObject()

virtual DtCreateObjectHandle makVre::DtVreSpawnController::createObject ( const DtUUID & spawnObjectUUID,
const DtSimObject * sinkPoint,
const DtRwSpawnData * spawnData,
bool & dataAvailable,
const DtPlan & entityPlan )
overrideprotectedvirtual

Creates an object with spawn point context information.

Parameters
spawnObjectUUIDUUID of the object to spawn
sinkPointThe sink point where the object will be spawned
spawnDataSpawn configuration data
dataAvailableOutput parameter indicating if required data was available
entityPlanThe plan to assign to the spawned entity
Returns
Handle to the created object

Overridden to pass context information that the vehicle is being created at a spawn point. Sets an entry with the keyword "DtSpawnedBy" in the extended data map, where the value is the UUID of the spawning entity. The presence of this keyword indicates that the entity was created via a spawn point, which prevents automatic Vortex world integration until needed.

◆ operator=()

DtVreSpawnController & makVre::DtVreSpawnController::operator= ( const DtVreSpawnController & other)
private

Assignment operator (not implemented)

Returns
Reference to this object

Assignment operator is private and not implemented to prevent assignment.

References DtVreSpawnController().


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