![]() |
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 |
| virtual void | addLine (const std::string name, const Vector3_64 &point0, const Vector3_64 &point1, const Vector4_32 &color, float aliveTime=5.0f) |
| virtual void | removeLine (const std::string name) |
| virtual DtGeom3dLinesComponent * | addMultiLine (const std::string name, float aliveTime=5.0f) |
| virtual void | removeMultiLine (const std::string name) |
| virtual void | addBox (const std::string name, const Vector3_64 ¢er, const Matrix3_32 &rotation, const Vector3_32 &size, const Vector4_32 &color, float aliveTime=5.0f) |
| virtual void | removeBox (const std::string name) |
| virtual void | addSphere (const std::string name, const Vector3_64 ¢er, float radius, const Vector4_32 &color, float aliveTime=5.0f) |
| virtual void | removeSphere (const std::string name) |
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.
|
virtual |
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 |
|
virtual |
Removes a line object.
| name | The name of the object |
|
virtual |
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 |
|
virtual |
Removes a multiline object.
| name | The name of the object |
|
virtual |
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 |
|
virtual |
Removes a box object.
| name | The name of the object |
|
virtual |
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 |
|
virtual |
Removes a sphere object.
| name | The name of the object |
|
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 |