VR-Engage  2.2
Loading...
Searching...
No Matches
DtVortexPagedTerrainExtension Class Reference

Detailed Description

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>

Inheritance diagram for DtVortexPagedTerrainExtension:
[legend]

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
 

Constructor & Destructor Documentation

◆ DtVortexPagedTerrainExtension()

DtVortexPagedTerrainExtension::DtVortexPagedTerrainExtension ( VxSim::VxExtension * iProxy)

Constructor.

Creates a new terrain extension with the given proxy.

Parameters
iProxyThe extension proxy to associate with

◆ ~DtVortexPagedTerrainExtension()

virtual DtVortexPagedTerrainExtension::~DtVortexPagedTerrainExtension ( )
overridevirtual

Destructor.

Cleans up terrain producer and related resources.

Member Function Documentation

◆ onApplicationModeChange()

virtual void DtVortexPagedTerrainExtension::onApplicationModeChange ( VxSim::eApplicationMode previous,
VxSim::eApplicationMode next )
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:

  • Creates when previous == editing && next == simulating
  • Deletes when previous == simulating && next == editing
  • Does nothing otherwise
Parameters
previousPrevious application mode
nextNext application mode

◆ createTerrainProducer()

void DtVortexPagedTerrainExtension::createTerrainProducer ( Vx::VxUniverse * universe)
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.

Parameters
universeThe Vortex universe to add the producer to

◆ deleteTerrainProducer()

void DtVortexPagedTerrainExtension::deleteTerrainProducer ( Vx::VxUniverse * universe)
protected

Deletes the terrain producer and related resources.

Removes the terrain producer and interface from the universe and cleans up resources.

Parameters
universeThe Vortex universe containing the producer

Member Data Documentation

◆ myTerrainProducer

VxTerrain::VxPagedTerrainProducer* DtVortexPagedTerrainExtension::myTerrainProducer
protected

Terrain producer for generating collision geometries.

◆ myTerrainSource

VxTerrain::VxPagedTerrainInterface* DtVortexPagedTerrainExtension::myTerrainSource
protected

Interface for accessing terrain data.

◆ myForecaster

VxTerrain::VxSpatialForecaster* DtVortexPagedTerrainExtension::myForecaster
protected

Forecaster for predicting needed terrain areas.


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