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)
FXfloatoperator[] (FXint i)
const FXfloatoperator[] (FXint i) const
FXVec4foperator= (FXColor color)
FXVec4foperator= (const FXVec3f &v)
FXVec4foperator= (const FXVec4f &v)
FXVec4foperator= (const FXfloat v[])
FXVec4fset (const FXVec4f &v)
FXVec4fset (const FXfloat v[])
FXVec4fset (FXfloat xx, FXfloat yy, FXfloat zz, FXfloat ww)
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
FXVec4f operator+ () const
FXVec4f operator- () const
FXVec4f operator+ (const FXVec4f &v) const
FXVec4f operator- (const FXVec4f &v) const
FXVec4f operator * (const FXMat4f &m) const
FXfloat operator * (const FXVec4f &v) const
bool operator! () const
bool operator== (const FXVec4f &v) const
bool operator!= (const FXVec4f &v) const
bool operator< (const FXVec4f &v) const
bool operator<= (const FXVec4f &v) const
bool operator> (const FXVec4f &v) const
bool operator>= (const FXVec4f &v) const
FXfloat length2 () const
FXfloat length () const
FXVec4fclamp (FXfloat lo, FXfloat hi)
FXfloat distance (const FXVec3f &p) const
bool crosses (const FXVec3f &a, const FXVec3f &b) const

Public Attributes

FXfloat x
FXfloat y
FXfloat z
FXfloat w

Friends

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)
bool operator== (const FXVec4f &a, FXfloat n)
bool operator!= (const FXVec4f &a, FXfloat n)
bool operator== (FXfloat n, const FXVec4f &a)
bool operator!= (FXfloat n, const FXVec4f &a)
bool operator< (const FXVec4f &a, FXfloat n)
bool operator<= (const FXVec4f &a, FXfloat n)
bool operator> (const FXVec4f &a, FXfloat n)
bool operator>= (const FXVec4f &a, FXfloat n)
bool operator< (FXfloat n, const FXVec4f &a)
bool operator<= (FXfloat n, const FXVec4f &a)
bool operator> (FXfloat n, const FXVec4f &a)
bool operator>= (FXfloat n, 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)
FXVec4f normalize (const FXVec4f &v)
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]
 

Initialize from another vector.

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 FXVec4f v  )  [inline]
 

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

Assignment from array of floats.

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

Set value from another vector.

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

Set value from array of floats.

FXVec4f& FX::FXVec4f::set FXfloat  xx,
FXfloat  yy,
FXfloat  zz,
FXfloat  ww
[inline]
 

Set value from components.

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

Assigning operators.

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

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

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

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

Conversion.

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

FX::FXVec4f::operator FXVec3f &  )  [inline]
 

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

FX::FXVec4f::operator FXColor  )  const
 

Convert to color.

FXVec4f FX::FXVec4f::operator+  )  const [inline]
 

Unary.

FXVec4f FX::FXVec4f::operator-  )  const [inline]
 

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

Vector and vector.

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

FXVec4f FX::FXVec4f::operator * const FXMat4f m  )  const
 

Vector and matrix.

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

Dot product.

bool FX::FXVec4f::operator!  )  const [inline]
 

Test if zero.

bool FX::FXVec4f::operator== const FXVec4f v  )  const [inline]
 

Equality tests.

bool FX::FXVec4f::operator!= const FXVec4f v  )  const [inline]
 

bool FX::FXVec4f::operator< const FXVec4f v  )  const [inline]
 

Inequality tests.

bool FX::FXVec4f::operator<= const FXVec4f v  )  const [inline]
 

bool FX::FXVec4f::operator> const FXVec4f v  )  const [inline]
 

bool FX::FXVec4f::operator>= const FXVec4f v  )  const [inline]
 

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

Length and square of length.

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

FXVec4f& FX::FXVec4f::clamp FXfloat  lo,
FXfloat  hi
[inline]
 

Clamp values of vector between limits.

FXfloat FX::FXVec4f::distance const FXVec3f p  )  const
 

Signed distance normalized plane and point.

bool FX::FXVec4f::crosses const FXVec3f a,
const FXVec3f b
const
 

Return true if edge a-b crosses plane.


Friends And Related Function Documentation

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

Scaling.

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

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

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

bool operator== const FXVec4f a,
FXfloat  n
[friend]
 

bool operator!= const FXVec4f a,
FXfloat  n
[friend]
 

bool operator== FXfloat  n,
const FXVec4f a
[friend]
 

bool operator!= FXfloat  n,
const FXVec4f a
[friend]
 

bool operator< const FXVec4f a,
FXfloat  n
[friend]
 

bool operator<= const FXVec4f a,
FXfloat  n
[friend]
 

bool operator> const FXVec4f a,
FXfloat  n
[friend]
 

bool operator>= const FXVec4f a,
FXfloat  n
[friend]
 

bool operator< FXfloat  n,
const FXVec4f a
[friend]
 

bool operator<= FXfloat  n,
const FXVec4f a
[friend]
 

bool operator> FXfloat  n,
const FXVec4f a
[friend]
 

bool operator>= FXfloat  n,
const FXVec4f a
[friend]
 

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

Lowest or highest components.

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

FXVec4f plane const FXVec4f vec  )  [friend]
 

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

FXVec4f plane const FXVec3f vec,
FXfloat  dist
[friend]
 

FXVec4f plane const FXVec3f vec,
const FXVec3f p
[friend]
 

FXVec4f plane const FXVec3f a,
const FXVec3f b,
const FXVec3f c
[friend]
 

FXVec4f normalize const FXVec4f v  )  [friend]
 

Normalize vector.

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

Save to a stream.

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

Load from a stream.


Member Data Documentation

FXfloat FX::FXVec4f::x
 

FXfloat FX::FXVec4f::y
 

FXfloat FX::FXVec4f::z
 

FXfloat FX::FXVec4f::w
 

Copyright © 1997-2005 Jeroen van der Zijp