Rhino C++ API  8.14
Public Member Functions | Public Attributes | List of all members
ON_SurfaceTree Class Reference

#include <opennurbs_plus.h>

Inheritance diagram for ON_SurfaceTree:
ON_SurfaceTreeNode

Public Member Functions

 ON_SurfaceTree ()
 
 ~ON_SurfaceTree ()
 
bool CreateTree (const ON_BezierSurface &bez_surface, const ON_Interval *node_sdomain=0, const ON_Interval *node_tdomain=0, int max_span_depth=0, double maxar=0.0)
 
bool CreateTree (const ON_NurbsSurface &nurbs_surface, int max_span_depth=0, double maxar=0.0)
 
bool CreateTreeTrunk (int leaf_count, const ON_SurfaceTreeNode *const *leaves)
 
void DestroyTree ()
 
ON_SurfaceTreeNodeFirstLeaf () const
 First() returns the first leaf interval in the curve tree. More...
 
bool IsValid (ON_TextLog *text_log=0, const class ON_Surface *surface=0) const
 
ON_SurfaceTreeNodeLastLeaf () const
 Last() returns the last leaf interval in the curve tree. More...
 
ON_SurfaceTreeNodeNewLeaf ()
 
ON_SurfaceTreeNodeNewNode ()
 
bool ReturnNode (ON_SurfaceTreeNode *node)
 
ON_SurfaceTreeNodeRoot () const
 
- Public Member Functions inherited from ON_SurfaceTreeNode
 ON_SurfaceTreeNode ()
 
 ~ON_SurfaceTreeNode ()
 
bool AdjustParameter () const
 
ON_SurfaceTreeNodeEastNode () const
 
const ON_SurfaceTreeNodeEvaluate (double s, double t, int der_count, int v_stride, double *v, int quadrant=0) const
 
const ON_SurfaceTreeNodeFindLeaf (double s, double t, int quadrant=0) const
 
const ON_SurfaceTreeNodeGetClosestPoint (ON_3dPoint P, double *s, double *t, ON_3dPoint *closestpt=0, double maximum_distance=0.0, const ON_Interval *sdomain=0, const ON_Interval *tdomain=0) const
 
int IntersectSurface (const class ON_SurfaceTreeNode *snodeB, ON_ClassArray< ON_SSX_EVENT > &x, double intersection_tolerance=0.0, double overlap_tolerance=0.0, double fitting_tolerance=0.0, const ON_Interval *surfaceA_udomain=0, const ON_Interval *surfaceA_vdomain=0, const ON_Interval *surfaceB_udomain=0, const ON_Interval *surfaceB_vdomain=0) const
 
bool IsFartherThan (double d, const ON_3dPoint &P) const
 
bool IsFartherThan (double d, const ON_CurveTreeNode *other) const
 
bool IsFartherThan (double d, const ON_SurfaceTreeNode *other) const
 
bool IsNearSingularity (double s0, double s1) const
 
bool IsNearSingularity (double s0, double s1, int &side, double tol=1e-5) const
 
bool IsValid (ON_TextLog *text_log=0, int level=0, int side=-1, const class ON_Surface *surface=0) const
 
double MaximumDistanceUpperBound (const ON_CurveTreeNode *other) const
 
double MaximumDistanceUpperBound (const ON_SurfaceTreeNode *other) const
 
double MaximumDistanceUpperBound (ON_3dPoint P) const
 
double MinimumDistanceLowerBound (const ON_CurveTreeNode *other) const
 
double MinimumDistanceLowerBound (const ON_SurfaceTreeNode *other) const
 
double MinimumDistanceLowerBound (ON_3dPoint P) const
 
double MinimumDistanceUpperBound (const ON_CurveTreeNode *other) const
 
double MinimumDistanceUpperBound (const ON_SurfaceTreeNode *other) const
 
double MinimumDistanceUpperBound (ON_3dPoint P) const
 
ON_SurfaceTreeNodeNextLeaf () const
 
ON_SurfaceTreeNodeNorthNode () const
 
ON_SurfaceTreeNodePrevLeaf () const
 
ON_SurfaceTreeNodeSouthNode () const
 
bool Split (int dir, double s, ON_SurfaceTreeNode &left_node, ON_SurfaceTreeNode &right_node) const
 
int SplitDir () const
 
ON_SurfaceTreeNodeTreeContaining (const ON_Interval &Urange, const ON_Interval &Vrange) const
 
ON_SurfaceTreeNodeWestNode () const
 

Public Attributes

ON_SurfaceTreeNodem_root
 root node of the binary tree More...
 
- Public Attributes inherited from ON_SurfaceTreeNode
ON_BoundingBox m_bbox
 
ON_SurfaceTreeBezierm_bez
 
unsigned char m_bezmem
 
ON_Interval m_domain [2]
 
ON_SurfaceTreeNodem_down [2]
 
unsigned char m_nodemem
 
unsigned int m_nodesn
 serial number of this node More...
 
unsigned char m_nodetype
 Memory management accounting information. More...
 
unsigned char m_reserved_ON_SurfaceTreeNode [5]
 keep sizeof() a multiple of 16 More...
 
unsigned int m_treesn
 serial number of this tree More...
 
ON_SurfaceTreeNodem_up
 

Constructor & Destructor Documentation

◆ ON_SurfaceTree()

ON_SurfaceTree::ON_SurfaceTree ( )

◆ ~ON_SurfaceTree()

ON_SurfaceTree::~ON_SurfaceTree ( )

Member Function Documentation

◆ CreateTree() [1/2]

bool ON_SurfaceTree::CreateTree ( const ON_BezierSurface bez_surface,
const ON_Interval node_sdomain = 0,
const ON_Interval node_tdomain = 0,
int  max_span_depth = 0,
double  maxar = 0.0 
)

Description: Initialize the tree based on a bezier surface. Parameters: bez_curve - [in] node_sdomain - [in] used to set the node's domain fields. (This does not restrict the portion of the bezier the tree covers.) node_tdomain - [in] used to set the node's domain fields. (This does not restrict the portion of the bezier the tree covers.) max_span_depth - [in] advanced control - use default maxar - [in] advanced control - use default mp - [in] memory pool Returns: True if successful

◆ CreateTree() [2/2]

bool ON_SurfaceTree::CreateTree ( const ON_NurbsSurface nurbs_surface,
int  max_span_depth = 0,
double  maxar = 0.0 
)

Description: Initialize the tree based on a NURBS surface. Parameters: nurbs_surface - [in] max_span_depth - [in] advanced control - use default maxar - [in] advanced control - use default mp - [in] memory pool Returns: True if successful

◆ CreateTreeTrunk()

bool ON_SurfaceTree::CreateTreeTrunk ( int  leaf_count,
const ON_SurfaceTreeNode *const *  leaves 
)

Description: Creates a trunk over a collection of nodes. Useful when calculating intersections and closest points to a group of surfaces. Parameters: leaf_count - [in] leaves - [in] These should be sorted. Neighbors in the list will end up as children of a parent node. mp - [in] memory pool Returns: True if successful.

◆ DestroyTree()

void ON_SurfaceTree::DestroyTree ( )

Description: Destroy existing information. Leaves tree in a state where it can be reused for another curve.

◆ FirstLeaf()

ON_SurfaceTreeNode* ON_SurfaceTree::FirstLeaf ( ) const

First() returns the first leaf interval in the curve tree.

◆ IsValid()

bool ON_SurfaceTree::IsValid ( ON_TextLog text_log = 0,
const class ON_Surface surface = 0 
) const

◆ LastLeaf()

ON_SurfaceTreeNode* ON_SurfaceTree::LastLeaf ( ) const

Last() returns the last leaf interval in the curve tree.

◆ NewLeaf()

ON_SurfaceTreeNode* ON_SurfaceTree::NewLeaf ( )

Description: Expert user tool to get a surface tree leaf node. This node will be destroyed by this tree's destructor. Returns: A surface tree node with m_bez and m_bez->m_cv. Never delete or free the returned pointer, m_bez, or m_bez->m_cv.

◆ NewNode()

ON_SurfaceTreeNode* ON_SurfaceTree::NewNode ( )

Description: Expert user tool to get a surface tree interior node. This node will be destroyed by this tree's destructor. Returns: A surface tree node. Never delete or free the returned pointer.

◆ ReturnNode()

bool ON_SurfaceTree::ReturnNode ( ON_SurfaceTreeNode node)

Description: Expert user tool to return a node for reuse that was created by calling this curve tree's NewNode or NewLeaf. Parameters: node - [in] Returns: True if the node was successfully returned. If false, then the node has been damaged or was not created by calling this surface tree's NewNode() or NewLeaf().

◆ Root()

ON_SurfaceTreeNode* ON_SurfaceTree::Root ( ) const

Member Data Documentation

◆ m_root

ON_SurfaceTreeNode* ON_SurfaceTree::m_root

root node of the binary tree

often points to "this"