![]() |
VR-Forces Developer's Guide
|
This class can be used to help you visually debug lines and boxes.
You can access this class from DtRenderer (de.renderer().debugShapes()). It's expected that methods will only be called from the main thread. If other threads are needed in the future, we could extend this class with a multithread queue. Currently geometry will only be visible in stealth view. This could also be changed if needed by adding more DtGeom3dLinesComponent objects for each DtModelSetId, or by adding multiple versions of this class, accessable by the renderer, that take in the DtModelSetId.
The basic use of this class is to call one of the methods to add some geometry associated with a name. The geometry will render for the amount of time that you specify (default is 5.0 seconds). A simple case would be to add a line using the addLine method. All methods currently take in VRV "local" (not network) coordinates.
Classes | |
| struct | BoxSet |
| struct | CaseInsensitiveUnorderedMap |
| struct | DtDebugBox |
| struct | DtDebugLine |
| struct | DtDebugMultiLine |
| struct | DtDebugSphere |
| struct | LineSet |
| struct | MultiLineSet |
| struct | SphereSet |
Public Member Functions | |
| virtual | ~DtDebugShapes () |
| DtDebugShapes ()=delete | |
| DtDebugShapes (const DtDebugShapes &other)=delete | |
| DtDebugShapes & | operator= (const DtDebugShapes &other)=delete |
| void | addLine (const char *name, const DtVector3< double > &point0, const DtVector3< double > &point1, const DtVector4< float > &color, float aliveTime=5.0f) |
| DtGeom3dLinesComponent * | addMultiLine (const char *name, float aliveTime=5.0f) |
| void | addBox (const char *name, const DtVector3< double > ¢er, const DtMatrix3< float > &rotation, const DtVector3< float > &size, const DtVector4< float > &color, float aliveTime=5.0f) |
| void | addSphere (const char *name, const DtVector3< double > ¢er, float radius, const DtVector4< float > &color, float aliveTime=5.0f) |
Protected Types | |
| typedef std::unordered_map < std::string, DtDebugLine, CaseInsensitiveUnorderedMap::hash, CaseInsensitiveUnorderedMap::comp > | LineMap |
| typedef std::unordered_map < std::string, DtDebugMultiLine, CaseInsensitiveUnorderedMap::hash, CaseInsensitiveUnorderedMap::comp > | MultiLineMap |
| typedef std::unordered_map < std::string, DtDebugBox, CaseInsensitiveUnorderedMap::hash, CaseInsensitiveUnorderedMap::comp > | BoxMap |
| typedef std::unordered_map < std::string, DtDebugSphere, CaseInsensitiveUnorderedMap::hash, CaseInsensitiveUnorderedMap::comp > | SphereMap |
Protected Member Functions | |
| DtDebugShapes (DtDe &de) | |
| virtual void | updateLines (double timeStep) |
| virtual void | updateMultiLines (double timeStep) |
| virtual void | updateBoxes (double timeStep) |
| virtual void | updateSpheres (double timeStep) |
| virtual void | slot_preTick () |
Protected Attributes | |
| DtDe & | myDe |
| DtSignalConnectionManager | myConnections |
| double | myLastSimulationTime |
| LineSet | myLineSet |
| MultiLineSet | myMultiLineSet |
| BoxSet | myBoxSet |
| SphereSet | mySphereSet |
Private Attributes | |
| friend | DtDebugShapesCreator |
|
protected |
|
protected |
|
protected |
|
protected |
|
virtual |
|
delete |
Default Constructor not implemented.
|
delete |
Copy Constructor not implemented - Copy not allowed.
|
protected |
Protected CTOR Create using DtDebugShapesCreator.
|
delete |
Assignment Operator not implemented - Assignment not allowed.
| void makVrv::DtDebugShapes::addLine | ( | const char * | name, |
| const DtVector3< double > & | point0, | ||
| const DtVector3< double > & | point1, | ||
| const DtVector4< float > & | color, | ||
| float | aliveTime = 5.0f |
||
| ) |
Adds a line object to be rendered.
| name | The name of the object |
| point0 | The start position of the line |
| point1 | The end position of the line |
| color | The rgba (0.0 - 1.0) color of the line |
| aliveTime | How long the object will be rendered |
| DtGeom3dLinesComponent* makVrv::DtDebugShapes::addMultiLine | ( | const char * | name, |
| float | aliveTime = 5.0f |
||
| ) |
Adds a multiline object to be rendered. Resets the named object and returns the lines component for the user to fill in. The returned object should be considered temporary.
| name | The name of the object |
| aliveTime | How long the object will be rendered |
| void makVrv::DtDebugShapes::addBox | ( | const char * | name, |
| const DtVector3< double > & | center, | ||
| const DtMatrix3< float > & | rotation, | ||
| const DtVector3< float > & | size, | ||
| const DtVector4< float > & | color, | ||
| float | aliveTime = 5.0f |
||
| ) |
Adds a box object to be rendered.
| name | The name of the object |
| center | The center position of the box |
| size | The size of the box in (x, y, z) |
| rotation | The rotation of the box |
| color | The rgba (0.0 - 1.0) color of the box |
| aliveTime | How long the object will be rendered |
| void makVrv::DtDebugShapes::addSphere | ( | const char * | name, |
| const DtVector3< double > & | center, | ||
| float | radius, | ||
| const DtVector4< float > & | color, | ||
| float | aliveTime = 5.0f |
||
| ) |
Adds a sphere object to be rendered.
| name | The name of the object |
| center | The center position of the sphere |
| radius | The radius of the sphere |
| color | The rgba (0.0 - 1.0) color of the box |
| aliveTime | How long the object will be rendered |
|
protectedvirtual |
Updates timouts for lines.
|
protectedvirtual |
Updates timouts for multilines.
|
protectedvirtual |
Updates timouts for boxes.
|
protectedvirtual |
Updates timouts for spheres.
|
protectedvirtual |
Pre tick function. This is currently used to flush invalid camera's.
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |