Rhino C++ API  8.6
Public Member Functions | Public Attributes | List of all members
ON_CurveLeafBox Class Reference

#include <opennurbs_plus.h>

Public Member Functions

 ON_CurveLeafBox ()
 
bool GetClosestPointSeed (const ON_3dPoint &P, double *t) const
 
bool GetClosestPointSeed (const ON_CurveLeafBox &crvleafbox, double *t, double *c) const
 
bool GetClosestPointSeed (const ON_SurfaceLeafBox &srfleafbox, double *t, double *s0, double *s1) const
 
bool IsFartherThan (double d, const ON_3dPoint &P) const
 
bool IsFartherThan (double d, const ON_BoundingBox &bbox) const
 
bool IsFartherThan (double d, const ON_CurveLeafBox &crvleafbox) const
 
bool IsFartherThan (double d, const ON_Line &L) const
 
bool IsFartherThan (double d, const ON_Plane &plane) const
 
bool IsFartherThan (double d, const ON_PlaneEquation &plane_equation) const
 
bool IsFartherThan (double d, const ON_SurfaceLeafBox &srfleafbox) const
 
bool IsPointIn (const ON_3dPoint &P) const
 
bool IsValid (ON_TextLog *text_log) const
 C++ default copy constructor, operator =, and destructor work fine. More...
 
double MaximumDistanceTo (const ON_BoundingBox &bbox) const
 
double MaximumDistanceTo (const ON_CurveLeafBox &crvleafbox) const
 
double MaximumDistanceTo (const ON_Line &L) const
 
double MaximumDistanceTo (const ON_Plane &plane) const
 
double MaximumDistanceTo (const ON_PlaneEquation &plane_equation) const
 
double MaximumDistanceTo (const ON_SurfaceLeafBox &srfleafbox) const
 
double MaximumDistanceTo (ON_3dPoint P) const
 
double MinimumDistanceTo (const ON_BoundingBox &bbox) const
 
double MinimumDistanceTo (const ON_CurveLeafBox &crvleafbox) const
 
double MinimumDistanceTo (const ON_Line &L) const
 
double MinimumDistanceTo (const ON_Plane &plane) const
 
double MinimumDistanceTo (const ON_PlaneEquation &plane_equation) const
 
double MinimumDistanceTo (const ON_SurfaceLeafBox &srfleafbox) const
 
double MinimumDistanceTo (ON_3dPoint P) const
 
ON_3dPoint PointAt (double t) const
 
double Radius () const
 
bool Set (const ON_BezierCurve *bez)
 

Public Attributes

bool m_bDegen
 True if C is yukky. More...
 
bool m_bMono
 True if m_L.Tangent()oC' >= 0 for every point on C. More...
 
bool m_bRes
 NEVER set or reference this value. More...
 
bool m_bValid
 True if the curve leaf box is set. More...
 
ON_PlaneEquation m_e
 equation of a plane perpendicular to m_L and containing m_L.from More...
 
double m_e0
 If P is a point on the curve, then m_e0 <= m_e.ValueAt(P) <= m_e1. More...
 
double m_e1
 
ON_Line m_L
 chord from start of C to end of C More...
 
ON_Line m_M
 
double m_r
 The maximum distance from C to m_M. More...
 

Constructor & Destructor Documentation

◆ ON_CurveLeafBox()

ON_CurveLeafBox::ON_CurveLeafBox ( )

Member Function Documentation

◆ GetClosestPointSeed() [1/3]

bool ON_CurveLeafBox::GetClosestPointSeed ( const ON_3dPoint P,
double *  t 
) const

Description: Quickly estimate curve and surface parameters for finding closest points. Parameters: P - [in] another point crvleafbox - [in] srfleafbox - [in] t - [out] curve parameter (0 <= t <= 1). c - [out] other curve parameter (0 <= c <= 1) s0 - [out] other surface parameter (0 <= s0 <= 1) s1 - [out] other surface parameter (0 <= s1 <= 1) Returns: True if the estimates were calculated.

◆ GetClosestPointSeed() [2/3]

bool ON_CurveLeafBox::GetClosestPointSeed ( const ON_CurveLeafBox crvleafbox,
double *  t,
double *  c 
) const

◆ GetClosestPointSeed() [3/3]

bool ON_CurveLeafBox::GetClosestPointSeed ( const ON_SurfaceLeafBox srfleafbox,
double *  t,
double *  s0,
double *  s1 
) const

◆ IsFartherThan() [1/7]

bool ON_CurveLeafBox::IsFartherThan ( double  d,
const ON_3dPoint P 
) const

Description: Quickly determine if the shortest distance between this leaf box and the other object is greater than d. Parameters: d - [in] distance (> 0.0) P - [in] another point bbox - [in] another axis aligned bounding box crvleafbox - [in] another curve tree node leaf box srfleafbox - [in] another surface tree node leaf box Returns: True if the shortest distance from this leaf box to the other object is greater than d. It is not the case that false means that the shortest distance is less than or equal to d.

◆ IsFartherThan() [2/7]

bool ON_CurveLeafBox::IsFartherThan ( double  d,
const ON_BoundingBox bbox 
) const

◆ IsFartherThan() [3/7]

bool ON_CurveLeafBox::IsFartherThan ( double  d,
const ON_CurveLeafBox crvleafbox 
) const

◆ IsFartherThan() [4/7]

bool ON_CurveLeafBox::IsFartherThan ( double  d,
const ON_Line L 
) const

◆ IsFartherThan() [5/7]

bool ON_CurveLeafBox::IsFartherThan ( double  d,
const ON_Plane plane 
) const

◆ IsFartherThan() [6/7]

bool ON_CurveLeafBox::IsFartherThan ( double  d,
const ON_PlaneEquation plane_equation 
) const

◆ IsFartherThan() [7/7]

bool ON_CurveLeafBox::IsFartherThan ( double  d,
const ON_SurfaceLeafBox srfleafbox 
) const

◆ IsPointIn()

bool ON_CurveLeafBox::IsPointIn ( const ON_3dPoint P) const

Description: Determine if the point P is in this curve leaf box. Parameters: P - [in] Returns: True if the point is in the curve leaf box.

◆ IsValid()

bool ON_CurveLeafBox::IsValid ( ON_TextLog text_log) const

C++ default copy constructor, operator =, and destructor work fine.

Description: Test the leaf box to make sure its settings are valid. Parameters: text_log - [in] If an error is found and text_log is not null, then a short description of the problem is printed to the text_log. Returns: True if the leaf box is valid, and false otherwise.

◆ MaximumDistanceTo() [1/7]

double ON_CurveLeafBox::MaximumDistanceTo ( const ON_BoundingBox bbox) const

◆ MaximumDistanceTo() [2/7]

double ON_CurveLeafBox::MaximumDistanceTo ( const ON_CurveLeafBox crvleafbox) const

◆ MaximumDistanceTo() [3/7]

double ON_CurveLeafBox::MaximumDistanceTo ( const ON_Line L) const

◆ MaximumDistanceTo() [4/7]

double ON_CurveLeafBox::MaximumDistanceTo ( const ON_Plane plane) const

◆ MaximumDistanceTo() [5/7]

double ON_CurveLeafBox::MaximumDistanceTo ( const ON_PlaneEquation plane_equation) const

◆ MaximumDistanceTo() [6/7]

double ON_CurveLeafBox::MaximumDistanceTo ( const ON_SurfaceLeafBox srfleafbox) const

◆ MaximumDistanceTo() [7/7]

double ON_CurveLeafBox::MaximumDistanceTo ( ON_3dPoint  P) const

Description: Quickly find an upper bound on the longest distance between the this leaf box and the other object. Parameters: P - [in] another point line - [in] another line segment bbox - [in] another axis aligned bounding box crvleafbox - [in] crvleafbox - [in] Returns: A distance that is greater than or equal to the longest distance from this leaf box to the other object. Put another way, if Q is any point on this leaf box and P is any point on the other object, then P.DistanceTo(Q) <= MaximumDistanceTo(other).

◆ MinimumDistanceTo() [1/7]

double ON_CurveLeafBox::MinimumDistanceTo ( const ON_BoundingBox bbox) const

◆ MinimumDistanceTo() [2/7]

double ON_CurveLeafBox::MinimumDistanceTo ( const ON_CurveLeafBox crvleafbox) const

◆ MinimumDistanceTo() [3/7]

double ON_CurveLeafBox::MinimumDistanceTo ( const ON_Line L) const

◆ MinimumDistanceTo() [4/7]

double ON_CurveLeafBox::MinimumDistanceTo ( const ON_Plane plane) const

◆ MinimumDistanceTo() [5/7]

double ON_CurveLeafBox::MinimumDistanceTo ( const ON_PlaneEquation plane_equation) const

◆ MinimumDistanceTo() [6/7]

double ON_CurveLeafBox::MinimumDistanceTo ( const ON_SurfaceLeafBox srfleafbox) const

◆ MinimumDistanceTo() [7/7]

double ON_CurveLeafBox::MinimumDistanceTo ( ON_3dPoint  P) const

Description: Quickly find a lower bound on the distance between the this leaf box and the other object. Parameters: P - [in] another point bbox - [in] another axis aligned bounding box crvleafbox - [in] another curve tree node leaf box srfleafbox - [in] another surface tree node leaf box Returns: A distance that is less than or equal to the shortest distance from this leaf box to the other object. Put another way, if Q is any point on this leaf box and P is any point on the other object, then then P.DistanceTo(Q) >= MinimumDistanceTo(other).

◆ PointAt()

ON_3dPoint ON_CurveLeafBox::PointAt ( double  t) const

Description: Point on the chord connecting the bezier's endpoints. Parameters: t - [in] 0.0 < t < 1.0 Returns: m_L.PointAt(t)

◆ Radius()

double ON_CurveLeafBox::Radius ( ) const

Description: "Radius" of the curve leaf box. A point is in the leaf box if the shortest distance from the point to the chord m_M is <= "radius". Returns: Radius of the leaf box.

◆ Set()

bool ON_CurveLeafBox::Set ( const ON_BezierCurve bez)

Description: Sets the leaf box to contain bezier curve. Parameters: bez - [in] Valid bezier curve. Returns: True if input was valid and the leaf box was set.

Member Data Documentation

◆ m_bDegen

bool ON_CurveLeafBox::m_bDegen

True if C is yukky.

◆ m_bMono

bool ON_CurveLeafBox::m_bMono

True if m_L.Tangent()oC' >= 0 for every point on C.

◆ m_bRes

bool ON_CurveLeafBox::m_bRes

NEVER set or reference this value.

◆ m_bValid

bool ON_CurveLeafBox::m_bValid

True if the curve leaf box is set.

◆ m_e

ON_PlaneEquation ON_CurveLeafBox::m_e

equation of a plane perpendicular to m_L and containing m_L.from

◆ m_e0

double ON_CurveLeafBox::m_e0

If P is a point on the curve, then m_e0 <= m_e.ValueAt(P) <= m_e1.

◆ m_e1

double ON_CurveLeafBox::m_e1

◆ m_L

ON_Line ON_CurveLeafBox::m_L

chord from start of C to end of C

Below, "C" is the portion of the curve contained in this this curve leaf box.

◆ m_M

ON_Line ON_CurveLeafBox::m_M

smallest chord that contains m_L and such that every point on C projects orthoganally to m_M. For monotone chords, m_L = m_M.

◆ m_r

double ON_CurveLeafBox::m_r

The maximum distance from C to m_M.