![]() |
VR-Forces 5.0.2 Developer's Guide
|
singleton class that acts as a bridge between the

Public Member Functions | |
| virtual | ~DtIndirectEntityManager () |
| virtual bool | addInstance (DtUniqueID uniqueId, const DtModelDefinition &modelDefinition, const DtOsgModelInstance &modelInstance, DtModel *model, int modelSet, float modelScale, float modelRadius, bool daylightControlled, bool mapDofsSwitchesSequences, int lightPointGroupId) |
| virtual bool | addInstanceAsProp (DtUniqueID uniqueId, const DtModelDefinition &modelDefinition, const DtOsgModelInstance &modelInstance, DtModel *model, float modelScale, float modelRadius, bool daylightControlled, bool mapDofsSwitchesSequences, int lightPointGroupId) |
| virtual bool | hasInstance (DtUniqueID uniqueId) const |
| virtual void | removeInstance (DtUniqueID uniqueID) |
| virtual int | numInstances (void) const |
| virtual void | mapMultiSwitches (DtUniqueID uniqueID, DtArticulatedModelParser::MapStateNumberToMultiSwitchList &multiSwitchesOfInstance) |
| virtual void | unMapMultiSwitches (DtUniqueID uniqueID) |
| virtual void | mapSequences (DtUniqueID uniqueID, DtArticulatedModelParser::AnimationMap &animationMap) |
| virtual void | unMapSequences (DtUniqueID uniqueID) |
| virtual void | mapDofs (DtUniqueID uniqueID, DtArticulatedModelParser::PartMap &partMap) |
| virtual void | unMapDofs (DtUniqueID uniqueID) |
| virtual void | setMultiSwitchActiveSwitchSet (DtUniqueID id, osgSim::MultiSwitch *multiSwitchOfInstance) |
| virtual void | setSequenceUpdate (DtUniqueID uniqueID, osg::Sequence *dof) |
| virtual void | setUvOffsetUpdate (DtUniqueID uniqueID, const std::string &annotation, float uOffset, float vOffset) |
| virtual void | scrollUvTextures (DtUniqueID uniqueID, const std::tuple< float, float, float > &uvspeeds) |
| virtual void | setDofUpdate (DtUniqueID uniqueID, osgSim::DOFTransform *dof) |
| virtual void | setDofTranslation (DtUniqueID uniqueID, osgSim::DOFTransform *dof, const Vector3_64 &trans, const Vector3_64 &transVel) |
| virtual void | setDofOrientation (DtUniqueID uniqueID, osgSim::DOFTransform *dof, const Vector3_64 &hpr, const Vector3_64 &hprVel, int animationFlags) |
| virtual void | setDofOrientation (DtUniqueID uniqueID, osgSim::DOFTransform *dof, const Vector3_64 &hprVel, bool forceUpdate, int animationFlags) |
| void | slot_atcGlobalModelEnableChanged () |
| virtual void | setPositionAndOrientation (DtUniqueID uniqueId, const DtVector &position, const DtTaitBryan &orientation, const DtVector &positionOffset, const DtTaitBryan &orientationOffset) |
| virtual void | setColor (DtUniqueID uniqueId, const Vector4_32 &color) |
| virtual void | setOtherData0 (DtUniqueID uniqueId, const Vector4_32 &data) |
| virtual void | setVisible (DtUniqueID uniqueId, bool visible) |
| virtual void | setLightPointMaxDistance (DtUniqueID uniqueId, float maxDistance) |
| virtual void | slot_postTick () |
| virtual void | excludeTextureFromLimits (const std::string &textureFileAbolutePath) |
| virtual void | excludeModelDefinitionFromLimits (const std::string &modelDefinition) |
| virtual void | setTextureLoadTimeSlicePeriod (float period) |
| virtual float | textureLoadTimeSlicePeriod (void) const |
| virtual void | setUpdateBuffersJobsRequiredCurrentFrame (bool requiredCurrentFrame) |
| virtual bool | updateBuffersJobsRequiredCurrentFrame (void) const |
| virtual void | setGridCellSize (const Vector3_64 &gridCellSize) |
| virtual const Vector3_64 & | gridCellSize (void) const |
| virtual void | setCellPageOutTime (double val) |
| virtual double | cellPageOutTime (void) const |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtIndirectEntityManager & | instance (DtDe &de) |
Public Attributes | |
Signals | |
| boost::signalslib::signal < void(DtModel *, DtUniqueID)> | signal_instanceAdded |
Protected Member Functions | |
| DtIndirectEntityManager (DtDe &de) | |
| virtual DtIndirectEntityManagerInstanceMoveInfo * | createMoveInfoIfNecessary (const DtVector &position, DtIndirectEntityManagerInstance ¤tEntityManagerInstance, DtUniqueID uniqueId) |
| virtual void | configureIndirectGeometry (DtIndirectGeometry *indirectGeometry) |
| virtual osgSim::DOFTransform * | findMasterDof (DtUniqueID uniqueID, osgSim::DOFTransform *dof) const |
| virtual DtIndirectEntityGeometry * | findIndirectGeometryAndInstanceId (DtUniqueID uniqueID, int &instanceId) const |
| virtual void | calculateAndSetInstanceMatrixTransform (const DtVector &position, const DtTaitBryan &orientation, const DtVector &positionOffset, const DtTaitBryan &orientationOffset, DtIndirectEntityGeometry *indirectGeometry, int instanceId) |
| virtual void | tickEntityMoves (void) |
| virtual void | tickPaging (void) |
| virtual bool | instanceIsBeingMovedTo (const Vector3_int &cellId) |
| void | setupRootNodes () |
| virtual void | setupReductionExcludeTextures () |
| virtual void | updateStats () |
Private Member Functions | |
| DtIndirectEntityManager ()=delete | |
| DtIndirectEntityManager (const DtIndirectEntityManager &)=delete | |
| DtIndirectEntityManager & | operator= (const DtIndirectEntityManager &)=delete |
|
protected |
There is one grid per model set type in the manager Each grid contains a list of 'cells' Each cell contains an indirect geometry each indirect geometry contains a number of instances.
|
protected |
map of unique ids to the corresponding DtIndirectEntityManagerInstances
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
map of inactive cells to their start and current time
|
protected |
map of each grid (model set) to inactive cells in that grid
|
virtual |
destructor
|
protected |
constructor. protected. only creator can create
|
privatedelete |
private default constructor. not allowed.
|
privatedelete |
prevent copy-construction
|
static |
Get an instance of the instance manager.
|
privatedelete |
prevent assignment
|
virtual |
add an instance returns true if the instance was added. false if the model was unable to be added like there is no renderable geometry in the model
|
virtual |
add an instance as a prop. This just calls addInstance with a model set of -1 under the hood. Props are added to the prop root and rendered in all observer modes. returns true if the instance was added.
|
virtual |
check whether an instance with this id exists.
|
virtual |
remove an instance
|
virtual |
number of instances added to our manager
|
virtual |
A model instance multi switches & sequences have the same hierarchy/positions as the original model (or first instance) because its cloned (so that per-entity switches/multi-switches can be manipulated on a per-instance basis) Indirect geometry maintains a list of the original/master switches from the original model in the same hierarchy This function is needed to be called so that it will map an instance multi-switches to the 'master' multi-switches We use the first instance as the 'master'.
|
virtual |
unmap previously mapped switches of the model instance
|
virtual |
Similarly, map sequences.
|
virtual |
unmap previously mapped sequences
|
virtual |
Similarly, dofs.
|
virtual |
unmap previously mapped dofs
|
virtual |
set the multi-switch state on a multi-switch of an instance
|
virtual |
set sequence update
|
virtual |
set the uv offset for a particular model and annotation
|
virtual |
set the uv offset for a particular model and all the scrollable ids
|
virtual |
map sequences
|
virtual |
set the translation and translation velocity on a dof
|
virtual |
set the HPR (heading, pitch and roll) & HPR velocity on a dof
|
virtual |
set the HPR velocity on a dof
| void makVrv::DtIndirectEntityManager::slot_atcGlobalModelEnableChanged | ( | ) |
Slot to handle the global alpha to coverage signal for entities Called by constructor so can't be virtual.
|
virtual |
update the position and orientation of a particular model instance.
|
virtual |
set the color modulator of a particular model instance.
|
virtual |
set the otherData0 of a particular model instance.
|
virtual |
set the visibility of a particular model instance.
|
virtual |
set the max distance for a light point of a particular model instance
|
virtual |
set/get the time slice period/budget to load textures of models per tick (in seconds). Textures are loaded incrementally in time slices. In a tick, if the time taken to load texture(s) exceeds the time slice period/budget, the remainder textures are loaded in the subsequent ticks (again in time slices). Default value is 2ms (0.002 seconds). Ideally call before adding any instances.
|
virtual |
set/get the time slice period/budget to load textures of models per tick (in seconds). Textures are loaded incrementally in time slices. In a tick, if the time taken to load texture(s) exceeds the time slice period/budget, the remainder textures are loaded in the subsequent ticks (again in time slices). Default value is 2ms (0.002 seconds). Ideally call before adding any instances.
|
virtual |
set/get whether to force immediate update of internal gpu buffers for rendering of the model instances/entities Internal gpu buffers are not necessarily updated in a given frame/tick even if they are dirty (i.e. new models, textures came in). Setting this to true forces the internal buffers to update immediately that frame/tick. Ideally call before adding any instances.
|
virtual |
set/get whether to force immediate update of internal gpu buffers for rendering of the model instances/entities Internal gpu buffers are not necessarily updated in a given frame/tick even if they are dirty (i.e. new models, textures came in). Setting this to true forces the internal buffers to update immediately that frame/tick. Ideally call before adding any instances.
|
virtual |
set/get the cells' size for the sparse grid of entities Internally, the entities are spatially divided into a sparse grid of cells This allows us to efficiently do cull/lod out a bunch of entities
|
virtual |
set/get the cells' size for the sparse grid of entities Internally, the entities are spatially divided into a sparse grid of cells This allows us to efficiently do cull/lod out a bunch of entities
|
virtual |
set/get the page out time of the cells cells get paged out/deleted after they have been inactive for this period of time in seconds. default value is 60 seconds val passed in should be > 0
|
virtual |
set/get the page out time of the cells cells get paged out/deleted after they have been inactive for this period of time in seconds. default value is 60 seconds val passed in should be > 0
|
virtual |
handle the postTick signal. This -moves entities, if they are ready to be moved -pages out indirect geometries with 0 entities/instances
|
virtual |
exclude a texture from limits.
|
virtual |
exclude all of a model's textures from limits.
|
protectedvirtual |
See if we are moving from old cell to new cell for this position If we are, returns the move info to do this move.
|
protectedvirtual |
initialize uniform and fading needed for entity indirect geometries.
|
protectedvirtual |
get the master dof for a unique id and clone dof
|
protectedvirtual |
find the indirect geometry for a given unique id
|
protectedvirtual |
utility function for calculating the instance matrix transform for a paricular instance in an indirect geometry.
|
protectedvirtual |
update entity moves
|
protectedvirtual |
page out entities that have had 0 instances for page time seconds
|
protectedvirtual |
whether a cell figures in move info being moved to
|
protected |
not virtual because it is called by the constructor. Sets up the geometry grids with the root nodes.
|
protectedvirtual |
read the textures to exclude from reduction from the csv file and add them to the limiting strategies of each model set
|
protectedvirtual |
called in post tick to update the indirect entity related stats.
| boost::signalslib::signal<void(DtModel*, DtUniqueID)> makVrv::DtIndirectEntityManager::signal_instanceAdded |
Emitted when a new instance of a model is added to the entity manager.
|
protected |
reference to de
|
protected |
manager for connections
|
protected |
whether gpu buffers for instances are updated immediately
|
protected |
the grid cell size
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
move info for the instances being moved
|
protected |
|
protected |
map of each grid (model set) to inactive cells in that grid
|
protected |
|
protected |