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

Class for testing the indirect rendering system.

This class is for low level testing of the indirect rendering system only. It's meant to be used by developers to verify core indirect rendering system functionality. For example, checking shaders, new added functionality, basic operations, etc.

Feel free to add more test types as needed.

This class is used by DtIndirectRunTimeSettings to run tests from an imgui interface.

Classes

struct  TestControl
 

Public Types

enum  TestType { TestType::None, TestType::Rendering, TestType::EntityRendering }
 
enum  TestControlType { TestControlType::DamageState, TestControlType::DofVelocity, TestControlType::UvScroll }
 
enum  TestControlGuiType { TestControlGuiType::CheckBox }
 

Public Member Functions

 DtIndirectRenderingSystemTest (DtDe &de)
 
virtual ~DtIndirectRenderingSystemTest ()
 
 DtIndirectRenderingSystemTest ()=delete
 
DtIndirectRenderingSystemTest & operator= (const DtIndirectRenderingSystemTest &rhs)=delete
 
 DtIndirectRenderingSystemTest (const DtIndirectRenderingSystemTest &rhs)=delete
 
virtual void startTest (DtIndirectRenderingSystemTest::TestType type)
 
virtual std::vector
< DtIndirectRenderingSystemTest::TestControl > & 
testControls ()
 
virtual void applyTestControl (const DtIndirectRenderingSystemTest::TestControl &control)
 
virtual void update (const float timestep)
 
virtual
DtIndirectRenderingSystemTest::TestType 
runningTestType () const
 

Static Public Member Functions

static const std::string getTestDescription (DtIndirectRenderingSystemTest::TestType testType)
 

Protected Member Functions

virtual void createAndSaveCheckeredImage (const std::string &filename, int imageSize, int blockSize) const
 
const std::string createTestImage () const
 
virtual osg::Texture2D * loadTexture (const std::string &filename) const
 
virtual osg::Group * createBoxModel (int renderBin, const std::string &renderBinName, const osg::Vec4 &color) const
 
virtual osg::Group * createSimpleTestModel (int renderBin, const std::string &renderBinName) const
 
virtual osg::Group * createEntityTestModel (int renderBin, const std::string &renderBinName) const
 
virtual osg::Group * findRendererRootGroup ()
 
virtual const osg::Matrixd computeSpawnTransform () const
 
virtual int findEntityModelSwitchIdByName (const std::string &switchName) const
 
virtual void setEntityModelSwitch (const std::string &switchName, int stateValue)
 
virtual void startRenderingTest ()
 
virtual void startEntityRenderingTest ()
 
virtual void applyTestControlDamageState (const DtIndirectRenderingSystemTest::TestControl &control)
 
virtual void applyTestControlDofVelocity (const DtIndirectRenderingSystemTest::TestControl &control)
 
virtual void applyTestControlUvScroll (const DtIndirectRenderingSystemTest::TestControl &control)
 

Protected Attributes

DtDe & myDe
 
DtIndirectRenderingSystemTest::TestType myRunningTestType
 
std::vector< TestControl > myTestControls
 
DtIndirectLimitTextureStrategy * myLimitTextureStrategy
 
osg::ref_ptr
< DtIndirectGeometryRegistrar > 
myIndirectGeometryRegistrar
 
osg::ref_ptr< DtIndirectGeometry > myIndirectGeometry
 
osg::ref_ptr< osg::Group > myMasterModelRoot
 
osg::ref_ptr< osg::Group > mySceneRoot
 
std::map< int, DtModelInfo * > myModelIdToInfoMap
 
int myNextModelId
 
DtUniqueID myEntityId
 
std::unique_ptr
< DtOsgModelInstance > 
myEntityModelInstance
 
std::unique_ptr
< DtArticulatedModelParser > 
myEntityModelCloneParser
 
bool myEntityEnableUvScroll
 

Member Enumeration Documentation

Enum for selecting the indirect system test type.

Enumerator
None 
Rendering 
EntityRendering 

Enum for test control types.

Enumerator
DamageState 
DofVelocity 
UvScroll 

Enum for what gui type a test control uses.

Enumerator
CheckBox 

Constructor & Destructor Documentation

makVrv::DtIndirectRenderingSystemTest::DtIndirectRenderingSystemTest ( DtDe &  de)
virtual makVrv::DtIndirectRenderingSystemTest::~DtIndirectRenderingSystemTest ( )
virtual
makVrv::DtIndirectRenderingSystemTest::DtIndirectRenderingSystemTest ( )
delete

not allowed

makVrv::DtIndirectRenderingSystemTest::DtIndirectRenderingSystemTest ( const DtIndirectRenderingSystemTest &  rhs)
delete

not allowed

Member Function Documentation

DtIndirectRenderingSystemTest& makVrv::DtIndirectRenderingSystemTest::operator= ( const DtIndirectRenderingSystemTest &  rhs)
delete

not allowed

static const std::string makVrv::DtIndirectRenderingSystemTest::getTestDescription ( DtIndirectRenderingSystemTest::TestType  testType)
static

Returns a description for the given test type.

virtual void makVrv::DtIndirectRenderingSystemTest::startTest ( DtIndirectRenderingSystemTest::TestType  type)
virtual

Starts the given test type.

virtual std::vector<DtIndirectRenderingSystemTest::TestControl>& makVrv::DtIndirectRenderingSystemTest::testControls ( )
virtual

Returns all active test controls (modifiable). This is used to populate gui controls for the test. startTest must be called prior to this returning any controls.

virtual void makVrv::DtIndirectRenderingSystemTest::applyTestControl ( const DtIndirectRenderingSystemTest::TestControl &  control)
virtual

Applies the given test control to the running test. Filters to the appropriate internal apply method based on test type.

virtual void makVrv::DtIndirectRenderingSystemTest::update ( const float  timestep)
virtual

Updates the currently running test.

virtual DtIndirectRenderingSystemTest::TestType makVrv::DtIndirectRenderingSystemTest::runningTestType ( ) const
virtual

Returns the currently running test type.

virtual void makVrv::DtIndirectRenderingSystemTest::createAndSaveCheckeredImage ( const std::string &  filename,
int  imageSize,
int  blockSize 
) const
protectedvirtual

Creates and saves a checkered image to file.

Parameters
filenameThe output filename.
imageSizeThe size of the image in pixels (image is square).
blockSizeThe size of each checkered block in pixels.
const std::string makVrv::DtIndirectRenderingSystemTest::createTestImage ( ) const
protected

Creates a test image if needed and returns the filename. The image is stored in the application cache.

virtual osg::Texture2D* makVrv::DtIndirectRenderingSystemTest::loadTexture ( const std::string &  filename) const
protectedvirtual

Loads a texture from file.

virtual osg::Group* makVrv::DtIndirectRenderingSystemTest::createBoxModel ( int  renderBin,
const std::string &  renderBinName,
const osg::Vec4 &  color 
) const
protectedvirtual

Creates a box model with the given color.

virtual osg::Group* makVrv::DtIndirectRenderingSystemTest::createSimpleTestModel ( int  renderBin,
const std::string &  renderBinName 
) const
protectedvirtual

Creates a simple test model for the rendering test.

virtual osg::Group* makVrv::DtIndirectRenderingSystemTest::createEntityTestModel ( int  renderBin,
const std::string &  renderBinName 
) const
protectedvirtual

Creates an entity test model for the entity rendering test. The model includes a multi-switch for damage states, and a DOF.

virtual osg::Group* makVrv::DtIndirectRenderingSystemTest::findRendererRootGroup ( )
protectedvirtual

Finds the root group node for the renderer's scene graph.

virtual const osg::Matrixd makVrv::DtIndirectRenderingSystemTest::computeSpawnTransform ( ) const
protectedvirtual

Computes and returns a trasnform in front of the observer for a test instance.

virtual int makVrv::DtIndirectRenderingSystemTest::findEntityModelSwitchIdByName ( const std::string &  switchName) const
protectedvirtual

Finds the switch ID for the given switch name in the entity test model parser.

virtual void makVrv::DtIndirectRenderingSystemTest::setEntityModelSwitch ( const std::string &  switchName,
int  stateValue 
)
protectedvirtual

Sets the switch state for the given switch name in the entity test model parser.

virtual void makVrv::DtIndirectRenderingSystemTest::startRenderingTest ( )
protectedvirtual

Starts the rendering test.

virtual void makVrv::DtIndirectRenderingSystemTest::startEntityRenderingTest ( )
protectedvirtual

Starts the entity rendering test.

virtual void makVrv::DtIndirectRenderingSystemTest::applyTestControlDamageState ( const DtIndirectRenderingSystemTest::TestControl &  control)
protectedvirtual

Applies the given test control for damage state to the running test.

virtual void makVrv::DtIndirectRenderingSystemTest::applyTestControlDofVelocity ( const DtIndirectRenderingSystemTest::TestControl &  control)
protectedvirtual

Applies the given test control for DOF velocity to the running test.

virtual void makVrv::DtIndirectRenderingSystemTest::applyTestControlUvScroll ( const DtIndirectRenderingSystemTest::TestControl &  control)
protectedvirtual

Applies the given test control for UV scroll to the running test.

Member Data Documentation

DtDe& makVrv::DtIndirectRenderingSystemTest::myDe
protected
DtIndirectRenderingSystemTest::TestType makVrv::DtIndirectRenderingSystemTest::myRunningTestType
protected
std::vector<TestControl> makVrv::DtIndirectRenderingSystemTest::myTestControls
protected
DtIndirectLimitTextureStrategy* makVrv::DtIndirectRenderingSystemTest::myLimitTextureStrategy
protected
osg::ref_ptr<DtIndirectGeometryRegistrar> makVrv::DtIndirectRenderingSystemTest::myIndirectGeometryRegistrar
protected
osg::ref_ptr<DtIndirectGeometry> makVrv::DtIndirectRenderingSystemTest::myIndirectGeometry
protected
osg::ref_ptr<osg::Group> makVrv::DtIndirectRenderingSystemTest::myMasterModelRoot
protected
osg::ref_ptr<osg::Group> makVrv::DtIndirectRenderingSystemTest::mySceneRoot
protected
std::map<int, DtModelInfo*> makVrv::DtIndirectRenderingSystemTest::myModelIdToInfoMap
protected
int makVrv::DtIndirectRenderingSystemTest::myNextModelId
protected
DtUniqueID makVrv::DtIndirectRenderingSystemTest::myEntityId
protected
std::unique_ptr<DtOsgModelInstance> makVrv::DtIndirectRenderingSystemTest::myEntityModelInstance
protected
std::unique_ptr<DtArticulatedModelParser> makVrv::DtIndirectRenderingSystemTest::myEntityModelCloneParser
protected
bool makVrv::DtIndirectRenderingSystemTest::myEntityEnableUvScroll
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)