#include <opennurbs_point.h>

Public Member Functions

 ON_4dPoint ()=default
 x,y,z,w not initialized More...
 
 ON_4dPoint (const ON_4dPoint &)=default
 
 ON_4dPoint (double x, double y, double z, double w)
 
 ON_4dPoint (const ON_2dPoint &)
 These constructors are not explicit because no informtion is lost. More...
 
 ON_4dPoint (const ON_3dPoint &)
 
 ON_4dPoint (const ON_2dVector &)
 
 ON_4dPoint (const ON_3dVector &)
 
 ON_4dPoint (const double *)
 
 ON_4dPoint (const ON_2fPoint &)
 These constructors are not explicit because no informtion is lost. More...
 
 ON_4dPoint (const ON_3fPoint &)
 
 ON_4dPoint (const ON_4fPoint &)
 
 ON_4dPoint (const ON_2fVector &)
 
 ON_4dPoint (const ON_3fVector &)
 
 ON_4dPoint (const float *)
 
 ~ON_4dPoint ()=default
 
ON__UINT32 DataCRC (ON__UINT32 current_remainder) const
 
double EuclideanX () const
 
double EuclideanY () const
 
double EuclideanZ () const
 
bool IsUnset () const
 
bool IsValid () const
 
double MaximumCoordinate () const
 
int MaximumCoordinateIndex () const
 
double MinimumCoordinate () const
 
int MinimumCoordinateIndex () const
 
bool Normalize ()
 
 operator const double * () const
 
 operator double * ()
 (double*) conversion operators More...
 
bool operator!= (const ON_4dPoint &rhs) const
 
ON_4dPoint operator* (double) const
 
ON_4dPoint operator* (const ON_Xform &) const
 
ON_4dPointoperator*= (double)
 
ON_4dPoint operator+ (const ON_4dPoint &) const
 
ON_4dPointoperator+= (const ON_4dPoint &)
 
ON_4dPoint operator- (const ON_4dPoint &) const
 
ON_4dPointoperator-= (const ON_4dPoint &)
 
ON_4dPoint operator/ (double) const
 
ON_4dPointoperator/= (double)
 
ON_4dPointoperator= (const ON_4dPoint &)=default
 
ON_4dPointoperator= (const ON_2dPoint &)
 use implicit operator=(const ON_4dPoint&) More...
 
ON_4dPointoperator= (const ON_3dPoint &)
 
ON_4dPointoperator= (const ON_2dVector &)
 
ON_4dPointoperator= (const ON_3dVector &)
 
ON_4dPointoperator= (const double *)
 
ON_4dPointoperator= (const class ON_2fPoint &)
 
ON_4dPointoperator= (const class ON_3fPoint &)
 
ON_4dPointoperator= (const class ON_4fPoint &)
 
ON_4dPointoperator= (const class ON_2fVector &)
 
ON_4dPointoperator= (const class ON_3fVector &)
 
ON_4dPointoperator= (const float *)
 
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)
 A well ordered dictionary compare function that is nan aware and can be used for robust sorting. More...
 
static double InnerProduct (const ON_4dPoint &lhs, const ON_4dPoint &rhs)
 This function is provided because in rare cases it makes sense. If you are not certian why you want this value, think carefully or work with vectors and points in Euclidean coordinates. More...
 
static int ProjectiveCompare (const ON_4dPoint &lhs, const ON_4dPoint &rhs)
 A well ordered projective compare function that is nan aware and can be used for robust sorting. More...
 

Public Attributes

double w
 
double x
 
double y
 
double z
 

Static Public Attributes

static const ON_4dPoint Nan
 
static const ON_4dPoint Zero
 

Constructor & Destructor Documentation

◆ ON_4dPoint() [1/14]

ON_4dPoint::ON_4dPoint ( )
default

x,y,z,w not initialized

◆ ~ON_4dPoint()

ON_4dPoint::~ON_4dPoint ( )
default

◆ ON_4dPoint() [2/14]

ON_4dPoint::ON_4dPoint ( const ON_4dPoint )
default

◆ ON_4dPoint() [3/14]

ON_4dPoint::ON_4dPoint ( double  x,
double  y,
double  z,
double  w 
)
explicit

◆ ON_4dPoint() [4/14]

ON_4dPoint::ON_4dPoint ( const ON_2dPoint )

These constructors are not explicit because no informtion is lost.

◆ ON_4dPoint() [5/14]

ON_4dPoint::ON_4dPoint ( const ON_3dPoint )

◆ ON_4dPoint() [6/14]

ON_4dPoint::ON_4dPoint ( const ON_2dVector )

◆ ON_4dPoint() [7/14]

ON_4dPoint::ON_4dPoint ( const ON_3dVector )

◆ ON_4dPoint() [8/14]

ON_4dPoint::ON_4dPoint ( const double *  )
explicit

◆ ON_4dPoint() [9/14]

ON_4dPoint::ON_4dPoint ( const ON_2fPoint )

These constructors are not explicit because no informtion is lost.

◆ ON_4dPoint() [10/14]

ON_4dPoint::ON_4dPoint ( const ON_3fPoint )

◆ ON_4dPoint() [11/14]

ON_4dPoint::ON_4dPoint ( const ON_4fPoint )

◆ ON_4dPoint() [12/14]

ON_4dPoint::ON_4dPoint ( const ON_2fVector )

◆ ON_4dPoint() [13/14]

ON_4dPoint::ON_4dPoint ( const ON_3fVector )

◆ ON_4dPoint() [14/14]

ON_4dPoint::ON_4dPoint ( const float *  )
explicit

Member Function Documentation

◆ DataCRC()

ON__UINT32 ON_4dPoint::DataCRC ( ON__UINT32  current_remainder) const

◆ DictionaryCompare()

static int ON_4dPoint::DictionaryCompare ( const ON_4dPoint lhs,
const ON_4dPoint rhs 
)
static

A well ordered dictionary compare function that is nan aware and can be used for robust sorting.

◆ EuclideanX()

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

If w is 0.0 or nan, the result will be a nan.

◆ EuclideanY()

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

If w is 0.0 or nan, the result will be a nan.

◆ EuclideanZ()

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

If w is 0.0 or nan, the result will be a nan.

◆ InnerProduct()

static double ON_4dPoint::InnerProduct ( const ON_4dPoint lhs,
const ON_4dPoint rhs 
)
static

This function is provided because in rare cases it makes sense. If you are not certian 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().

◆ IsUnset()

bool ON_4dPoint::IsUnset ( ) const
Returns
True if any coordinate is ON_UNSET_VALUE or ON_UNSET_POSITIVE_VALUE

◆ IsValid()

bool ON_4dPoint::IsValid ( ) const
Returns
False if any coordinate is infinte, a nan, or ON_UNSET_VALUE.

◆ MaximumCoordinate()

double ON_4dPoint::MaximumCoordinate ( ) const

◆ MaximumCoordinateIndex()

int ON_4dPoint::MaximumCoordinateIndex ( ) const

◆ MinimumCoordinate()

double ON_4dPoint::MinimumCoordinate ( ) const

◆ MinimumCoordinateIndex()

int ON_4dPoint::MinimumCoordinateIndex ( ) const

◆ Normalize()

bool ON_4dPoint::Normalize ( )

◆ operator const double *()

ON_4dPoint::operator const double * ( ) const

◆ operator double *()

ON_4dPoint::operator double * ( )

(double*) conversion operators

◆ operator!=()

bool ON_4dPoint::operator!= ( const ON_4dPoint rhs) const
Returns
True if lhs.* != rhs.* for some coordinate and no values are nans.

◆ operator*() [1/2]

ON_4dPoint ON_4dPoint::operator* ( double  ) const

◆ operator*() [2/2]

ON_4dPoint ON_4dPoint::operator* ( const ON_Xform ) const

◆ operator*=()

ON_4dPoint& ON_4dPoint::operator*= ( double  )

◆ operator+()

ON_4dPoint ON_4dPoint::operator+ ( const ON_4dPoint ) const

◆ operator+=()

ON_4dPoint& ON_4dPoint::operator+= ( const ON_4dPoint )

◆ operator-()

ON_4dPoint ON_4dPoint::operator- ( const ON_4dPoint ) const

◆ operator-=()

ON_4dPoint& ON_4dPoint::operator-= ( const ON_4dPoint )

◆ operator/()

ON_4dPoint ON_4dPoint::operator/ ( double  ) const

◆ operator/=()

ON_4dPoint& ON_4dPoint::operator/= ( double  )

◆ operator=() [1/12]

ON_4dPoint& ON_4dPoint::operator= ( const ON_4dPoint )
default

◆ operator=() [2/12]

ON_4dPoint& ON_4dPoint::operator= ( const ON_2dPoint )

◆ operator=() [3/12]

ON_4dPoint& ON_4dPoint::operator= ( const ON_3dPoint )

◆ operator=() [4/12]

ON_4dPoint& ON_4dPoint::operator= ( const ON_2dVector )

◆ operator=() [5/12]

ON_4dPoint& ON_4dPoint::operator= ( const ON_3dVector )

◆ operator=() [6/12]

ON_4dPoint& ON_4dPoint::operator= ( const double *  )

◆ operator=() [7/12]

ON_4dPoint& ON_4dPoint::operator= ( const class ON_2fPoint )

◆ operator=() [8/12]

ON_4dPoint& ON_4dPoint::operator= ( const class ON_3fPoint )

◆ operator=() [9/12]

ON_4dPoint& ON_4dPoint::operator= ( const class ON_4fPoint )

◆ operator=() [10/12]

ON_4dPoint& ON_4dPoint::operator= ( const class ON_2fVector )

◆ operator=() [11/12]

ON_4dPoint& ON_4dPoint::operator= ( const class ON_3fVector )

◆ operator=() [12/12]

ON_4dPoint& ON_4dPoint::operator= ( const float *  )

◆ operator==()

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).

◆ operator[]() [1/4]

double& ON_4dPoint::operator[] ( int  )

index operators mimic double[4] behavior

◆ operator[]() [2/4]

double ON_4dPoint::operator[] ( int  ) const

◆ operator[]() [3/4]

double& ON_4dPoint::operator[] ( unsigned  int)

◆ operator[]() [4/4]

double ON_4dPoint::operator[] ( unsigned  int) const

◆ ProjectiveCompare()

static int ON_4dPoint::ProjectiveCompare ( const ON_4dPoint lhs,
const ON_4dPoint rhs 
)
static

A well ordered projective compare function that is nan aware and can be used for robust sorting.

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);

◆ Set()

void ON_4dPoint::Set ( double  x,
double  y,
double  z,
double  w 
)

set 4d point value

◆ Transform()

void ON_4dPoint::Transform ( const ON_Xform )

Member Data Documentation

◆ Nan

const ON_4dPoint ON_4dPoint::Nan
static

◆ w

double ON_4dPoint::w

◆ x

double ON_4dPoint::x

◆ y

double ON_4dPoint::y

◆ z

double ON_4dPoint::z

◆ Zero

const ON_4dPoint ON_4dPoint::Zero
static