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 Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes
makVrv::DtDebugShapes Class Reference

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
 
DtDebugShapesoperator= (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 DtGeom3dLinesComponentaddMultiLine (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 &center, 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 &center, 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

DtDemyDe
 
DtSignalConnectionManager myConnections
 
double myLastSimulationTime
 
LineSet myLineSet
 
MultiLineSet myMultiLineSet
 
BoxSet myBoxSet
 
SphereSet mySphereSet
 

Private Attributes

friend DtDebugShapesCreator
 

Member Typedef Documentation

Constructor & Destructor Documentation

virtual makVrv::DtDebugShapes::~DtDebugShapes ( )
virtual
makVrv::DtDebugShapes::DtDebugShapes ( )
delete

Default Constructor not implemented.

makVrv::DtDebugShapes::DtDebugShapes ( const DtDebugShapes other)
delete

Copy Constructor not implemented - Copy not allowed.

makVrv::DtDebugShapes::DtDebugShapes ( DtDe de)
protected

Protected CTOR Create using DtDebugShapesCreator.

Member Function Documentation

DtDebugShapes& makVrv::DtDebugShapes::operator= ( const DtDebugShapes other)
delete

Assignment Operator not implemented - Assignment not allowed.

virtual void makVrv::DtDebugShapes::addLine ( const std::string  name,
const Vector3_64 point0,
const Vector3_64 point1,
const Vector4_32 color,
float  aliveTime = 5.0f 
)
virtual

Adds a line object to be rendered.

Parameters
nameThe name of the object
point0The start position of the line
point1The end position of the line
colorThe rgba (0.0 - 1.0) color of the line
aliveTimeHow long the object will be rendered
virtual void makVrv::DtDebugShapes::removeLine ( const std::string  name)
virtual

Removes a line object.

Parameters
nameThe name of the object
virtual DtGeom3dLinesComponent* makVrv::DtDebugShapes::addMultiLine ( const std::string  name,
float  aliveTime = 5.0f 
)
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.

Parameters
nameThe name of the object
aliveTimeHow long the object will be rendered
virtual void makVrv::DtDebugShapes::removeMultiLine ( const std::string  name)
virtual

Removes a multiline object.

Parameters
nameThe name of the object
virtual void makVrv::DtDebugShapes::addBox ( const std::string  name,
const Vector3_64 center,
const Matrix3_32 rotation,
const Vector3_32 size,
const Vector4_32 color,
float  aliveTime = 5.0f 
)
virtual

Adds a box object to be rendered.

Parameters
nameThe name of the object
centerThe center position of the box
sizeThe size of the box in (x, y, z)
rotationThe rotation of the box
colorThe rgba (0.0 - 1.0) color of the box
aliveTimeHow long the object will be rendered
virtual void makVrv::DtDebugShapes::removeBox ( const std::string  name)
virtual

Removes a box object.

Parameters
nameThe name of the object
virtual void makVrv::DtDebugShapes::addSphere ( const std::string  name,
const Vector3_64 center,
float  radius,
const Vector4_32 color,
float  aliveTime = 5.0f 
)
virtual

Adds a sphere object to be rendered.

Parameters
nameThe name of the object
centerThe center position of the sphere
radiusThe radius of the sphere
colorThe rgba (0.0 - 1.0) color of the box
aliveTimeHow long the object will be rendered
virtual void makVrv::DtDebugShapes::removeSphere ( const std::string  name)
virtual

Removes a sphere object.

Parameters
nameThe name of the object
virtual void makVrv::DtDebugShapes::updateLines ( double  timeStep)
protectedvirtual

Updates timouts for lines.

virtual void makVrv::DtDebugShapes::updateMultiLines ( double  timeStep)
protectedvirtual

Updates timouts for multilines.

virtual void makVrv::DtDebugShapes::updateBoxes ( double  timeStep)
protectedvirtual

Updates timouts for boxes.

virtual void makVrv::DtDebugShapes::updateSpheres ( double  timeStep)
protectedvirtual

Updates timouts for spheres.

virtual void makVrv::DtDebugShapes::slot_preTick ( )
protectedvirtual

Pre tick function. This is currently used to flush invalid camera's.

Member Data Documentation

friend makVrv::DtDebugShapes::DtDebugShapesCreator
private
DtDe& makVrv::DtDebugShapes::myDe
protected
DtSignalConnectionManager makVrv::DtDebugShapes::myConnections
protected
double makVrv::DtDebugShapes::myLastSimulationTime
protected
LineSet makVrv::DtDebugShapes::myLineSet
protected
MultiLineSet makVrv::DtDebugShapes::myMultiLineSet
protected
BoxSet makVrv::DtDebugShapes::myBoxSet
protected
SphereSet makVrv::DtDebugShapes::mySphereSet
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)