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>
|
| | DtVreSpawnController (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *parentRegistry) |
| |
|
| static DtSimComponent * | creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *parentRegistry) |
| |
|
| virtual DtCreateObjectHandle | createObject (const DtUUID &spawnObjectUUID, const DtSimObject *sinkPoint, const DtRwSpawnData *spawnData, bool &dataAvailable, const DtPlan &entityPlan) override |
| |
◆ DtVreSpawnController() [1/3]
| makVre::DtVreSpawnController::DtVreSpawnController |
( |
const DtString & | name, |
|
|
DtLocalObject * | owner, |
|
|
DtSimulationServices * | simManager, |
|
|
DtComponentDescriptor * | desc, |
|
|
DtReaderWriterRegistry * | parentRegistry ) |
Constructor.
- Parameters
-
| 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 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]
Copy constructor (not implemented)
Copy constructor is private and not implemented to prevent copy construction.
References DtVreSpawnController().
◆ 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
-
| 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 |
- 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
-
| spawnObjectUUID | UUID of the object to spawn |
| sinkPoint | The sink point where the object will be spawned |
| spawnData | Spawn configuration data |
| dataAvailable | Output parameter indicating if required data was available |
| entityPlan | The 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=()
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: