iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
imstk::DebugGeometryModel Class Reference

Class for quickly rendering and showing various primivites such as line segments, triangles, arrows, points. More...

#include <imstkDebugGeometryModel.h>

Inheritance diagram for imstk::DebugGeometryModel:
Inheritance graph
[legend]
Collaboration diagram for imstk::DebugGeometryModel:
Collaboration graph
[legend]

Public Member Functions

 DebugGeometryModel (const std::string &name="DebugGeometryModel")
 
void addLine (const Vec3d &a, const Vec3d &b)
 Adds a line to the debug lines with default color.
 
void addLine (const Vec3d &a, const Vec3d &b, const Color &color)
 Adds a line to the debug lines with specified color.
 
void addTriangle (const Vec3d &a, const Vec3d &b, const Vec3d &c)
 Adds a triangle to the debug triangles with default color.
 
void addTriangle (const Vec3d &a, const Vec3d &b, const Vec3d &c, const Color &color)
 Adds a triangle to the debug triangles with specified color.
 
void addPoint (const Vec3d &a)
 Adds a point to the debug points. More...
 
void addPoint (const Vec3d &a, const Color &color)
 Adds a point to the debug points. More...
 
void addArrow (const Vec3d &start, const Vec3d &end)
 Adds an arrow to the debug arrows. More...
 
void addArrow (const Vec3d &start, const Vec3d &end, const Color &color)
 Adds an arrow to the debug arrows. More...
 
void clear ()
 Clears all primitives.
 
std::shared_ptr< RenderMaterialgetPointMaterial () const
 Accessors.
 
std::shared_ptr< RenderMaterialgetLineMaterial () const
 
std::shared_ptr< RenderMaterialgetFaceMaterial () const
 
void visualUpdate (const double &dt) override
 Update the primitives.
 
void setLineWidth (const double width)
 
void setTriColor (const Color &color)
 
void setLineColor (const Color &color)
 
void setPointColor (const Color &color)
 
void setArrowColor (const Color &color)
 
void setPointSize (const double size)
 
void setArrowScale (const double arrowScale)
 
int getNumPoints () const
 
int getNumLines () const
 
int getNumTriangles () const
 
- Public Member Functions inherited from imstk::Behaviour< UpdateInfo >
virtual void update (const UpdateInfo &imstkNotUsed(updateData))
 
virtual void visualUpdate (const UpdateInfo &imstkNotUsed(updateData))
 
void initTaskGraphEdges ()
 Setup the edges/connections of the TaskGraph.
 
std::shared_ptr< TaskGraphgetTaskGraph () const
 
- Public Member Functions inherited from imstk::Component
const std::string & getName () const
 
void setName (const std::string &name)
 
std::weak_ptr< EntitygetEntity () const
 Get parent entity.
 
void initialize ()
 Initialize the component, called at a later time after all component construction is complete.
 

Protected Member Functions

void init () override
 Initialize the component, called at a later time after all component construction is complete.
 
- Protected Member Functions inherited from imstk::Behaviour< UpdateInfo >
 Behaviour (const std::string &name="Behaviour")
 
 Behaviour (const bool useTaskGraph, const std::string &name="Behaviour")
 
virtual void initGraphEdges (std::shared_ptr< TaskNode > imstkNotUsed(source), std::shared_ptr< TaskNode > imstkNotUsed(sink))
 Setup the edges/connections of the TaskGraph. More...
 
- Protected Member Functions inherited from imstk::Component
 Component (const std::string &name="Component")
 

Protected Attributes

double m_arrowScale
 
Color m_arrowColor
 
std::shared_ptr< VisualModelm_debugLineModel
 
std::shared_ptr< VisualModelm_debugPointModel
 
std::shared_ptr< VisualModelm_debugSurfModel
 
std::shared_ptr< LineMeshm_debugLineMesh
 
std::shared_ptr< PointSetm_debugPointSet
 
std::shared_ptr< SurfaceMeshm_debugSurfMesh
 
std::shared_ptr< VecDataArray< double, 3 > > m_triVerticesPtr
 
std::shared_ptr< VecDataArray< int, 3 > > m_triIndicesPtr
 
std::shared_ptr< VecDataArray< unsigned char, 3 > > m_triColorsPtr
 
bool m_trianglesChanged
 
std::shared_ptr< VecDataArray< double, 3 > > m_lineVerticesPtr
 
std::shared_ptr< VecDataArray< int, 2 > > m_lineIndicesPtr
 
std::shared_ptr< VecDataArray< unsigned char, 3 > > m_lineColorsPtr
 
bool m_linesChanged
 
std::shared_ptr< VecDataArray< double, 3 > > m_pointVerticesPtr
 
std::shared_ptr< VecDataArray< unsigned char, 3 > > m_pointColorsPtr
 
bool m_ptsChanged
 
- Protected Attributes inherited from imstk::Behaviour< UpdateInfo >
std::shared_ptr< TaskGraphm_taskGraph = nullptr
 
- Protected Attributes inherited from imstk::Component
std::string m_name
 
std::weak_ptr< Entitym_entity
 Parent entity this component exists on.
 

Detailed Description

Class for quickly rendering and showing various primivites such as line segments, triangles, arrows, points.

Todo:
: Allow per vertex and per cell coloring

Definition at line 29 of file imstkDebugGeometryModel.h.

Member Function Documentation

◆ addArrow() [1/2]

void imstk::DebugGeometryModel::addArrow ( const Vec3d &  start,
const Vec3d &  end 
)

Adds an arrow to the debug arrows.

Parameters
tailof arrow
tipof arrow

Definition at line 163 of file imstkDebugGeometryModel.cpp.

◆ addArrow() [2/2]

void imstk::DebugGeometryModel::addArrow ( const Vec3d &  start,
const Vec3d &  end,
const Color color 
)

Adds an arrow to the debug arrows.

Parameters
tailof arrow
tipof arrow
colorof the arrow

Definition at line 169 of file imstkDebugGeometryModel.cpp.

Here is the call graph for this function:

◆ addPoint() [1/2]

void imstk::DebugGeometryModel::addPoint ( const Vec3d &  a)

Adds a point to the debug points.

Parameters
pointto add

Definition at line 143 of file imstkDebugGeometryModel.cpp.

◆ addPoint() [2/2]

void imstk::DebugGeometryModel::addPoint ( const Vec3d &  a,
const Color color 
)

Adds a point to the debug points.

Parameters
pointto add
colorof the point

Definition at line 149 of file imstkDebugGeometryModel.cpp.


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