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

OctreeDebugModel for debug visualizing an octree. More...

#include <OctreeDebugModel.h>

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

Public Member Functions

void debugUpdate (int maxDisplayDepth, bool drawNonEmptyParents=true)
 Update the geometry. More...
 
void setInputOctree (std::shared_ptr< LooseOctree > octree)
 
- Public Member Functions inherited from imstk::DebugGeometryModel
 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

bool updateGeom (OctreeNode *node)
 Recursively update debug geometry by adding lines drawing bounding boxes of the active nodes. More...
 
- Protected Member Functions inherited from imstk::DebugGeometryModel
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

std::shared_ptr< LooseOctreem_looseOctree
 
int m_maxDisplayDepth
 Maximum level of nodes that will be rendered during debug rendering.
 
bool m_drawNonEmptyParents
 
- Protected Attributes inherited from imstk::DebugGeometryModel
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

OctreeDebugModel for debug visualizing an octree.

Definition at line 21 of file OctreeDebugModel.h.

Member Function Documentation

◆ debugUpdate()

void imstk::OctreeDebugModel::debugUpdate ( int  maxDisplayDepth,
bool  drawNonEmptyParents = true 
)

Update the geometry.

Parameters
Maxdepth to display

Definition at line 106 of file OctreeDebugModel.cpp.

Here is the call graph for this function:

◆ updateGeom()

bool imstk::OctreeDebugModel::updateGeom ( OctreeNode node)
protected

Recursively update debug geometry by adding lines drawing bounding boxes of the active nodes.

Returns
True if debug lines have been added to visualize the bounding box of the current node

Definition at line 13 of file OctreeDebugModel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

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