Rhino C++ API
8.13
|
#include <opennurbs_plus.h>
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_SurfaceTreeNode * | FirstLeaf () 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_SurfaceTreeNode * | LastLeaf () const |
Last() returns the last leaf interval in the curve tree. More... | |
ON_SurfaceTreeNode * | NewLeaf () |
ON_SurfaceTreeNode * | NewNode () |
bool | ReturnNode (ON_SurfaceTreeNode *node) |
ON_SurfaceTreeNode * | Root () const |
Public Member Functions inherited from ON_SurfaceTreeNode | |
ON_SurfaceTreeNode () | |
~ON_SurfaceTreeNode () | |
bool | AdjustParameter () const |
ON_SurfaceTreeNode * | EastNode () const |
const ON_SurfaceTreeNode * | Evaluate (double s, double t, int der_count, int v_stride, double *v, int quadrant=0) const |
const ON_SurfaceTreeNode * | FindLeaf (double s, double t, int quadrant=0) const |
const ON_SurfaceTreeNode * | GetClosestPoint (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_SurfaceTreeNode * | NextLeaf () const |
ON_SurfaceTreeNode * | NorthNode () const |
ON_SurfaceTreeNode * | PrevLeaf () const |
ON_SurfaceTreeNode * | SouthNode () const |
bool | Split (int dir, double s, ON_SurfaceTreeNode &left_node, ON_SurfaceTreeNode &right_node) const |
int | SplitDir () const |
ON_SurfaceTreeNode * | TreeContaining (const ON_Interval &Urange, const ON_Interval &Vrange) const |
ON_SurfaceTreeNode * | WestNode () const |
Public Attributes | |
ON_SurfaceTreeNode * | m_root |
root node of the binary tree More... | |
Public Attributes inherited from ON_SurfaceTreeNode | |
ON_BoundingBox | m_bbox |
ON_SurfaceTreeBezier * | m_bez |
unsigned char | m_bezmem |
ON_Interval | m_domain [2] |
ON_SurfaceTreeNode * | m_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_SurfaceTreeNode * | m_up |
ON_SurfaceTree::ON_SurfaceTree | ( | ) |
ON_SurfaceTree::~ON_SurfaceTree | ( | ) |
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
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
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.
void ON_SurfaceTree::DestroyTree | ( | ) |
Description: Destroy existing information. Leaves tree in a state where it can be reused for another curve.
ON_SurfaceTreeNode* ON_SurfaceTree::FirstLeaf | ( | ) | const |
First() returns the first leaf interval in the curve tree.
bool ON_SurfaceTree::IsValid | ( | ON_TextLog * | text_log = 0 , |
const class ON_Surface * | surface = 0 |
||
) | const |
ON_SurfaceTreeNode* ON_SurfaceTree::LastLeaf | ( | ) | const |
Last() returns the last leaf interval in the curve tree.
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.
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.
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().
ON_SurfaceTreeNode* ON_SurfaceTree::Root | ( | ) | const |
ON_SurfaceTreeNode* ON_SurfaceTree::m_root |
root node of the binary tree
often points to "this"