Typically the vector portion is a unit vector and m_d = -(x*P.x + y*P.y + z*P.z) for a point P on the plane. More...
#include <opennurbs_point.h>
Public Member Functions | |
ON_PlaneEquation () | |
ON_PlaneEquation (double xx, double yy, double zz, double dd) | |
ON_3dPoint | ClosestPointTo (ON_3dPoint point) const |
Get point on plane that is closest to a given point. More... | |
bool | Create (ON_3dPoint P, ON_3dVector N) |
Sets (x,y,z) to a unitized N and then sets d = -(x*P.x + y*P.y + z*P.z). More... | |
ON_3dVector | Direction () const |
double | DirectionLength () const |
bool | IsNearerThan (const class ON_BezierCurve &bezcrv, double s0, double s1, int sample_count, double endpoint_tolerance, double interior_tolerance, double *smin, double *smax) const |
Test points on a bezier curve to see if they are near the plane. More... | |
int | IsParallelTo (const ON_PlaneEquation &other, double angle_tolerance=ON_DEFAULT_ANGLE_TOLERANCE) const |
bool | IsSet () const |
returns true if x, y, z, d are valid, finite doubles and at least one of x, y or z is not zero. More... | |
bool | IsValid () const |
returns true if x, y, z, d are valid, finite doubles. More... | |
double | MaximumAbsoluteValueAt (bool bRational, int point_count, int point_stride, const double *points, double stop_value) const |
Get the maximum absolute value of the plane equation on a set of 3d points. More... | |
double | MaximumCoefficient () const |
double | MaximumValueAt (const ON_BoundingBox &bbox) const |
Get the maximum value of the plane equation on a bounding box. More... | |
double | MaximumValueAt (bool bRational, int point_count, int point_stride, const double *points, double stop_value) const |
Get the maximum value of the plane equation on a set of 3d points. More... | |
double | MinimumValueAt (const ON_BoundingBox &bbox) const |
Get the minimum value of the plane equation on a bounding box. More... | |
double | MinimumValueAt (bool bRational, int point_count, int point_stride, const double *points, double stop_value) const |
Get the minimum value of the plane equation on a set of 3d points. More... | |
ON_PlaneEquation | NegatedPlaneEquation () const |
bool | operator!= (const ON_PlaneEquation &) const |
bool | operator== (const ON_PlaneEquation &) const |
double & | operator[] (int) |
double & | operator[] (unsigned int) |
double | operator[] (int) const |
double | operator[] (unsigned int) const |
bool | Transform (const ON_Xform &xform) |
Transform the plane equation so that, if e0 is the initial equation, e1 is transformed equation and P is a point, then e0.ValueAt(P) = e1.ValueAt(xform*P). More... | |
ON_PlaneEquation | UnitizedPlaneEquation () const |
ON_3dVector | UnitNormal () const |
double | ValueAt (ON_3dPoint P) const |
Evaluate the plane at a point. More... | |
double | ValueAt (ON_4dPoint P) const |
double | ValueAt (ON_3dVector P) const |
double | ValueAt (double x, double y, double z) const |
double * | ValueAt (int Pcount, const ON_3fPoint *P, double *value, double value_range[2]) const |
Evaluate the plane at a list of point values. More... | |
double * | ValueAt (int Pcount, const ON_3dPoint *P, double *value, double value_range[2]) const |
ON_Interval | ValueRange (size_t point_list_count, const ON_3dPoint *point_list) const |
ON_Interval | ValueRange (const ON_SimpleArray< ON_3dPoint > &point_list) const |
ON_Interval | ValueRange (size_t point_list_count, const ON_3fPoint *point_list) const |
ON_Interval | ValueRange (const ON_SimpleArray< ON_3fPoint > &point_list) const |
ON_Interval | ValueRange (const class ON_3dPointListRef &point_list) const |
ON_Interval | ValueRange (size_t point_index_count, const unsigned int *point_index_list, const class ON_3dPointListRef &point_list) const |
ON_Interval | ValueRange (size_t point_index_count, size_t point_index_stride, const unsigned int *point_index_list, const class ON_3dPointListRef &point_list) const |
double | ZeroTolerance () const |
This function calculates and evalutes points that would be exactly on the plane if double precision aritmetic were mathematically perfect and returns the largest value of the evaluations. More... | |
Static Public Member Functions | |
static void | Set (ON_PlaneEquation &plane_equation, double x, double y, double z, double d) |
Public Attributes | |
double | d |
double | x |
double | y |
double | z |
Static Public Attributes | |
static const ON_PlaneEquation | UnsetPlaneEquation |
static const ON_PlaneEquation | ZeroPlaneEquation |
Typically the vector portion is a unit vector and m_d = -(x*P.x + y*P.y + z*P.z) for a point P on the plane.
ON_PlaneEquation::ON_PlaneEquation | ( | ) |
ON_PlaneEquation::ON_PlaneEquation | ( | double | xx, |
double | yy, | ||
double | zz, | ||
double | dd | ||
) |
ON_3dPoint ON_PlaneEquation::ClosestPointTo | ( | ON_3dPoint | point | ) | const |
Get point on plane that is closest to a given point.
point | [in] |
bool ON_PlaneEquation::Create | ( | ON_3dPoint | P, |
ON_3dVector | N | ||
) |
Sets (x,y,z) to a unitized N and then sets d = -(x*P.x + y*P.y + z*P.z).
P | [in] point on the plane |
N | [in] vector perpendicular to the plane |
ON_3dVector ON_PlaneEquation::Direction | ( | ) | const |
double ON_PlaneEquation::DirectionLength | ( | ) | const |
bool ON_PlaneEquation::IsNearerThan | ( | const class ON_BezierCurve & | bezcrv, |
double | s0, | ||
double | s1, | ||
int | sample_count, | ||
double | endpoint_tolerance, | ||
double | interior_tolerance, | ||
double * | smin, | ||
double * | smax | ||
) | const |
Test points on a bezier curve to see if they are near the plane.
bezcrv | [in] |
s0 | [in] |
s1 | [in] the interval from s0 to s1 is tested (s0 < s1) |
sample_count | [in] number of interior points to test. Numbers like 1, 3, 7, 15, ... work best. |
endpoint_tolerance | [in] If >= 0, then the end points are tested to see if the distance from the endpoints is <= endpoint_tolerance. |
interior_tolerance | [in] (>=0 and >=endpoint_tolerance) This tolerance is used to test the interior sample points. |
smin | [put] If not nullptr, *smin = bezier parameter of nearest test point. |
smax | [put] If not nullptr, *smax = bezier parameter of farthest test point. If false is returned, this is the parameter of the test point that failed. |
int ON_PlaneEquation::IsParallelTo | ( | const ON_PlaneEquation & | other, |
double | angle_tolerance = ON_DEFAULT_ANGLE_TOLERANCE |
||
) | const |
bool ON_PlaneEquation::IsSet | ( | ) | const |
returns true if x, y, z, d are valid, finite doubles and at least one of x, y or z is not zero.
bool ON_PlaneEquation::IsValid | ( | ) | const |
returns true if x, y, z, d are valid, finite doubles.
this function will return true if x, y and z are all zero.
double ON_PlaneEquation::MaximumAbsoluteValueAt | ( | bool | bRational, |
int | point_count, | ||
int | point_stride, | ||
const double * | points, | ||
double | stop_value | ||
) | const |
Get the maximum absolute value of the plane equation on a set of 3d points.
bRational | [in] False if the points are euclidean (x,y,z) True if the points are homogenous rational (x,y,z,w) (x/w,y/w,z/w) is used to evaluate the value. |
point_count | [in] |
point_stride | [in] |
i | th point's x coordinate = points[i*point_stride] |
points | [in] coordinates of points |
stop_value | [in] If stop_value >= 0.0, then the evaulation stops if an absolute value > stop_value is found. If stop_value < 0.0 or stop_value is invalid, then stop_value is ignored. |
double ON_PlaneEquation::MaximumCoefficient | ( | ) | const |
double ON_PlaneEquation::MaximumValueAt | ( | const ON_BoundingBox & | bbox | ) | const |
Get the maximum value of the plane equation on a bounding box.
bbox | [in] |
double ON_PlaneEquation::MaximumValueAt | ( | bool | bRational, |
int | point_count, | ||
int | point_stride, | ||
const double * | points, | ||
double | stop_value | ||
) | const |
Get the maximum value of the plane equation on a set of 3d points.
bRational | [in] False if the points are euclidean (x,y,z) True if the points are homogenous rational (x,y,z,w) (x/w,y/w,z/w) is used to evaluate the value. |
point_count | [in] |
point_stride | [in] |
i | th point's x coordinate = points[i*point_stride] |
points | [in] coordinates of points |
stop_value | [in] If stop_value is valid and not ON_UNSET_VALUE, then the evaulation stops if a value > stop_value is found. If stop_value = ON_UNSET_VALUE, then stop_value is ignored. |
double ON_PlaneEquation::MinimumValueAt | ( | const ON_BoundingBox & | bbox | ) | const |
Get the minimum value of the plane equation on a bounding box.
bbox | [in] |
double ON_PlaneEquation::MinimumValueAt | ( | bool | bRational, |
int | point_count, | ||
int | point_stride, | ||
const double * | points, | ||
double | stop_value | ||
) | const |
Get the minimum value of the plane equation on a set of 3d points.
bRational | [in] False if the points are euclidean (x,y,z) True if the points are homogenous rational (x,y,z,w) (x/w,y/w,z/w) is used to evaluate the value. |
point_count | [in] |
point_stride | [in] |
i | th point's x coordinate = points[i*point_stride] |
points | [in] coordinates of points |
stop_value | [in] If stop_value is valid and not ON_UNSET_VALUE, then the evaulation stops if a value < stop_value is found. If stop_value = ON_UNSET_VALUE, then stop_value is ignored. |
ON_PlaneEquation ON_PlaneEquation::NegatedPlaneEquation | ( | ) | const |
bool ON_PlaneEquation::operator!= | ( | const ON_PlaneEquation & | ) | const |
bool ON_PlaneEquation::operator== | ( | const ON_PlaneEquation & | ) | const |
double& ON_PlaneEquation::operator[] | ( | int | ) |
double& ON_PlaneEquation::operator[] | ( | unsigned | int | ) |
double ON_PlaneEquation::operator[] | ( | int | ) | const |
double ON_PlaneEquation::operator[] | ( | unsigned | int | ) | const |
|
static |
bool ON_PlaneEquation::Transform | ( | const ON_Xform & | xform | ) |
Transform the plane equation so that, if e0 is the initial equation, e1 is transformed equation and P is a point, then e0.ValueAt(P) = e1.ValueAt(xform*P).
xform | [in] Invertable transformation. |
This function has to invert xform. If you have apply the same transformation to a bunch of planes, then it will be more efficient to calculate xform's inverse transpose and apply the resultingt transformation to the equation's coefficients as if they were 4d point coordinates.
ON_PlaneEquation ON_PlaneEquation::UnitizedPlaneEquation | ( | ) | const |
ON_3dVector ON_PlaneEquation::UnitNormal | ( | ) | const |
double ON_PlaneEquation::ValueAt | ( | ON_3dPoint | P | ) | const |
Evaluate the plane at a point.
P | [in] |
double ON_PlaneEquation::ValueAt | ( | ON_4dPoint | P | ) | const |
double ON_PlaneEquation::ValueAt | ( | ON_3dVector | P | ) | const |
double ON_PlaneEquation::ValueAt | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
double* ON_PlaneEquation::ValueAt | ( | int | Pcount, |
const ON_3fPoint * | P, | ||
double * | value, | ||
double | value_range[2] | ||
) | const |
Evaluate the plane at a list of point values.
Pcount | [in] number of points |
P | [in] points |
value | [in] If not null, value[] must be an array of length at least Pcount. The values will be stored in this array. If null, the an array will be allocated with onmalloc() and returned. |
value_range | [out] If not null, the range of values will be returned here. |
double* ON_PlaneEquation::ValueAt | ( | int | Pcount, |
const ON_3dPoint * | P, | ||
double * | value, | ||
double | value_range[2] | ||
) | const |
ON_Interval ON_PlaneEquation::ValueRange | ( | size_t | point_list_count, |
const ON_3dPoint * | point_list | ||
) | const |
ON_Interval ON_PlaneEquation::ValueRange | ( | const ON_SimpleArray< ON_3dPoint > & | point_list | ) | const |
ON_Interval ON_PlaneEquation::ValueRange | ( | size_t | point_list_count, |
const ON_3fPoint * | point_list | ||
) | const |
ON_Interval ON_PlaneEquation::ValueRange | ( | const ON_SimpleArray< ON_3fPoint > & | point_list | ) | const |
ON_Interval ON_PlaneEquation::ValueRange | ( | const class ON_3dPointListRef & | point_list | ) | const |
ON_Interval ON_PlaneEquation::ValueRange | ( | size_t | point_index_count, |
const unsigned int * | point_index_list, | ||
const class ON_3dPointListRef & | point_list | ||
) | const |
ON_Interval ON_PlaneEquation::ValueRange | ( | size_t | point_index_count, |
size_t | point_index_stride, | ||
const unsigned int * | point_index_list, | ||
const class ON_3dPointListRef & | point_list | ||
) | const |
double ON_PlaneEquation::ZeroTolerance | ( | ) | const |
This function calculates and evalutes points that would be exactly on the plane if double precision aritmetic were mathematically perfect and returns the largest value of the evaluations.
double ON_PlaneEquation::d |
|
static |
double ON_PlaneEquation::x |
double ON_PlaneEquation::y |
double ON_PlaneEquation::z |
|
static |