Rhino C++ API  7.21
Public Member Functions | Public Attributes | List of all members
ON_MeshTreeNode Class Reference

#include <opennurbs_plus.h>

Inheritance diagram for ON_MeshTreeNode:
ON_MeshTree

Public Member Functions

 ON_MeshTreeNode ()
 
const ON_MeshTreeNodeFindNode (int mesh_face_index) const
 
bool GetClosestPoint (const ON_3dPoint &P, ON_MESH_POINT *t, double maximum_distance=0.0) const
 See ON_CurveTreeNode for working example. More...
 
int IntersectLine (ON_Line line, ON_SimpleArray< ON_CMX_EVENT > &x, double intersection_tolerance=0.0, double overlap_tolerance=0.0) const
 
int IntersectMesh (const class ON_MeshTreeNode *mnodeB, ON_ClassArray< ON_SimpleArray< ON_MMX_POINT > > &x, double intersection_tolerance=0.0, double overlap_tolerance=0.0) const
 slow and careful More...
 
int IntersectMesh (const class ON_MeshTreeNode *mnodeB, ON_SimpleArray< ON_Line > &lines) const
 fast and sloppy More...
 
int IntersectPolyline (const int &count, const ON_3dPoint *points, ON_SimpleArray< ON_CMX_EVENT > &x, double intersection_tolerance=0.0, double overlap_tolerance=0.0) const
 
int IntersectPolyline (const ON_SimpleArray< ON_3dPoint > &points, ON_SimpleArray< ON_CMX_EVENT > &x, double intersection_tolerance=0.0, double overlap_tolerance=0.0) const
 
bool IsValid (ON_TextLog *text_log=0) const
 

Public Attributes

ON_BoundingBox m_bbox
 
ON_MeshTreeNodem_down [2]
 
const int * m_farray
 
int m_fcount
 never free or delete this pointer. More...
 
const ON_Meshm_mesh
 
unsigned char m_nodemem
 
unsigned int m_nodesn
 serial number of this node More...
 
unsigned char m_nodetype
 Memory managment accounting information. More...
 
unsigned char m_reserved_ON_MeshTreeNode [6]
 4 byte pointers More...
 
unsigned int m_treesn
 serial number of this tree More...
 
ON_MeshTreeNodem_up
 

Constructor & Destructor Documentation

◆ ON_MeshTreeNode()

ON_MeshTreeNode::ON_MeshTreeNode ( )

Member Function Documentation

◆ FindNode()

const ON_MeshTreeNode* ON_MeshTreeNode::FindNode ( int  mesh_face_index) const

Description: This is a debugging function. It is slow. Starting at this node, find the node that contains the specified mesh face. Parameters: mesh_face_index - [in] ON_Mesh m_F[] array index Returns: Pointer to the node that contains the specified face.

◆ GetClosestPoint()

bool ON_MeshTreeNode::GetClosestPoint ( const ON_3dPoint P,
ON_MESH_POINT t,
double  maximum_distance = 0.0 
) const

See ON_CurveTreeNode for working example.

◆ IntersectLine()

int ON_MeshTreeNode::IntersectLine ( ON_Line  line,
ON_SimpleArray< ON_CMX_EVENT > &  x,
double  intersection_tolerance = 0.0,
double  overlap_tolerance = 0.0 
) const

◆ IntersectMesh() [1/2]

int ON_MeshTreeNode::IntersectMesh ( const class ON_MeshTreeNode mnodeB,
ON_ClassArray< ON_SimpleArray< ON_MMX_POINT > > &  x,
double  intersection_tolerance = 0.0,
double  overlap_tolerance = 0.0 
) const

slow and careful

◆ IntersectMesh() [2/2]

int ON_MeshTreeNode::IntersectMesh ( const class ON_MeshTreeNode mnodeB,
ON_SimpleArray< ON_Line > &  lines 
) const

fast and sloppy

◆ IntersectPolyline() [1/2]

int ON_MeshTreeNode::IntersectPolyline ( const int &  count,
const ON_3dPoint points,
ON_SimpleArray< ON_CMX_EVENT > &  x,
double  intersection_tolerance = 0.0,
double  overlap_tolerance = 0.0 
) const

◆ IntersectPolyline() [2/2]

int ON_MeshTreeNode::IntersectPolyline ( const ON_SimpleArray< ON_3dPoint > &  points,
ON_SimpleArray< ON_CMX_EVENT > &  x,
double  intersection_tolerance = 0.0,
double  overlap_tolerance = 0.0 
) const

◆ IsValid()

bool ON_MeshTreeNode::IsValid ( ON_TextLog text_log = 0) const

Member Data Documentation

◆ m_bbox

ON_BoundingBox ON_MeshTreeNode::m_bbox

◆ m_down

ON_MeshTreeNode* ON_MeshTreeNode::m_down[2]

◆ m_farray

const int* ON_MeshTreeNode::m_farray

array of indices of faces in this node (null if m_fcount is 0)

◆ m_fcount

int ON_MeshTreeNode::m_fcount

never free or delete this pointer.

number of faces in m_farray[] (can be 0)

◆ m_mesh

const ON_Mesh* ON_MeshTreeNode::m_mesh

◆ m_nodemem

unsigned char ON_MeshTreeNode::m_nodemem

0 = do not destroy 1 = destroy with delete 2 = destroy with free

◆ m_nodesn

unsigned int ON_MeshTreeNode::m_nodesn

serial number of this node

◆ m_nodetype

unsigned char ON_MeshTreeNode::m_nodetype

Memory managment accounting information.

8 bits to flag special nodes 1 = root node 2 = meta node (no domain) 4 = reparam

◆ m_reserved_ON_MeshTreeNode

unsigned char ON_MeshTreeNode::m_reserved_ON_MeshTreeNode[6]

4 byte pointers

pad class size to a multiple of 8 bytes so custom allocator can keeps doubles and pointers properly aligned and safely use memset()/memcpy() on compilers that reuse tail-padding.

◆ m_treesn

unsigned int ON_MeshTreeNode::m_treesn

serial number of this tree

◆ m_up

ON_MeshTreeNode* ON_MeshTreeNode::m_up