|
VR-Engage
2.2
|
This extension manages the paged terrain system in Vortex, creating and destroying the terrain producer and interface as needed during application mode changes. It handles efficient terrain collision geometry generation for physics simulation.
#include <vortexPagedTerrainExtension.h>
Public Member Functions | |
| DtVortexPagedTerrainExtension (VxSim::VxExtension *iProxy) | |
| virtual | ~DtVortexPagedTerrainExtension () override |
| virtual void | onApplicationModeChange (VxSim::eApplicationMode previous, VxSim::eApplicationMode next) override |
Protected Member Functions | |
| void | createTerrainProducer (Vx::VxUniverse *universe) |
| void | deleteTerrainProducer (Vx::VxUniverse *universe) |
Protected Attributes | |
| VxTerrain::VxPagedTerrainProducer * | myTerrainProducer |
| VxTerrain::VxPagedTerrainInterface * | myTerrainSource |
| VxTerrain::VxSpatialForecaster * | myForecaster |
| DtVortexPagedTerrainExtension::DtVortexPagedTerrainExtension | ( | VxSim::VxExtension * | iProxy | ) |
Constructor.
Creates a new terrain extension with the given proxy.
| iProxy | The extension proxy to associate with |
|
overridevirtual |
Destructor.
Cleans up terrain producer and related resources.
|
overridevirtual |
Handles application mode changes.
Called at the beginning of the update loop before the new mode is actually set. Used for creating and deleting the terrain producer:
| previous | Previous application mode |
| next | Next application mode |
|
protected |
Creates the terrain producer and adds it to the universe.
The terrain producer's responsibility is to feed the Vortex collision detection with parts and collision geometries that represent the terrain. It performs queries on a terrain database via the paged terrain interface in regions where terrain collision representations are required by the physics simulation.
Also creates the paged terrain interface (DtVortexPagedTerrain) which answers these queries and creates the requested collision geometries from the terrain database.
| universe | The Vortex universe to add the producer to |
|
protected |
Deletes the terrain producer and related resources.
Removes the terrain producer and interface from the universe and cleans up resources.
| universe | The Vortex universe containing the producer |
|
protected |
Terrain producer for generating collision geometries.
|
protected |
Interface for accessing terrain data.
|
protected |
Forecaster for predicting needed terrain areas.