VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtElementData Class Reference

The element data is all the information about all elements in the scene. More...

Public Types

typedef std::vector< DtUniqueIDSceneObjectIdList
typedef boost::unordered_map
< DtElementID, DtElementEntry * > 
ElementEntryMap
 Map of unique id's to DtElementEntry's.
typedef boost::unordered_map
< DtElementID,
SceneObjectIdList
ElementToSceneObjectMap
typedef std::vector
< DtElementEntry * > 
ElementList
 Type for signals.
typedef std::vector< DtElementIDUniqueIdList
typedef std::vector< DtElementIDElementIdList
typedef std::vector
< DtElementAttribute * > 
AttributeList
typedef std::pair
< DtElementEntry
*, AttributeList
EntryAttributes
typedef std::vector
< EntryAttributes
EntryAttributesList

Public Member Functions

 DtElementData (DtDe &de)
 CTOR.
virtual ~DtElementData ()
 DTOR.
void applyChanges (const DtElementChanges &changes)
 Apply changes via an element changes object.
const ElementEntryMapelements () const
 Get the element map.
const ElementToSceneObjectMapelementToSceneObjectMap () const
 Get the element to scene object map.
DtElementEntryfindElement (DtElementID id)
 Find an element.
void findAll (DtElementEntry::ElementType type, ElementList &outVector, bool sort=true)
 Find all elements of a given type, and return in a array (which by default is sorted according to their ID)
void findAll (const std::vector< DtElementEntry::ElementType > &types, ElementList &outVector, bool sort=true)
 Find all elements of a for several types, and return in a array (which by default is sorted according to their ID)
void findAll (ElementList &outVector, bool sort=true)
 Find all elements and return in a array (which by default is sorted according to their ID)
virtual void addElementID (const DtElementID &elementID, const DtUniqueID &sceneObjectID, int modelSet)
 Tell the mapper about an element ID / scene object ID pairing, as well as the model set the scene object is from.
virtual void addElementID (const DtElementID &elementID, const DtUniqueID &sceneObjectID)
 Tell the mapper about an element ID / scene object ID pairing for an element that is not part of a model set (such as a prop)
virtual void removeElementID (const DtElementID &elementID, const DtUniqueID &sceneObjectID, int modelSet)
 remove an element ID / scene object ID pairing
virtual void removeElementID (const DtElementID &elementID, const DtUniqueID &sceneObjectID)
virtual void getSceneObjectIds (const DtElementID &elementID, SceneObjectIdList &outputList, int modelSet=-1) const
 Get the scene object ID from the specified modelset that is associated with an element ID (or all scene object IDs associated with that element ID)
virtual DtElementID elementId (const DtUniqueID &sceneObjectID) const
 Get the element ID associated with a scene object ID.

Public Attributes

boost::signal< void(const
ElementList &) > 
signal_elementsAdded
 Signal elements added.
boost::signal< void(const
ElementIdList &) > 
signal_elementsInitialized
 When the element addded signal is raised, none of the element attributes (like displayName, connectionObjectID, etc.) have been set yet; nor have any associated scene objects, making that signal not as useful.
boost::signal< void(const
ElementIdList &) > 
signal_elementsToBeRemoved
 Signal elements to be removed.
boost::signal< void(const
EntryAttributesList &) > 
signal_attributesChanged
 Signal Attribute changed.
boost::signal< void(const
ElementIdList &) > 
signal_sceneObjectsAdded
 Signal a list of elements that have had scene objects added.

Protected Types

typedef boost::unordered_map
< int, ElementToSceneObjectMap
ModelSetToElementSceneObjectMap
typedef boost::unordered_map
< DtUniqueID, DtElementID
SceneObjectToElementMap

Protected Member Functions

virtual void slot_preTick ()
 Check for new elements from last frame.

Protected Attributes

DtDemyDe
ElementEntryMap myElements
ElementToSceneObjectMap myElementToSceneObjectMap
ModelSetToElementSceneObjectMap myModelSetToElementSceneObjectMap
SceneObjectToElementMap mySceneObjectToElementMap
boost::unordered_set< DtElementIDmyElementsAddedLastFrame

Detailed Description

The element data is all the information about all elements in the scene.

Member Typedef Documentation

Map of unique id's to DtElementEntry's.

Type for signals.

typedef boost::unordered_map<DtUniqueID, DtElementID> makVrv::DtElementData::SceneObjectToElementMap
protected

Constructor & Destructor Documentation

makVrv::DtElementData::DtElementData ( DtDe de)

CTOR.

virtual makVrv::DtElementData::~DtElementData ( )
virtual

DTOR.

Member Function Documentation

void makVrv::DtElementData::applyChanges ( const DtElementChanges changes)

Apply changes via an element changes object.

const ElementEntryMap& makVrv::DtElementData::elements ( ) const

Get the element map.

const ElementToSceneObjectMap& makVrv::DtElementData::elementToSceneObjectMap ( ) const

Get the element to scene object map.

DtElementEntry* makVrv::DtElementData::findElement ( DtElementID  id)

Find an element.

void makVrv::DtElementData::findAll ( DtElementEntry::ElementType  type,
ElementList outVector,
bool  sort = true 
)

Find all elements of a given type, and return in a array (which by default is sorted according to their ID)

void makVrv::DtElementData::findAll ( const std::vector< DtElementEntry::ElementType > &  types,
ElementList outVector,
bool  sort = true 
)

Find all elements of a for several types, and return in a array (which by default is sorted according to their ID)

void makVrv::DtElementData::findAll ( ElementList outVector,
bool  sort = true 
)

Find all elements and return in a array (which by default is sorted according to their ID)

virtual void makVrv::DtElementData::addElementID ( const DtElementID elementID,
const DtUniqueID sceneObjectID,
int  modelSet 
)
virtual

Tell the mapper about an element ID / scene object ID pairing, as well as the model set the scene object is from.

virtual void makVrv::DtElementData::addElementID ( const DtElementID elementID,
const DtUniqueID sceneObjectID 
)
virtual

Tell the mapper about an element ID / scene object ID pairing for an element that is not part of a model set (such as a prop)

virtual void makVrv::DtElementData::removeElementID ( const DtElementID elementID,
const DtUniqueID sceneObjectID,
int  modelSet 
)
virtual

remove an element ID / scene object ID pairing

virtual void makVrv::DtElementData::removeElementID ( const DtElementID elementID,
const DtUniqueID sceneObjectID 
)
virtual
virtual void makVrv::DtElementData::getSceneObjectIds ( const DtElementID elementID,
SceneObjectIdList outputList,
int  modelSet = -1 
) const
virtual

Get the scene object ID from the specified modelset that is associated with an element ID (or all scene object IDs associated with that element ID)

virtual DtElementID makVrv::DtElementData::elementId ( const DtUniqueID sceneObjectID) const
virtual

Get the element ID associated with a scene object ID.

virtual void makVrv::DtElementData::slot_preTick ( )
protectedvirtual

Check for new elements from last frame.

Member Data Documentation

boost::signal< void (const ElementList&) > makVrv::DtElementData::signal_elementsAdded

Signal elements added.

boost::signal< void (const ElementIdList&) > makVrv::DtElementData::signal_elementsInitialized

When the element addded signal is raised, none of the element attributes (like displayName, connectionObjectID, etc.) have been set yet; nor have any associated scene objects, making that signal not as useful.

This signal is raised at the start of the next frame after the elements were added, at which point any initial attributes will be set and scene objects created. It is ALSO raised if any new scene objects are added to the element. This helps users catch the case where an element is created and initialized, and then for some reason its scene objects are removed and new ones added (this can happen it some initialization edge cases). Note that users needs to listen to DtSceneObject::signal_sceneObjectToBeDeleted if holding on to scene object pointers.

boost::signal< void (const ElementIdList&) > makVrv::DtElementData::signal_elementsToBeRemoved

Signal elements to be removed.

boost::signal< void (const EntryAttributesList&) > makVrv::DtElementData::signal_attributesChanged

Signal Attribute changed.

boost::signal< void(const ElementIdList&) > makVrv::DtElementData::signal_sceneObjectsAdded

Signal a list of elements that have had scene objects added.

This can be used in place of signal_elementsInitialized if desired (we will probably deprecate that signal

DtDe& makVrv::DtElementData::myDe
protected
ElementEntryMap makVrv::DtElementData::myElements
protected
ElementToSceneObjectMap makVrv::DtElementData::myElementToSceneObjectMap
protected
ModelSetToElementSceneObjectMap makVrv::DtElementData::myModelSetToElementSceneObjectMap
protected
SceneObjectToElementMap makVrv::DtElementData::mySceneObjectToElementMap
protected
boost::unordered_set<DtElementID> makVrv::DtElementData::myElementsAddedLastFrame
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)