Rhino C++ API
8.14
|
#include <opennurbs_point.h>
Public Member Functions | |
ON_4dPoint ()=default | |
x,y,z,w not initialized More... | |
ON_4dPoint (const double *) | |
from double[4] array More... | |
ON_4dPoint (const float *) | |
from float[4] array More... | |
ON_4dPoint (const ON_2dPoint &) | |
These constructors are not explicit because no information is lost. More... | |
ON_4dPoint (const ON_2dVector &) | |
from 2d vector (x,y,0,0) More... | |
ON_4dPoint (const ON_2fPoint &) | |
These constructors are not explicit because no information is lost. More... | |
ON_4dPoint (const ON_2fVector &) | |
from 2f vector (z,y,0,0) More... | |
ON_4dPoint (const ON_3dPoint &) | |
from 3d point (x,y,z,1) More... | |
ON_4dPoint (const ON_3dVector &) | |
from 3d vector (x,y,z,0) More... | |
ON_4dPoint (const ON_3fPoint &) | |
from 3f point (x,y,z,1) More... | |
ON_4dPoint (const ON_3fVector &) | |
from 3f vector (x,y,z,0) More... | |
ON_4dPoint (const ON_4dPoint &)=default | |
ON_4dPoint (const ON_4fPoint &) | |
from 4f point More... | |
ON_4dPoint (double x, double y, double z, double w) | |
~ON_4dPoint ()=default | |
ON__UINT32 | DataCRC (ON__UINT32 current_remainder) const |
double | EuclideanX () const |
double | EuclideanY () const |
double | EuclideanZ () const |
bool | IsNan () const |
bool | IsUnset () const |
bool | IsUnsetOrNan () const |
bool | IsValid () const |
double | MaximumCoordinate () const |
absolute value of maximum coordinate More... | |
int | MaximumCoordinateIndex () const |
double | MinimumCoordinate () const |
absolute value of minimum coordinate More... | |
int | MinimumCoordinateIndex () const |
bool | Normalize () |
set so x^2 + y^2 + z^2 + w^2 = 1 More... | |
operator const double * () const | |
operator double * () | |
(double*) conversion operators More... | |
bool | operator!= (const ON_4dPoint &rhs) const |
ON_4dPoint | operator* (const ON_Xform &) const |
ON_4dPoint | operator* (double) const |
ON_4dPoint & | operator*= (double) |
ON_4dPoint | operator+ (const ON_4dPoint &) const |
sum w = sqrt(|w1*w2|) More... | |
ON_4dPoint & | operator+= (const ON_4dPoint &) |
sum w = sqrt(|w1*w2|) More... | |
ON_4dPoint | operator- (const ON_4dPoint &) const |
difference w = sqrt(|w1*w2|) More... | |
ON_4dPoint & | operator-= (const ON_4dPoint &) |
difference w = sqrt(|w1*w2|) More... | |
ON_4dPoint | operator/ (double) const |
ON_4dPoint & | operator/= (double) |
ON_4dPoint & | operator= (const class ON_2fPoint &) |
ON_4dPoint & | operator= (const class ON_2fVector &) |
ON_4dPoint & | operator= (const class ON_3fPoint &) |
ON_4dPoint & | operator= (const class ON_3fVector &) |
ON_4dPoint & | operator= (const class ON_4fPoint &) |
ON_4dPoint & | operator= (const double *) |
point = double[4] support More... | |
ON_4dPoint & | operator= (const float *) |
point = float[4] support More... | |
ON_4dPoint & | operator= (const ON_2dPoint &) |
use implicit operator=(const ON_4dPoint&) More... | |
ON_4dPoint & | operator= (const ON_2dVector &) |
ON_4dPoint & | operator= (const ON_3dPoint &) |
ON_4dPoint & | operator= (const ON_3dVector &) |
ON_4dPoint & | operator= (const ON_4dPoint &)=default |
bool | operator== (const ON_4dPoint &rhs) const |
double & | operator[] (int) |
index operators mimic double[4] behavior More... | |
double | operator[] (int) const |
double & | operator[] (unsigned int) |
double | operator[] (unsigned int) const |
void | Set (double x, double y, double z, double w) |
set 4d point value More... | |
void | Transform (const ON_Xform &) |
Static Public Member Functions | |
static int | DictionaryCompare (const ON_4dPoint &lhs, const ON_4dPoint &rhs) |
static double | InnerProduct (const ON_4dPoint &lhs, const ON_4dPoint &rhs) |
static int | ProjectiveCompare (const ON_4dPoint &lhs, const ON_4dPoint &rhs) |
Public Attributes | |
double | w |
double | x |
double | y |
double | z |
Static Public Attributes | |
static const ON_4dPoint | Nan |
(ON_DBL_QNAN,ON_DBL_QNAN,ON_DBL_QNAN,ON_DBL_QNAN) More... | |
static const ON_4dPoint | Zero |
(0,0,0,0) More... | |
ON_4dPoint (homogeneous coordinates)
|
default |
x,y,z,w not initialized
|
default |
|
default |
|
explicit |
ON_4dPoint::ON_4dPoint | ( | const ON_2dPoint & | ) |
These constructors are not explicit because no information is lost.
from 2d point (z,y,0,1)
ON_4dPoint::ON_4dPoint | ( | const ON_3dPoint & | ) |
from 3d point (x,y,z,1)
ON_4dPoint::ON_4dPoint | ( | const ON_2dVector & | ) |
from 2d vector (x,y,0,0)
ON_4dPoint::ON_4dPoint | ( | const ON_3dVector & | ) |
from 3d vector (x,y,z,0)
|
explicit |
from double[4] array
ON_4dPoint::ON_4dPoint | ( | const ON_2fPoint & | ) |
These constructors are not explicit because no information is lost.
from 2f point (z,y,0,1)
ON_4dPoint::ON_4dPoint | ( | const ON_3fPoint & | ) |
from 3f point (x,y,z,1)
ON_4dPoint::ON_4dPoint | ( | const ON_4fPoint & | ) |
from 4f point
ON_4dPoint::ON_4dPoint | ( | const ON_2fVector & | ) |
from 2f vector (z,y,0,0)
ON_4dPoint::ON_4dPoint | ( | const ON_3fVector & | ) |
from 3f vector (x,y,z,0)
|
explicit |
from float[4] array
ON__UINT32 ON_4dPoint::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.
double ON_4dPoint::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.
double ON_4dPoint::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.
double ON_4dPoint::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.
|
static |
Description: This function is provided because in rare cases it makes sense. If you are not certain why you want this value, think carefully or work with vectors and points in Euclidean coordinates. Returns: lhs.x*rhs.x + lhs.y*rhs.y + lhs.z*rhs.z + lhs.w*rhs.w; Remark: It is intentional that there is no operator* override for ON_4dPoint. This intentional omission helps people pause and think before calling ON_4dPoint::InnerProduct().
bool ON_4dPoint::IsNan | ( | ) | const |
Returns: True if any coordinate is a nan.
bool ON_4dPoint::IsUnset | ( | ) | const |
Returns: True if any coordinate is ON_UNSET_VALUE or ON_UNSET_POSITIVE_VALUE
bool ON_4dPoint::IsUnsetOrNan | ( | ) | const |
Returns: True if any coordinate is ON_UNSET_VALUE, ON_UNSET_POSITIVE_VALUE, or a nan
bool ON_4dPoint::IsValid | ( | ) | const |
Returns: False if any coordinate is infinite, a nan, or ON_UNSET_VALUE.
double ON_4dPoint::MaximumCoordinate | ( | ) | const |
absolute value of maximum coordinate
int ON_4dPoint::MaximumCoordinateIndex | ( | ) | const |
double ON_4dPoint::MinimumCoordinate | ( | ) | const |
absolute value of minimum coordinate
int ON_4dPoint::MinimumCoordinateIndex | ( | ) | const |
bool ON_4dPoint::Normalize | ( | ) |
set so x^2 + y^2 + z^2 + w^2 = 1
ON_4dPoint::operator const double * | ( | ) | const |
ON_4dPoint::operator double * | ( | ) |
(double*) conversion operators
bool ON_4dPoint::operator!= | ( | const ON_4dPoint & | rhs | ) | const |
Returns: True if lhs.* != rhs.* for some coordinate and no values are nans.
ON_4dPoint ON_4dPoint::operator* | ( | const ON_Xform & | ) | const |
ON_4dPoint ON_4dPoint::operator* | ( | double | ) | const |
ON_4dPoint& ON_4dPoint::operator*= | ( | double | ) |
ON_4dPoint ON_4dPoint::operator+ | ( | const ON_4dPoint & | ) | const |
sum w = sqrt(|w1*w2|)
ON_4dPoint& ON_4dPoint::operator+= | ( | const ON_4dPoint & | ) |
sum w = sqrt(|w1*w2|)
ON_4dPoint ON_4dPoint::operator- | ( | const ON_4dPoint & | ) | const |
difference w = sqrt(|w1*w2|)
ON_4dPoint& ON_4dPoint::operator-= | ( | const ON_4dPoint & | ) |
difference w = sqrt(|w1*w2|)
ON_4dPoint ON_4dPoint::operator/ | ( | double | ) | const |
ON_4dPoint& ON_4dPoint::operator/= | ( | double | ) |
ON_4dPoint& ON_4dPoint::operator= | ( | const class ON_2fPoint & | ) |
ON_4dPoint& ON_4dPoint::operator= | ( | const class ON_2fVector & | ) |
ON_4dPoint& ON_4dPoint::operator= | ( | const class ON_3fPoint & | ) |
ON_4dPoint& ON_4dPoint::operator= | ( | const class ON_3fVector & | ) |
ON_4dPoint& ON_4dPoint::operator= | ( | const class ON_4fPoint & | ) |
ON_4dPoint& ON_4dPoint::operator= | ( | const double * | ) |
point = double[4] support
ON_4dPoint& ON_4dPoint::operator= | ( | const float * | ) |
point = float[4] support
ON_4dPoint& ON_4dPoint::operator= | ( | const ON_2dPoint & | ) |
use implicit operator=(const ON_4dPoint&)
ON_4dPoint& ON_4dPoint::operator= | ( | const ON_2dVector & | ) |
ON_4dPoint& ON_4dPoint::operator= | ( | const ON_3dPoint & | ) |
ON_4dPoint& ON_4dPoint::operator= | ( | const ON_3dVector & | ) |
|
default |
bool ON_4dPoint::operator== | ( | const ON_4dPoint & | rhs | ) | const |
Returns: True if (lhs.x == rhs.x && lhs.y == rhs.y && lhs.z == rhs.z && lhs.w == rhs.w).
double& ON_4dPoint::operator[] | ( | int | ) |
index operators mimic double[4] behavior
double ON_4dPoint::operator[] | ( | int | ) | const |
double& ON_4dPoint::operator[] | ( | unsigned int | ) |
double ON_4dPoint::operator[] | ( | unsigned int | ) | const |
|
static |
Description: A well ordered projective compare function that is nan aware and can be used for robust sorting. Remarks: double c = non-nan value. ON_4dPoint h0 = ...; ON_4dPoint h1(c*h0.x,c*h0.x,c*h0.x,c*h0.x); 0 == ON_4dPoint::ProjectiveCompare(h0,ha);
void ON_4dPoint::Set | ( | double | x, |
double | y, | ||
double | z, | ||
double | w | ||
) |
set 4d point value
void ON_4dPoint::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_DBL_QNAN,ON_DBL_QNAN,ON_DBL_QNAN,ON_DBL_QNAN)
double ON_4dPoint::w |
double ON_4dPoint::x |
double ON_4dPoint::y |
double ON_4dPoint::z |
|
static |
(0,0,0,0)