Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXVec4f Class Reference

Single-precision 4-element vector. More...

#include <FXVec4f.h>

Inheritance diagram for FX::FXVec4f:

FX::FXQuatf List of all members.

Public Member Functions

 FXVec4f ()
 FXVec4f (const FXVec4f &v)
 FXVec4f (const FXVec3f &v, FXfloat ww=1.0f)
 FXVec4f (const FXfloat v[])
 FXVec4f (FXfloat xx, FXfloat yy, FXfloat zz, FXfloat ww=1.0f)
 FXVec4f (FXColor color)
FXfloat & operator[] (FXint i)
const FXfloat & operator[] (FXint i) const
FXVec4foperator= (FXColor color)
FXVec4foperator= (const FXVec3f &v)
FXVec4foperator= (const FXVec4f &v)
FXVec4foperator= (const FXfloat v[])
FXVec4foperator *= (FXfloat n)
FXVec4foperator/= (FXfloat n)
FXVec4foperator+= (const FXVec4f &v)
FXVec4foperator-= (const FXVec4f &v)
 operator FXfloat * ()
 operator const FXfloat * () const
 operator FXVec3f & ()
 operator const FXVec3f & () const
 operator FXColor () const

Public Attributes

FXfloat x
FXfloat y
FXfloat z
FXfloat w

Friends

FXVec4f operator+ (const FXVec4f &v)
FXVec4f operator- (const FXVec4f &v)
FXVec4f operator+ (const FXVec4f &a, const FXVec4f &b)
FXVec4f operator- (const FXVec4f &a, const FXVec4f &b)
FXVec4f operator * (const FXVec4f &a, FXfloat n)
FXVec4f operator * (FXfloat n, const FXVec4f &a)
FXVec4f operator/ (const FXVec4f &a, FXfloat n)
FXVec4f operator/ (FXfloat n, const FXVec4f &a)
FXfloat operator * (const FXVec4f &a, const FXVec4f &b)
int operator! (const FXVec4f &a)
int operator== (const FXVec4f &a, const FXVec4f &b)
int operator!= (const FXVec4f &a, const FXVec4f &b)
int operator== (const FXVec4f &a, FXfloat n)
int operator!= (const FXVec4f &a, FXfloat n)
int operator== (FXfloat n, const FXVec4f &a)
int operator!= (FXfloat n, const FXVec4f &a)
int operator< (const FXVec4f &a, const FXVec4f &b)
int operator<= (const FXVec4f &a, const FXVec4f &b)
int operator> (const FXVec4f &a, const FXVec4f &b)
int operator>= (const FXVec4f &a, const FXVec4f &b)
int operator< (const FXVec4f &a, FXfloat n)
int operator<= (const FXVec4f &a, FXfloat n)
int operator> (const FXVec4f &a, FXfloat n)
int operator>= (const FXVec4f &a, FXfloat n)
int operator< (FXfloat n, const FXVec4f &a)
int operator<= (FXfloat n, const FXVec4f &a)
int operator> (FXfloat n, const FXVec4f &a)
int operator>= (FXfloat n, const FXVec4f &a)
FXfloat len2 (const FXVec4f &a)
FXfloat len (const FXVec4f &a)
FXVec4f normalize (const FXVec4f &a)
FXVec4f lo (const FXVec4f &a, const FXVec4f &b)
FXVec4f hi (const FXVec4f &a, const FXVec4f &b)
FXVec4f plane (const FXVec4f &vec)
FXVec4f plane (const FXVec3f &vec, FXfloat dist)
FXVec4f plane (const FXVec3f &vec, const FXVec3f &p)
FXVec4f plane (const FXVec3f &a, const FXVec3f &b, const FXVec3f &c)
FXfloat distance (const FXVec4f &plane, const FXVec3f &p)
FXbool crosses (const FXVec4f &plane, const FXVec3f &a, const FXVec3f &b)
FXStreamoperator<< (FXStream &store, const FXVec4f &v)
FXStreamoperator>> (FXStream &store, FXVec4f &v)

Detailed Description

Single-precision 4-element vector.


Constructor & Destructor Documentation

FX::FXVec4f::FXVec4f  )  [inline]
 

Default constructor.

FX::FXVec4f::FXVec4f const FXVec4f v  )  [inline]
 

Copy constructor.

FX::FXVec4f::FXVec4f const FXVec3f v,
FXfloat  ww = 1.0f
[inline]
 

Construct with 3-vector and optional scalar.

FX::FXVec4f::FXVec4f const FXfloat  v[]  )  [inline]
 

Construct from array of floats.

FX::FXVec4f::FXVec4f FXfloat  xx,
FXfloat  yy,
FXfloat  zz,
FXfloat  ww = 1.0f
[inline]
 

Construct from components.

FX::FXVec4f::FXVec4f FXColor  color  ) 
 

Construct from color.


Member Function Documentation

FXfloat& FX::FXVec4f::operator[] FXint  i  )  [inline]
 

Return a non-const reference to the ith element.

const FXfloat& FX::FXVec4f::operator[] FXint  i  )  const [inline]
 

Return a const reference to the ith element.

FXVec4f& FX::FXVec4f::operator= FXColor  color  ) 
 

Assign color.

FXVec4f& FX::FXVec4f::operator= const FXVec3f v  )  [inline]
 

Assignment.

FXVec4f& FX::FXVec4f::operator= const FXfloat  v[]  )  [inline]
 

Assignment from array of floats.

FXVec4f& FX::FXVec4f::operator *= FXfloat  n  )  [inline]
 

Assigning operators.

FX::FXVec4f::operator FXfloat *  )  [inline]
 

Conversion.

FX::FXVec4f::operator FXColor  )  const
 

Convert to color.


Friends And Related Function Documentation

FXVec4f operator+ const FXVec4f v  )  [friend]
 

Unary.

FXVec4f operator+ const FXVec4f a,
const FXVec4f b
[friend]
 

Adding.

FXVec4f operator- const FXVec4f a,
const FXVec4f b
[friend]
 

Subtracting.

FXVec4f operator * const FXVec4f a,
FXfloat  n
[friend]
 

Scaling.

FXfloat operator * const FXVec4f a,
const FXVec4f b
[friend]
 

Dot product.

int operator! const FXVec4f a  )  [friend]
 

Test if zero.

int operator== const FXVec4f a,
const FXVec4f b
[friend]
 

Equality tests.

int operator< const FXVec4f a,
const FXVec4f b
[friend]
 

Inequality tests.

FXfloat len2 const FXVec4f a  )  [friend]
 

Length and square of length.

FXVec4f normalize const FXVec4f a  )  [friend]
 

Normalize vector.

FXVec4f lo const FXVec4f a,
const FXVec4f b
[friend]
 

Lowest or highest components.

FXVec4f plane const FXVec4f vec  )  [friend]
 

Compute normalized plane equation ax+by+cz+d=0.

FXfloat distance const FXVec4f plane,
const FXVec3f p
[friend]
 

Signed distance normalized plane and point.

FXbool crosses const FXVec4f plane,
const FXVec3f a,
const FXVec3f b
[friend]
 

Return true if edge a-b crosses plane.

FXStream& operator<< FXStream store,
const FXVec4f v
[friend]
 

Save to a stream.

FXStream& operator>> FXStream store,
FXVec4f v
[friend]
 

Load from a stream.

Copyright © 1997-2005 Jeroen van der Zijp