FX::FXVec4f Class Reference

#include <FXVec4f.h>

Inheritance diagram for FX::FXVec4f:

Inheritance graph
[legend]

List of all members.


Detailed Description

Single-precision 4-element vector.

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[])
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 vecdistance (const FXVec3f &p) const
bool veccrosses (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 veclo (const FXVec4f &a, const FXVec4f &b)
FXVec4f vechi (const FXVec4f &a, const FXVec4f &b)
FXAPI FXVec4f vecplane (const FXVec4f &vec)
FXAPI FXVec4f vecplane (const FXVec3f &vec, FXfloat dist)
FXAPI FXVec4f vecplane (const FXVec3f &vec, const FXVec3f &p)
FXAPI FXVec4f vecplane (const FXVec3f &a, const FXVec3f &b, const FXVec3f &c)
FXAPI FXVec4f vecnormalize (const FXVec4f &v)
FXAPI FXStreamoperator<< (FXStream &store, const FXVec4f &v)
FXAPI FXStreamoperator>> (FXStream &store, FXVec4f &v)

Constructor & Destructor Documentation

FX::FXVec4f::FXVec4f (  )  [inline]

Default constructor.

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

Initialize from another vector.

References w, x, y, and z.

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

Construct with 3-vector and optional scalar.

References FX::FXVec3f::x, FX::FXVec3f::y, and FX::FXVec3f::z.

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.

References FX::FXVec3f::x, FX::FXVec3f::y, and FX::FXVec3f::z.

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.

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

Conversion.

FX::FXVec4f::operator FXColor (  )  const

Convert to color.

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

Unary.

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

Vector and vector.

References w, x, y, and z.

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

Vector and matrix.

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

Dot product.

References w, x, y, and z.

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

Test if zero.

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

Equality tests.

References w, x, y, and z.

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

Inequality tests.

References w, x, y, and z.

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

Length and square of length.

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

Clamp values of vector between limits.

FXfloat FX::FXVec4f::vecdistance ( const FXVec3f p  )  const

Signed distance normalized plane and point.

bool FX::FXVec4f::veccrosses ( 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 veclo ( const FXVec4f a,
const FXVec4f b 
) [friend]

Lowest or highest components.

FXAPI FXVec4f vecplane ( const FXVec4f vec  )  [friend]

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

FXAPI FXVec4f vecnormalize ( const FXVec4f v  )  [friend]

Normalize vector.

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

Save to a stream.

FXAPI FXStream& operator>> ( FXStream store,
FXVec4f v 
) [friend]

Load from a stream.


The documentation for this class was generated from the following file:

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:25:39 2008 for TnFOX by doxygen v1.5.6