#include <opennurbs_plus.h>
|
| ON_SurfaceLeafBox () |
|
bool | GetClosestPointSeed (const ON_3dPoint &P, double *t0, double *t1) const |
|
bool | GetSideEquation (int side, ON_PlaneEquation &e) const |
|
double | Height () 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_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 | MinimumDistanceTo (const 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_SurfaceLeafBox &srfleafbox) const |
|
ON_3dPoint | PointAt (double s, double t) const |
|
bool | Set (const ON_BezierSurface *bez) |
|
void | SetEquationsHelper (const ON_BezierSurface *bez) |
|
bool | SetPlaneAndMonoHelper (const ON_BezierSurface *bez, double maxheight=0.0) |
|
◆ ON_SurfaceLeafBox()
ON_SurfaceLeafBox::ON_SurfaceLeafBox |
( |
| ) |
|
◆ GetClosestPointSeed()
bool ON_SurfaceLeafBox::GetClosestPointSeed |
( |
const ON_3dPoint & |
P, |
|
|
double * |
t0, |
|
|
double * |
t1 |
|
) |
| const |
Description: Quickly estimate curve and surface parameters for finding closest points. Parameters: P - [in] another point crvleafbox - [in] srfleafbox - [in] t0 - [out] first surface parameter (0 <= t <= 1). t1 - [out] second surface parameter (0 <= t <= 1). Returns: True if the estimates were calculated. See Also: ON_CurveLeafBox::GetClosestPointSeed
◆ GetSideEquation()
bool ON_SurfaceLeafBox::GetSideEquation |
( |
int |
side, |
|
|
ON_PlaneEquation & |
e |
|
) |
| const |
Description: Get the equation of the 3d plane that lies on the side of the leaf box. Parameters: side - [in] 0: side from m_q[0] to m_q[1] 1: side from m_q[1] to m_q[2] 2: side from m_q[2] to m_q[3] 3: side from m_q[3] to m_q[0] 4: bottom 5: top e - [out] The leaf box lies on the negative side of the plane. Returns: True if successful.
◆ Height()
double ON_SurfaceLeafBox::Height |
( |
| ) |
const |
Description: "Height" of the surface leaf box. Returns: Height of the surface leaf box.
◆ IsFartherThan() [1/5]
bool ON_SurfaceLeafBox::IsFartherThan |
( |
double |
d, |
|
|
const ON_3dPoint & |
P |
|
) |
| const |
Description: Quickly find an upper bound on the shortest 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 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 then P.DistanceTo(Q) <= MaximumDistanceTo(other). double MaximumDistanceTo( ON_3dPoint P ) const; double MaximumDistanceTo( const ON_BoundingBox& bbox ) const; double MaximumDistanceTo( const ON_CurveLeafBox& crvleafbox ) const; double MaximumDistanceTo( const ON_SurfaceLeafBox& srfleafbox ) 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/5]
bool ON_SurfaceLeafBox::IsFartherThan |
( |
double |
d, |
|
|
const ON_BoundingBox & |
bbox |
|
) |
| const |
◆ IsFartherThan() [3/5]
bool ON_SurfaceLeafBox::IsFartherThan |
( |
double |
d, |
|
|
const ON_CurveLeafBox & |
crvleafbox |
|
) |
| const |
◆ IsFartherThan() [4/5]
bool ON_SurfaceLeafBox::IsFartherThan |
( |
double |
d, |
|
|
const ON_Line & |
L |
|
) |
| const |
◆ IsFartherThan() [5/5]
bool ON_SurfaceLeafBox::IsFartherThan |
( |
double |
d, |
|
|
const ON_SurfaceLeafBox & |
srfleafbox |
|
) |
| const |
◆ IsPointIn()
bool ON_SurfaceLeafBox::IsPointIn |
( |
const ON_3dPoint & |
P | ) |
const |
Description: Determine if the point P is in this surface leaf box. Parameters: P - [in] Returns: True if the point is in the surface leaf box.
◆ IsValid()
bool ON_SurfaceLeafBox::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.
◆ MinimumDistanceTo() [1/5]
double ON_SurfaceLeafBox::MinimumDistanceTo |
( |
const 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).
◆ MinimumDistanceTo() [2/5]
double ON_SurfaceLeafBox::MinimumDistanceTo |
( |
const ON_BoundingBox & |
bbox | ) |
const |
◆ MinimumDistanceTo() [3/5]
double ON_SurfaceLeafBox::MinimumDistanceTo |
( |
const ON_CurveLeafBox & |
crvleafbox | ) |
const |
◆ MinimumDistanceTo() [4/5]
double ON_SurfaceLeafBox::MinimumDistanceTo |
( |
const ON_Line & |
L | ) |
const |
◆ MinimumDistanceTo() [5/5]
double ON_SurfaceLeafBox::MinimumDistanceTo |
( |
const ON_SurfaceLeafBox & |
srfleafbox | ) |
const |
◆ PointAt()
ON_3dPoint ON_SurfaceLeafBox::PointAt |
( |
double |
s, |
|
|
double |
t |
|
) |
| const |
Description: Point on the planar quad/triangle that is the "center" of the surface leaf box. Parameters: s - [in] 0.0 <= s <= 1.0 t - [in] 0.0 <= t <= 1.0 Returns: point
◆ Set()
Description: Sets the leaf box to contain bezier surface. Parameters: bez - [in] Valid bezier surface. Returns: True if input was valid and leaf box is set.
◆ SetEquationsHelper()
◆ SetPlaneAndMonoHelper()
bool ON_SurfaceLeafBox::SetPlaneAndMonoHelper |
( |
const ON_BezierSurface * |
bez, |
|
|
double |
maxheight = 0.0 |
|
) |
| |
Description: Expert user function to quickly set m_plane an m_bMono. Parameters: bez - [in] Valid bezier surface. maxheight - [in] Ignore this expert user parameter. Returns: True if input was valid and m_plane and m_bMono are set. See Also ON_SurfaceLeafBox::Set
ON_SurfaceLeafBox::SetEquationsHelper
◆ m_bDegen
bool ON_SurfaceLeafBox::m_bDegen |
True if the m_q[] are not convex (the m_c[] are always convex)
◆ m_bMono
bool ON_SurfaceLeafBox::m_bMono |
◆ m_bPlane
bool ON_SurfaceLeafBox::m_bPlane |
◆ m_bValid
bool ON_SurfaceLeafBox::m_bValid |
◆ m_c
m_c[] = plane coordinates of bounding quad/triangle corners. The polygon connecting the m_c[] points is always convex, but it can happen that the polygon is a triangle. A point is in the surface leaf box if its projection is in the large quad and its distance from the plane is in the interval m_[0] to m_h[1]. The m_c[] are used to answer proximity queries.
◆ m_e
side plane equations d = m_e[i].x*s + m_e[i].y*t + m_e[i].z d is zero at m_c[i] and m_c[(i+1)%4]. d > 0 in the half space outside the surface leaf d is the 3d distance from the point m_plane to the bounding side plane.
◆ m_h
double ON_SurfaceLeafBox::m_h[2] |
Height limits. m_h[0] <= 0.0 <= m_h[1]. If P is in the surface leaf box, then m_h[0] <= m_plane.plane_equation.ValueAt(P) <= m_h[1].
◆ m_plane
◆ m_q
m_q[] = plane coordinates of small quad with corners located at the projection of the bibezier corners to m_plane. In general, the m_q are in the interior of the surface leaf box. In some cases, the polygon connecting the m_q[] is not convex. m_q[] are used to calculate seed values.