iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Public Attributes | List of all members
imstk::OctreePrimitive Struct Reference

The OctreePrimitive struct For each octree primitive (point/triangle/analytical geometry), store its relevant data. More...

#include <imstkLooseOctree.h>

Collaboration diagram for imstk::OctreePrimitive:
Collaboration graph
[legend]

Public Member Functions

 OctreePrimitive (const OctreePrimitive &)=delete
 
OctreePrimitiveoperator= (const OctreePrimitive &)=delete
 
 OctreePrimitive (Geometry *const pGeometry, const uint32_t geomIdx, const uint32_t idx=0)
 

Public Attributes

Geometry *const m_pGeometry
 Pointer to the parent geometry that the primitive belong to.
 
const uint32_t m_GeomIdx
 Global index of the parent geometry.
 
const uint32_t m_Idx
 Index of the primitive in the parent geometry (such as index of the triangle in a mesh)
 
OctreeNodem_pNode = nullptr
 Pointer to the octree node containing the primitive.
 
OctreePrimitivem_pNext = nullptr
 Pointer to the next node in the primitive list of the octree node.
 
union {
   std::array< double, 3 >   m_Position
 For a point primitive, store its position.
 
   struct {
      std::array< double, 3 >   m_LowerCorner
 For a non-point primitive, store its AABB's lower corner.
 
      std::array< double, 3 >   m_UpperCorner
 For a non-point primitive, store its AABB's upper corner.
 
   } 
 
}; 
 
bool m_bValid = true
 

Detailed Description

The OctreePrimitive struct For each octree primitive (point/triangle/analytical geometry), store its relevant data.

Definition at line 43 of file imstkLooseOctree.h.

Member Data Documentation

◆ m_bValid

bool imstk::OctreePrimitive::m_bValid = true

Flag to keep track of primitive validity During tree update, set it to true if the primitive is still contained in the tree node that it has previously been inserted to and: 1) The depth of current node reaches maxDepth, or 1) The primitive straddles over multiple children nodes thus it cannot be passed down further to any child node

Definition at line 74 of file imstkLooseOctree.h.


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