#include <opennurbs_fpoint.h>

Public Member Functions

 ON_3fVector ()=default
 x,y,z not initialized More...
 
 ON_3fVector (const ON_3fVector &)=default
 
 ON_3fVector (float x, float y, float z)
 
 ON_3fVector (const ON_2fPoint &)
 
 ON_3fVector (const ON_3fPoint &)
 
 ON_3fVector (const ON_2fVector &)
 
 ON_3fVector (const float *)
 
 ON_3fVector (const ON_2dPoint &)
 
 ON_3fVector (const ON_3dPoint &)
 
 ON_3fVector (const ON_2dVector &)
 
 ON_3fVector (const ON_3dVector &)
 
 ON_3fVector (const double *)
 
 ~ON_3fVector ()=default
 
ON__UINT32 DataCRC (ON__UINT32 current_remainder) const
 
double Fuzz (double=ON_ZERO_TOLERANCE) const
 
bool IsNotZero () const
 
bool IsPerpendicularTo (const ON_3fVector &, double=ON_DEFAULT_ANGLE_TOLERANCE) const
 
bool IsTiny (double=ON_ZERO_TOLERANCE) const
 Test a vector to see if it is very short More...
 
bool IsUnitVector () const
 
bool IsUnset () const
 
bool IsValid () const
 
bool IsZero () const
 
double Length () const
 
double LengthSquared () const
 
double MaximumCoordinate () const
 
int MaximumCoordinateIndex () const
 
 operator const float * () const
 
 operator float * ()
 (float*) conversion operators More...
 
bool operator!= (const ON_3fVector &) const
 
float operator* (const ON_3fVector &) const
 
float operator* (const ON_3fPoint &) const
 
double operator* (const ON_3dVector &) const
 
ON_3fVector operator* (int) const
 
ON_3fVector operator* (float) const
 
ON_3dVector operator* (double) const
 
ON_3fVectoroperator*= (float)
 
ON_3fVector operator+ (const ON_3fVector &) const
 
ON_3fPoint operator+ (const ON_3fPoint &) const
 
ON_3fVector operator+ (const ON_2fVector &) const
 
ON_3fPoint operator+ (const ON_2fPoint &) const
 
ON_3dVector operator+ (const ON_3dVector &) const
 
ON_3dPoint operator+ (const ON_3dPoint &) const
 
ON_3dVector operator+ (const ON_2dVector &) const
 
ON_3dPoint operator+ (const ON_2dPoint &) const
 
ON_3fVectoroperator+= (const ON_3fVector &)
 
ON_3fVector operator- () const
 
ON_3fVector operator- (const ON_3fVector &) const
 
ON_3fPoint operator- (const ON_3fPoint &) const
 
ON_3fVector operator- (const ON_2fVector &) const
 
ON_3fPoint operator- (const ON_2fPoint &) const
 
ON_3dVector operator- (const ON_3dVector &) const
 
ON_3dPoint operator- (const ON_3dPoint &) const
 
ON_3dVector operator- (const ON_2dVector &) const
 
ON_3dPoint operator- (const ON_2dPoint &) const
 
ON_3fVectoroperator-= (const ON_3fVector &)
 
ON_3fVector operator/ (int) const
 
ON_3fVector operator/ (float) const
 
ON_3dVector operator/ (double) const
 
ON_3fVectoroperator/= (float)
 
bool operator< (const ON_3fVector &) const
 
bool operator<= (const ON_3fVector &) const
 dictionary order comparisons More...
 
ON_3fVectoroperator= (const ON_3fVector &)=default
 
ON_3fVectoroperator= (const ON_2fPoint &)
 use implicit operator=(const ON_3fVector&) More...
 
ON_3fVectoroperator= (const ON_3fPoint &)
 
ON_3fVectoroperator= (const ON_2fVector &)
 
ON_3fVectoroperator= (const float *)
 
ON_3fVectoroperator= (const ON_2dPoint &)
 
ON_3fVectoroperator= (const ON_3dPoint &)
 
ON_3fVectoroperator= (const ON_2dVector &)
 
ON_3fVectoroperator= (const ON_3dVector &)
 
ON_3fVectoroperator= (const double *)
 
bool operator== (const ON_3fVector &) const
 
bool operator> (const ON_3fVector &) const
 
bool operator>= (const ON_3fVector &) const
 
float & operator[] (int)
 index operators mimic float[3] behavior More...
 
float operator[] (int) const
 
float & operator[] (unsigned int)
 
float operator[] (unsigned int) const
 
bool PerpendicularTo (const ON_3fVector &)
 set this vector to be perpendicular to another vector More...
 
void Reverse ()
 
void Rotate (double, const ON_3fVector &)
 
void Rotate (double, double, const ON_3fVector &)
 
void Set (float, float, float)
 set 3d vector value More...
 
void Transform (const ON_Xform &)
 
bool Unitize ()
 
ON_3fVector UnitVector () const
 
void Zero ()
 

Static Public Member Functions

static int Compare (const ON_3fVector &lhs, const ON_3fVector &rhs)
 A well ordered dictionary compare function that is nan aware and can be used for robust sorting. More...
 
static const ON_3fVectorUnitVector (int)
 A index driven function to get unit axis vectors. More...
 

Public Attributes

float x
 
float y
 
float z
 

Static Public Attributes

static const ON_3fVector NanVector
 
static const ON_3fVector XAxis
 
static const ON_3fVector YAxis
 
static const ON_3fVector ZAxis
 
static const ON_3fVector ZeroVector
 

Constructor & Destructor Documentation

◆ ON_3fVector() [1/12]

ON_3fVector::ON_3fVector ( )
default

x,y,z not initialized

◆ ~ON_3fVector()

ON_3fVector::~ON_3fVector ( )
default

◆ ON_3fVector() [2/12]

ON_3fVector::ON_3fVector ( const ON_3fVector )
default

◆ ON_3fVector() [3/12]

ON_3fVector::ON_3fVector ( float  x,
float  y,
float  z 
)
explicit

◆ ON_3fVector() [4/12]

ON_3fVector::ON_3fVector ( const ON_2fPoint )
explicit

◆ ON_3fVector() [5/12]

ON_3fVector::ON_3fVector ( const ON_3fPoint )
explicit

◆ ON_3fVector() [6/12]

ON_3fVector::ON_3fVector ( const ON_2fVector )
explicit

◆ ON_3fVector() [7/12]

ON_3fVector::ON_3fVector ( const float *  )
explicit

◆ ON_3fVector() [8/12]

ON_3fVector::ON_3fVector ( const ON_2dPoint )
explicit

◆ ON_3fVector() [9/12]

ON_3fVector::ON_3fVector ( const ON_3dPoint )
explicit

◆ ON_3fVector() [10/12]

ON_3fVector::ON_3fVector ( const ON_2dVector )
explicit

◆ ON_3fVector() [11/12]

ON_3fVector::ON_3fVector ( const ON_3dVector )
explicit

◆ ON_3fVector() [12/12]

ON_3fVector::ON_3fVector ( const double *  )
explicit

Member Function Documentation

◆ Compare()

static int ON_3fVector::Compare ( const ON_3fVector lhs,
const ON_3fVector rhs 
)
static

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

◆ DataCRC()

ON__UINT32 ON_3fVector::DataCRC ( ON__UINT32  current_remainder) const

◆ Fuzz()

double ON_3fVector::Fuzz ( double  = ON_ZERO_TOLERANCE) const

◆ IsNotZero()

bool ON_3fVector::IsNotZero ( ) const
Returns
true if at lease one coordinate is not zero and no coordinates are nans.

◆ IsPerpendicularTo()

bool ON_3fVector::IsPerpendicularTo ( const ON_3fVector ,
double  = ON_DEFAULT_ANGLE_TOLERANCE 
) const

◆ IsTiny()

bool ON_3fVector::IsTiny ( double  = ON_ZERO_TOLERANCE) const

Test a vector to see if it is very short

Parameters
tiny_tol[in] (default = ON_ZERO_TOLERANCE) a nonzero value used as the coordinate zero tolerance.
Returns

( fabs(x) <= tiny_tol && fabs(y) <= tiny_tol && fabs(z) <= tiny_tol )

◆ IsUnitVector()

bool ON_3fVector::IsUnitVector ( ) const

◆ IsUnset()

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

◆ IsValid()

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

◆ IsZero()

bool ON_3fVector::IsZero ( ) const
Returns
true if vector is the zero vector.

◆ Length()

double ON_3fVector::Length ( ) const

◆ LengthSquared()

double ON_3fVector::LengthSquared ( ) const

◆ MaximumCoordinate()

double ON_3fVector::MaximumCoordinate ( ) const

◆ MaximumCoordinateIndex()

int ON_3fVector::MaximumCoordinateIndex ( ) const

◆ operator const float *()

ON_3fVector::operator const float * ( ) const

◆ operator float *()

ON_3fVector::operator float * ( )

(float*) conversion operators

◆ operator!=()

bool ON_3fVector::operator!= ( const ON_3fVector ) const

◆ operator*() [1/6]

float ON_3fVector::operator* ( const ON_3fVector ) const

◆ operator*() [2/6]

float ON_3fVector::operator* ( const ON_3fPoint ) const

◆ operator*() [3/6]

double ON_3fVector::operator* ( const ON_3dVector ) const

◆ operator*() [4/6]

ON_3fVector ON_3fVector::operator* ( int  ) const

◆ operator*() [5/6]

ON_3fVector ON_3fVector::operator* ( float  ) const

◆ operator*() [6/6]

ON_3dVector ON_3fVector::operator* ( double  ) const

◆ operator*=()

ON_3fVector& ON_3fVector::operator*= ( float  )

◆ operator+() [1/8]

ON_3fVector ON_3fVector::operator+ ( const ON_3fVector ) const

◆ operator+() [2/8]

ON_3fPoint ON_3fVector::operator+ ( const ON_3fPoint ) const

◆ operator+() [3/8]

ON_3fVector ON_3fVector::operator+ ( const ON_2fVector ) const

◆ operator+() [4/8]

ON_3fPoint ON_3fVector::operator+ ( const ON_2fPoint ) const

◆ operator+() [5/8]

ON_3dVector ON_3fVector::operator+ ( const ON_3dVector ) const

◆ operator+() [6/8]

ON_3dPoint ON_3fVector::operator+ ( const ON_3dPoint ) const

◆ operator+() [7/8]

ON_3dVector ON_3fVector::operator+ ( const ON_2dVector ) const

◆ operator+() [8/8]

ON_3dPoint ON_3fVector::operator+ ( const ON_2dPoint ) const

◆ operator+=()

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

◆ operator-() [1/9]

ON_3fVector ON_3fVector::operator- ( ) const

◆ operator-() [2/9]

ON_3fVector ON_3fVector::operator- ( const ON_3fVector ) const

◆ operator-() [3/9]

ON_3fPoint ON_3fVector::operator- ( const ON_3fPoint ) const

◆ operator-() [4/9]

ON_3fVector ON_3fVector::operator- ( const ON_2fVector ) const

◆ operator-() [5/9]

ON_3fPoint ON_3fVector::operator- ( const ON_2fPoint ) const

◆ operator-() [6/9]

ON_3dVector ON_3fVector::operator- ( const ON_3dVector ) const

◆ operator-() [7/9]

ON_3dPoint ON_3fVector::operator- ( const ON_3dPoint ) const

◆ operator-() [8/9]

ON_3dVector ON_3fVector::operator- ( const ON_2dVector ) const

◆ operator-() [9/9]

ON_3dPoint ON_3fVector::operator- ( const ON_2dPoint ) const

◆ operator-=()

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

◆ operator/() [1/3]

ON_3fVector ON_3fVector::operator/ ( int  ) const

◆ operator/() [2/3]

ON_3fVector ON_3fVector::operator/ ( float  ) const

◆ operator/() [3/3]

ON_3dVector ON_3fVector::operator/ ( double  ) const

◆ operator/=()

ON_3fVector& ON_3fVector::operator/= ( float  )

◆ operator<()

bool ON_3fVector::operator< ( const ON_3fVector ) const

◆ operator<=()

bool ON_3fVector::operator<= ( const ON_3fVector ) const

dictionary order comparisons

◆ operator=() [1/10]

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

◆ operator=() [2/10]

ON_3fVector& ON_3fVector::operator= ( const ON_2fPoint )

◆ operator=() [3/10]

ON_3fVector& ON_3fVector::operator= ( const ON_3fPoint )

◆ operator=() [4/10]

ON_3fVector& ON_3fVector::operator= ( const ON_2fVector )

◆ operator=() [5/10]

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

◆ operator=() [6/10]

ON_3fVector& ON_3fVector::operator= ( const ON_2dPoint )

◆ operator=() [7/10]

ON_3fVector& ON_3fVector::operator= ( const ON_3dPoint )

◆ operator=() [8/10]

ON_3fVector& ON_3fVector::operator= ( const ON_2dVector )

◆ operator=() [9/10]

ON_3fVector& ON_3fVector::operator= ( const ON_3dVector )

◆ operator=() [10/10]

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

◆ operator==()

bool ON_3fVector::operator== ( const ON_3fVector ) const

◆ operator>()

bool ON_3fVector::operator> ( const ON_3fVector ) const

◆ operator>=()

bool ON_3fVector::operator>= ( const ON_3fVector ) const

◆ operator[]() [1/4]

float& ON_3fVector::operator[] ( int  )

index operators mimic float[3] behavior

◆ operator[]() [2/4]

float ON_3fVector::operator[] ( int  ) const

◆ operator[]() [3/4]

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

◆ operator[]() [4/4]

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

◆ PerpendicularTo()

bool ON_3fVector::PerpendicularTo ( const ON_3fVector )

set this vector to be perpendicular to another vector

◆ Reverse()

void ON_3fVector::Reverse ( )

◆ Rotate() [1/2]

void ON_3fVector::Rotate ( double  ,
const ON_3fVector  
)

◆ Rotate() [2/2]

void ON_3fVector::Rotate ( double  ,
double  ,
const ON_3fVector  
)

◆ Set()

void ON_3fVector::Set ( float  ,
float  ,
float   
)

set 3d vector value

◆ Transform()

void ON_3fVector::Transform ( const ON_Xform )

◆ Unitize()

bool ON_3fVector::Unitize ( )

◆ UnitVector() [1/2]

static const ON_3fVector& ON_3fVector::UnitVector ( int  )
static

A index driven function to get unit axis vectors.

Parameters
index[in] 0 returns (1,0,0), 1 returns (0,1,0) 2 returns (0,0,1)
Returns
Unit 3d vector with vector[i] = (i==index)?1:0;

◆ UnitVector() [2/2]

ON_3fVector ON_3fVector::UnitVector ( ) const
Returns
If this is a valid non-zero vector, a unit vector parallel to this is returned. Otherwise the zero vector is returned.

◆ Zero()

void ON_3fVector::Zero ( )

Member Data Documentation

◆ NanVector

const ON_3fVector ON_3fVector::NanVector
static

◆ x

float ON_3fVector::x

◆ XAxis

const ON_3fVector ON_3fVector::XAxis
static

◆ y

float ON_3fVector::y

◆ YAxis

const ON_3fVector ON_3fVector::YAxis
static

◆ z

float ON_3fVector::z

◆ ZAxis

const ON_3fVector ON_3fVector::ZAxis
static

◆ ZeroVector

const ON_3fVector ON_3fVector::ZeroVector
static