Rhino C++ API
8.13
|
#include <opennurbs_fpoint.h>
Public Member Functions | |
ON_4fPoint ()=default | |
x,y,z,w not initialized More... | |
ON_4fPoint (const double *) | |
from double[4] array More... | |
ON_4fPoint (const float *) | |
Require explicit construction when dev must insure array has length >= 4. More... | |
ON_4fPoint (const ON_2dPoint &) | |
Require explicit construction when losing precision. More... | |
ON_4fPoint (const ON_2dVector &) | |
from 2d vector More... | |
ON_4fPoint (const ON_2fPoint &) | |
from 2f point More... | |
ON_4fPoint (const ON_2fVector &) | |
from 2f vector More... | |
ON_4fPoint (const ON_3dPoint &) | |
from 3d point More... | |
ON_4fPoint (const ON_3dVector &) | |
from 3d vector More... | |
ON_4fPoint (const ON_3fPoint &) | |
from 3f point More... | |
ON_4fPoint (const ON_3fVector &) | |
from 3f vector More... | |
ON_4fPoint (const ON_4dPoint &) | |
from 4d point More... | |
ON_4fPoint (const ON_4fPoint &)=default | |
ON_4fPoint (float x, float y, float z, float w) | |
~ON_4fPoint ()=default | |
ON__UINT32 | DataCRC (ON__UINT32 current_remainder) const |
float | EuclideanX () const |
float | EuclideanY () const |
float | EuclideanZ () const |
bool | IsUnset () const |
bool | IsValid () const |
double | MaximumCoordinate () const |
absolute value of maximum coordinate More... | |
int | MaximumCoordinateIndex () const |
bool | Normalize () |
set so x^2 + y^2 + z^2 + w^2 = 1 More... | |
operator const float * () const | |
operator float * () | |
(float*) conversion operators More... | |
bool | operator!= (const ON_4fPoint &rhs) const |
ON_4fPoint | operator* (float) const |
ON_4fPoint & | operator*= (float) |
ON_4fPoint | operator+ (const ON_4fPoint &) const |
sum w = sqrt(w1*w2) More... | |
ON_4fPoint & | operator+= (const ON_4fPoint &) |
ON_4fPoint | operator- (const ON_4fPoint &) const |
difference w = sqrt(w1*w2) More... | |
ON_4fPoint & | operator-= (const ON_4fPoint &) |
ON_4fPoint | operator/ (float) const |
ON_4fPoint & | operator/= (float) |
ON_4fPoint & | operator= (const double *) |
point = double[4] support More... | |
ON_4fPoint & | operator= (const float *) |
point = float[4] support More... | |
ON_4fPoint & | operator= (const ON_2dPoint &) |
ON_4fPoint & | operator= (const ON_2dVector &) |
ON_4fPoint & | operator= (const ON_2fPoint &) |
use implicit operator=(const ON_4fPoint&) More... | |
ON_4fPoint & | operator= (const ON_2fVector &) |
ON_4fPoint & | operator= (const ON_3dPoint &) |
ON_4fPoint & | operator= (const ON_3dVector &) |
ON_4fPoint & | operator= (const ON_3fPoint &) |
ON_4fPoint & | operator= (const ON_3fVector &) |
ON_4fPoint & | operator= (const ON_4dPoint &) |
ON_4fPoint & | operator= (const ON_4fPoint &)=default |
bool | operator== (const ON_4fPoint &rhs) const |
float & | operator[] (int) |
index operators mimic float[4] behavior More... | |
float | operator[] (int) const |
float & | operator[] (unsigned int) |
float | operator[] (unsigned int) const |
void | Set (float, float, float, float) |
set 4d point value More... | |
void | Transform (const ON_Xform &) |
Static Public Member Functions | |
static int | DictionaryCompare (const ON_4fPoint &lhs, const ON_4fPoint &rhs) |
static int | ProjectiveCompare (const ON_4fPoint &lhs, const ON_4fPoint &rhs) |
Public Attributes | |
float | w |
float | x |
float | y |
float | z |
Static Public Attributes | |
static const ON_4fPoint | Nan |
(ON_FLT_QNAN,ON_FLT_QNAN,ON_FLT_QNAN,ON_FLT_QNAN) More... | |
static const ON_4fPoint | Zero |
(0,0,0,0) More... | |
ON_4fPoint (homogeneous coordinates)
|
default |
x,y,z,w not initialized
|
default |
|
default |
|
explicit |
ON_4fPoint::ON_4fPoint | ( | const ON_2fPoint & | ) |
from 2f point
ON_4fPoint::ON_4fPoint | ( | const ON_3fPoint & | ) |
from 3f point
ON_4fPoint::ON_4fPoint | ( | const ON_2fVector & | ) |
from 2f vector
ON_4fPoint::ON_4fPoint | ( | const ON_3fVector & | ) |
from 3f vector
|
explicit |
Require explicit construction when dev must insure array has length >= 4.
from float[4] array
|
explicit |
Require explicit construction when losing precision.
from 2d point
|
explicit |
from 3d point
|
explicit |
from 4d point
|
explicit |
from 2d vector
|
explicit |
from 3d vector
|
explicit |
from double[4] array
ON__UINT32 ON_4fPoint::DataCRC | ( | ON__UINT32 | current_remainder | ) | const |
|
static |
Description: A well ordered dictionary compare function that is nan aware and can be used for robust sorting.
float ON_4fPoint::EuclideanX | ( | ) | const |
Returns: ON_UNSET_VALUE, if x or w is ON_UNSET_VALUE or ON_UNSET_POSITIVE_VALUE and neither x nor w is a nan. x/w, otherwise Remarks: If w is 0.0 or nan, the result will be a nan.
float ON_4fPoint::EuclideanY | ( | ) | const |
Returns: ON_UNSET_VALUE, if y or w is ON_UNSET_VALUE or ON_UNSET_POSITIVE_VALUE and neither y nor w is a nan. y/w, otherwise Remarks: If w is 0.0 or nan, the result will be a nan.
float ON_4fPoint::EuclideanZ | ( | ) | const |
Returns: ON_UNSET_VALUE, if z or w is ON_UNSET_VALUE or ON_UNSET_POSITIVE_VALUE and neither z nor w is a nan. z/w, otherwise Remarks: If w is 0.0 or nan, the result will be a nan.
bool ON_4fPoint::IsUnset | ( | ) | const |
Returns: True if any coordinate is ON_UNSET_FLOAT or ON_UNSET_POSITIVE_FLOAT
bool ON_4fPoint::IsValid | ( | ) | const |
Returns: False if any coordinate is ON_UNSET_FLOAT, ON_UNSET_POSITIVE_FLOAT, nan, or infinite. True, otherwise.
double ON_4fPoint::MaximumCoordinate | ( | ) | const |
absolute value of maximum coordinate
int ON_4fPoint::MaximumCoordinateIndex | ( | ) | const |
bool ON_4fPoint::Normalize | ( | ) |
set so x^2 + y^2 + z^2 + w^2 = 1
ON_4fPoint::operator const float * | ( | ) | const |
ON_4fPoint::operator float * | ( | ) |
(float*) conversion operators
bool ON_4fPoint::operator!= | ( | const ON_4fPoint & | rhs | ) | const |
Returns: True if lhs.* != rhs.* for some coordinate and no values are nans.
ON_4fPoint ON_4fPoint::operator* | ( | float | ) | const |
ON_4fPoint& ON_4fPoint::operator*= | ( | float | ) |
ON_4fPoint ON_4fPoint::operator+ | ( | const ON_4fPoint & | ) | const |
sum w = sqrt(w1*w2)
ON_4fPoint& ON_4fPoint::operator+= | ( | const ON_4fPoint & | ) |
ON_4fPoint ON_4fPoint::operator- | ( | const ON_4fPoint & | ) | const |
difference w = sqrt(w1*w2)
ON_4fPoint& ON_4fPoint::operator-= | ( | const ON_4fPoint & | ) |
ON_4fPoint ON_4fPoint::operator/ | ( | float | ) | const |
ON_4fPoint& ON_4fPoint::operator/= | ( | float | ) |
ON_4fPoint& ON_4fPoint::operator= | ( | const double * | ) |
point = double[4] support
ON_4fPoint& ON_4fPoint::operator= | ( | const float * | ) |
point = float[4] support
ON_4fPoint& ON_4fPoint::operator= | ( | const ON_2dPoint & | ) |
ON_4fPoint& ON_4fPoint::operator= | ( | const ON_2dVector & | ) |
ON_4fPoint& ON_4fPoint::operator= | ( | const ON_2fPoint & | ) |
use implicit operator=(const ON_4fPoint&)
ON_4fPoint& ON_4fPoint::operator= | ( | const ON_2fVector & | ) |
ON_4fPoint& ON_4fPoint::operator= | ( | const ON_3dPoint & | ) |
ON_4fPoint& ON_4fPoint::operator= | ( | const ON_3dVector & | ) |
ON_4fPoint& ON_4fPoint::operator= | ( | const ON_3fPoint & | ) |
ON_4fPoint& ON_4fPoint::operator= | ( | const ON_3fVector & | ) |
ON_4fPoint& ON_4fPoint::operator= | ( | const ON_4dPoint & | ) |
|
default |
bool ON_4fPoint::operator== | ( | const ON_4fPoint & | rhs | ) | const |
Returns: True if (lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z && lhs.w == rhs.w).
float& ON_4fPoint::operator[] | ( | int | ) |
index operators mimic float[4] behavior
float ON_4fPoint::operator[] | ( | int | ) | const |
float& ON_4fPoint::operator[] | ( | unsigned int | ) |
float ON_4fPoint::operator[] | ( | unsigned int | ) | const |
|
static |
Description: A well ordered projective compare function that is nan aware and can be used for robust sorting. Remarks: float c = non-nan value. ON_4fPoint h0 = ...; ON_4fPoint h1(c*h0.x,c*h0.x,c*h0.x,c*h0.x); 0 == ON_4fPoint::ProjectiveCompare(h0,ha);
void ON_4fPoint::Set | ( | float | , |
float | , | ||
float | , | ||
float | |||
) |
set 4d point value
void ON_4fPoint::Transform | ( | const ON_Xform & | ) |
These transform the point in place. The transformation matrix acts on the left of the point; i.e., result = transformation*point
|
static |
(ON_FLT_QNAN,ON_FLT_QNAN,ON_FLT_QNAN,ON_FLT_QNAN)
float ON_4fPoint::w |
float ON_4fPoint::x |
float ON_4fPoint::y |
float ON_4fPoint::z |
|
static |
(0,0,0,0)