VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions
makVrv::DtInstanceContainer Class Reference

Helper class to manage instances This class allows you to add a DtInstance_64 Internally, however it stores this as a DtInstance (which the GPU can directly read)

Public Member Functions

 DtInstanceContainer ()
 
virtual ~DtInstanceContainer ()
 

Private Member Functions

 DtInstanceContainer (const DtInstanceContainer &)=delete
 
DtInstanceContaineroperator= (const DtInstanceContainer &)=delete
 
typedef std::unordered_map
< int, DtIndirectOffsetAndSize
MapInstanceIdToPerGeomInstanceOffsetAndSize
 
typedef std::unordered_map
< int, int
MapInstanceIdToNumLightSources
 
MapIntToInt myModelIdToGeomOffset
 
SetInts myUniqueModels
 
VectorInts myModelAddedOrder
 
MapIntToInt myModelIdToGeometryCount
 
int myNumUniqueGeometries
 
MapInstanceIdToPerGeomInstanceOffsetAndSize myMapInstanceIdToPerGeomInstanceOffsetAndSize
 
MapInstanceIdToNumLightSources myMapInstanceIdToNumLightSources
 
int myRunningInstanceId
 
int myNumValidInstances
 
DtReusablePerGeomInstances myPerGeomInstances
 
unsigned int myMaxNumLightSources
 
virtual void addInstance (const int modelId, const DtPerGeomInstances &perGeomInstancesTemplate, int geometryLocations, int lightSourceCount, int &outPerGeomTemplateOffset, int &outNumGeoms, int &outInstanceIndex)
 
virtual bool removeInstance (int instanceId)
 
virtual bool hasInstance (int instanceId) const
 
virtual const
DtReusablePerGeomInstances
perGeomInstances (void) const
 
virtual
DtReusablePerGeomInstances
perGeomInstances (void)
 
virtual void printPerGeomInstances () const
 
virtual int numValidInstances (void) const
 
virtual int numUniqueGeometriesForModel (int modelId) const
 
virtual int numUniqueGeometries () const
 
virtual bool instanceEverAdded (void) const
 
virtual const
DtIndirectOffsetAndSize
perGeomInstanceOffsetAndSize (int instanceId) const
 
virtual void incrementNumUniqueGeometries (int number)
 
virtual const std::vector< int > & modelAddedOrder () const
 
virtual unsigned int maxNumLightSources () const
 

Member Typedef Documentation

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.

Constructor & Destructor Documentation

makVrv::DtInstanceContainer::DtInstanceContainer ( )

CTOR.

virtual makVrv::DtInstanceContainer::~DtInstanceContainer ( )
virtual

DTOR.

makVrv::DtInstanceContainer::DtInstanceContainer ( const DtInstanceContainer )
privatedelete

not allowed

Member Function Documentation

DtInstanceContainer& makVrv::DtInstanceContainer::operator= ( const DtInstanceContainer )
privatedelete

not allowed

virtual void makVrv::DtInstanceContainer::addInstance ( const int  modelId,
const DtPerGeomInstances perGeomInstancesTemplate,
int  geometryLocations,
int  lightSourceCount,
int outPerGeomTemplateOffset,
int outNumGeoms,
int outInstanceIndex 
)
virtual

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.

virtual bool makVrv::DtInstanceContainer::removeInstance ( int  instanceId)
virtual

remove an instance with a given id

virtual bool makVrv::DtInstanceContainer::hasInstance ( int  instanceId) const
virtual

has an instance with a given id?

virtual const DtReusablePerGeomInstances& makVrv::DtInstanceContainer::perGeomInstances ( void  ) const
virtual

gets unique geometry Instance data like switch states. (const)

virtual DtReusablePerGeomInstances& makVrv::DtInstanceContainer::perGeomInstances ( void  )
virtual

gets unique geometry Instance data like switch states. (non-const)

virtual void makVrv::DtInstanceContainer::printPerGeomInstances ( ) const
virtual

For debugging. Print the contents.

virtual int makVrv::DtInstanceContainer::numValidInstances ( void  ) const
virtual

the number of (valid) instances

virtual int makVrv::DtInstanceContainer::numUniqueGeometriesForModel ( int  modelId) const
virtual

get the number of unique geometries that a particular model has

virtual int makVrv::DtInstanceContainer::numUniqueGeometries ( ) const
virtual

tracks how many unique geometries there are, for use in buffer memory management.

virtual bool makVrv::DtInstanceContainer::instanceEverAdded ( void  ) const
virtual

was an instance ever added? not the same as numValidInstances()

virtual const DtIndirectOffsetAndSize& makVrv::DtInstanceContainer::perGeomInstanceOffsetAndSize ( int  instanceId) const
virtual

access the per geom instance offset and size vector

virtual void makVrv::DtInstanceContainer::incrementNumUniqueGeometries ( int  number)
virtual

adds number to myNumUniqueGeometries

virtual const std::vector<int>& makVrv::DtInstanceContainer::modelAddedOrder ( ) const
virtual

get the vector of model ids in the order that they were added

virtual unsigned int makVrv::DtInstanceContainer::maxNumLightSources ( ) const
virtual

get the maximum number of light sources that can possibly be rendered by this container

Member Data Documentation

MapIntToInt makVrv::DtInstanceContainer::myModelIdToGeomOffset
protected

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.

SetInts makVrv::DtInstanceContainer::myUniqueModels
protected

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.

VectorInts makVrv::DtInstanceContainer::myModelAddedOrder
protected

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.

MapIntToInt makVrv::DtInstanceContainer::myModelIdToGeometryCount
protected

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.

int makVrv::DtInstanceContainer::myNumUniqueGeometries
protected

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.

MapInstanceIdToPerGeomInstanceOffsetAndSize makVrv::DtInstanceContainer::myMapInstanceIdToPerGeomInstanceOffsetAndSize
protected

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.

MapInstanceIdToNumLightSources makVrv::DtInstanceContainer::myMapInstanceIdToNumLightSources
protected

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.

int makVrv::DtInstanceContainer::myRunningInstanceId
protected

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.

int makVrv::DtInstanceContainer::myNumValidInstances
protected

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.

DtReusablePerGeomInstances makVrv::DtInstanceContainer::myPerGeomInstances
protected

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.

unsigned int makVrv::DtInstanceContainer::myMaxNumLightSources
protected

Add, remove, access instances addInstance also creates the perGeomInstances needed and returns the number of per geom instances that were created and the offset into the perGeomInstance vector.


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

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)