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

FX::FXVec4f Class Reference

#include <FXVec4f.h>

Inheritance diagram for FX::FXVec4f:
FX::FXQuatf

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.

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

References w, x, y, and 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.

References w, x, y, and z.

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

References w, x, y, and z.

FXVec4f& FX::FXVec4f::operator-= ( const FXVec4f v)
inline

References w, x, y, and z.

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.

References w, x, y, and z.

FXVec4f FX::FXVec4f::operator- ( const FXVec4f v) const
inline

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

References w, x, y, and z.

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

Inequality tests.

References w, x, y, and z.

bool FX::FXVec4f::operator<= ( const FXVec4f v) const
inline

References w, x, y, and z.

bool FX::FXVec4f::operator> ( const FXVec4f v) const
inline

References w, x, y, and z.

bool FX::FXVec4f::operator>= ( const FXVec4f v) const
inline

References w, x, y, and z.

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

Length and square of length.

FXfloat FX::FXVec4f::length ( ) const
inline

References sqrtf.

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

Clamp values of vector between limits.

References FXCLAMP.

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

Copyright © 1997-2005 Jeroen van der Zijp