![]() |
VR-Forces Developer's Guide
|
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 |
|
strong |
| makVrv::DtIndirectRenderingSystemTest::DtIndirectRenderingSystemTest | ( | DtDe & | de | ) |
|
virtual |
|
delete |
not allowed
|
delete |
not allowed
|
delete |
not allowed
|
static |
Returns a description for the given test type.
|
virtual |
Starts the given test type.
|
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 |
Applies the given test control to the running test. Filters to the appropriate internal apply method based on test type.
|
virtual |
Updates the currently running test.
|
virtual |
Returns the currently running test type.
|
protectedvirtual |
Creates and saves a checkered image to file.
| filename | The output filename. |
| imageSize | The size of the image in pixels (image is square). |
| blockSize | The size of each checkered block in pixels. |
|
protected |
Creates a test image if needed and returns the filename. The image is stored in the application cache.
|
protectedvirtual |
Loads a texture from file.
|
protectedvirtual |
Creates a box model with the given color.
|
protectedvirtual |
Creates a simple test model for the rendering test.
|
protectedvirtual |
Creates an entity test model for the entity rendering test. The model includes a multi-switch for damage states, and a DOF.
|
protectedvirtual |
Finds the root group node for the renderer's scene graph.
|
protectedvirtual |
Computes and returns a trasnform in front of the observer for a test instance.
|
protectedvirtual |
Finds the switch ID for the given switch name in the entity test model parser.
|
protectedvirtual |
Sets the switch state for the given switch name in the entity test model parser.
|
protectedvirtual |
Starts the rendering test.
|
protectedvirtual |
Starts the entity rendering test.
|
protectedvirtual |
Applies the given test control for damage state to the running test.
|
protectedvirtual |
Applies the given test control for DOF velocity to the running test.
|
protectedvirtual |
Applies the given test control for UV scroll to the running test.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |