#include <opennurbs_fpoint.h>

Public Member Functions

 ON_4fPoint ()=default
 x,y,z,w not initialized More...
 
 ON_4fPoint (const ON_4fPoint &)=default
 
 ON_4fPoint (float x, float y, float z, float w)
 
 ON_4fPoint (const ON_2fPoint &)
 
 ON_4fPoint (const ON_3fPoint &)
 
 ON_4fPoint (const ON_2fVector &)
 
 ON_4fPoint (const ON_3fVector &)
 
 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 loosing precision. More...
 
 ON_4fPoint (const ON_3dPoint &)
 
 ON_4fPoint (const ON_4dPoint &)
 
 ON_4fPoint (const ON_2dVector &)
 
 ON_4fPoint (const ON_3dVector &)
 
 ON_4fPoint (const double *)
 
 ~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
 
int MaximumCoordinateIndex () const
 
bool Normalize ()
 
 operator const float * () const
 
 operator float * ()
 (float*) conversion operators More...
 
bool operator!= (const ON_4fPoint &rhs) const
 
ON_4fPoint operator* (float) const
 
ON_4fPointoperator*= (float)
 
ON_4fPoint operator+ (const ON_4fPoint &) const
 
ON_4fPointoperator+= (const ON_4fPoint &)
 
ON_4fPoint operator- (const ON_4fPoint &) const
 
ON_4fPointoperator-= (const ON_4fPoint &)
 
ON_4fPoint operator/ (float) const
 
ON_4fPointoperator/= (float)
 
ON_4fPointoperator= (const ON_4fPoint &)=default
 
ON_4fPointoperator= (const ON_2fPoint &)
 use implicit operator=(const ON_4fPoint&) More...
 
ON_4fPointoperator= (const ON_3fPoint &)
 
ON_4fPointoperator= (const ON_2fVector &)
 
ON_4fPointoperator= (const ON_3fVector &)
 
ON_4fPointoperator= (const float *)
 
ON_4fPointoperator= (const ON_2dPoint &)
 
ON_4fPointoperator= (const ON_3dPoint &)
 
ON_4fPointoperator= (const ON_4dPoint &)
 
ON_4fPointoperator= (const ON_2dVector &)
 
ON_4fPointoperator= (const ON_3dVector &)
 
ON_4fPointoperator= (const double *)
 
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)
 A well ordered dictionary compare function that is nan aware and can be used for robust sorting. More...
 
static int ProjectiveCompare (const ON_4fPoint &lhs, const ON_4fPoint &rhs)
 A well ordered projective compare function that is nan aware and can be used for robust sorting. More...
 

Public Attributes

float w
 
float x
 
float y
 
float z
 

Static Public Attributes

static const ON_4fPoint Nan
 
static const ON_4fPoint Zero
 

Constructor & Destructor Documentation

◆ ON_4fPoint() [1/14]

ON_4fPoint::ON_4fPoint ( )
default

x,y,z,w not initialized

◆ ~ON_4fPoint()

ON_4fPoint::~ON_4fPoint ( )
default

◆ ON_4fPoint() [2/14]

ON_4fPoint::ON_4fPoint ( const ON_4fPoint )
default

◆ ON_4fPoint() [3/14]

ON_4fPoint::ON_4fPoint ( float  x,
float  y,
float  z,
float  w 
)
explicit

◆ ON_4fPoint() [4/14]

ON_4fPoint::ON_4fPoint ( const ON_2fPoint )

◆ ON_4fPoint() [5/14]

ON_4fPoint::ON_4fPoint ( const ON_3fPoint )

◆ ON_4fPoint() [6/14]

ON_4fPoint::ON_4fPoint ( const ON_2fVector )

◆ ON_4fPoint() [7/14]

ON_4fPoint::ON_4fPoint ( const ON_3fVector )

◆ ON_4fPoint() [8/14]

ON_4fPoint::ON_4fPoint ( const float *  )
explicit

Require explicit construction when dev must insure array has length >= 4.

◆ ON_4fPoint() [9/14]

ON_4fPoint::ON_4fPoint ( const ON_2dPoint )
explicit

Require explicit construction when loosing precision.

◆ ON_4fPoint() [10/14]

ON_4fPoint::ON_4fPoint ( const ON_3dPoint )
explicit

◆ ON_4fPoint() [11/14]

ON_4fPoint::ON_4fPoint ( const ON_4dPoint )
explicit

◆ ON_4fPoint() [12/14]

ON_4fPoint::ON_4fPoint ( const ON_2dVector )
explicit

◆ ON_4fPoint() [13/14]

ON_4fPoint::ON_4fPoint ( const ON_3dVector )
explicit

◆ ON_4fPoint() [14/14]

ON_4fPoint::ON_4fPoint ( const double *  )
explicit

Member Function Documentation

◆ DataCRC()

ON__UINT32 ON_4fPoint::DataCRC ( ON__UINT32  current_remainder) const

◆ DictionaryCompare()

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

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

◆ EuclideanX()

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

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

◆ EuclideanY()

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

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

◆ EuclideanZ()

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

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

◆ IsUnset()

bool ON_4fPoint::IsUnset ( ) const
Returns
True if any coordinate is ON_UNSET_FLOAT or ON_UNSET_POSITIVE_FLOAT

◆ IsValid()

bool ON_4fPoint::IsValid ( ) const
Returns
False if any coordinate is ON_UNSET_FLOAT, ON_UNSET_POSITIVE_FLOAT, nan, or infinite. True, otherwise.

◆ MaximumCoordinate()

double ON_4fPoint::MaximumCoordinate ( ) const

◆ MaximumCoordinateIndex()

int ON_4fPoint::MaximumCoordinateIndex ( ) const

◆ Normalize()

bool ON_4fPoint::Normalize ( )

◆ operator const float *()

ON_4fPoint::operator const float * ( ) const

◆ operator float *()

ON_4fPoint::operator float * ( )

(float*) conversion operators

◆ operator!=()

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

◆ operator*()

ON_4fPoint ON_4fPoint::operator* ( float  ) const

◆ operator*=()

ON_4fPoint& ON_4fPoint::operator*= ( float  )

◆ operator+()

ON_4fPoint ON_4fPoint::operator+ ( const ON_4fPoint ) const

◆ operator+=()

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

◆ operator-()

ON_4fPoint ON_4fPoint::operator- ( const ON_4fPoint ) const

◆ operator-=()

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

◆ operator/()

ON_4fPoint ON_4fPoint::operator/ ( float  ) const

◆ operator/=()

ON_4fPoint& ON_4fPoint::operator/= ( float  )

◆ operator=() [1/12]

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

◆ operator=() [2/12]

ON_4fPoint& ON_4fPoint::operator= ( const ON_2fPoint )

◆ operator=() [3/12]

ON_4fPoint& ON_4fPoint::operator= ( const ON_3fPoint )

◆ operator=() [4/12]

ON_4fPoint& ON_4fPoint::operator= ( const ON_2fVector )

◆ operator=() [5/12]

ON_4fPoint& ON_4fPoint::operator= ( const ON_3fVector )

◆ operator=() [6/12]

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

◆ operator=() [7/12]

ON_4fPoint& ON_4fPoint::operator= ( const ON_2dPoint )

◆ operator=() [8/12]

ON_4fPoint& ON_4fPoint::operator= ( const ON_3dPoint )

◆ operator=() [9/12]

ON_4fPoint& ON_4fPoint::operator= ( const ON_4dPoint )

◆ operator=() [10/12]

ON_4fPoint& ON_4fPoint::operator= ( const ON_2dVector )

◆ operator=() [11/12]

ON_4fPoint& ON_4fPoint::operator= ( const ON_3dVector )

◆ operator=() [12/12]

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

◆ operator==()

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

◆ operator[]() [1/4]

float& ON_4fPoint::operator[] ( int  )

index operators mimic float[4] behavior

◆ operator[]() [2/4]

float ON_4fPoint::operator[] ( int  ) const

◆ operator[]() [3/4]

float& ON_4fPoint::operator[] ( unsigned  int)

◆ operator[]() [4/4]

float ON_4fPoint::operator[] ( unsigned  int) const

◆ ProjectiveCompare()

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

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

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

◆ Set()

void ON_4fPoint::Set ( float  ,
float  ,
float  ,
float   
)

set 4d point value

◆ Transform()

void ON_4fPoint::Transform ( const ON_Xform )

Member Data Documentation

◆ Nan

const ON_4fPoint ON_4fPoint::Nan
static

◆ w

float ON_4fPoint::w

◆ x

float ON_4fPoint::x

◆ y

float ON_4fPoint::y

◆ z

float ON_4fPoint::z

◆ Zero

const ON_4fPoint ON_4fPoint::Zero
static