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

FX::FXVec3f Class Reference

Single-precision 3-element vector. More...

#include <FXVec3f.h>

List of all members.

Public Member Functions

 FXVec3f ()
 FXVec3f (const FXVec3f &v)
 FXVec3f (const FXfloat v[])
 FXVec3f (FXfloat xx, FXfloat yy, FXfloat zz=1.0f)
FXfloatoperator[] (FXint i)
const FXfloatoperator[] (FXint i) const
FXVec3foperator= (const FXVec3f &v)
FXVec3foperator= (const FXfloat v[])
FXVec3fset (const FXVec3f &v)
FXVec3fset (const FXfloat v[])
FXVec3fset (FXfloat xx, FXfloat yy, FXfloat zz)
FXVec3foperator*= (FXfloat n)
FXVec3foperator/= (FXfloat n)
FXVec3foperator+= (const FXVec3f &v)
FXVec3foperator-= (const FXVec3f &v)
 operator FXfloat * ()
 operator const FXfloat * () const
 operator FXVec2f & ()
 operator const FXVec2f & () const
FXVec3f operator+ () const
FXVec3f operator- () const
FXVec3f operator+ (const FXVec3f &v) const
FXVec3f operator- (const FXVec3f &v) const
FXVec3f operator* (const FXMat3f &m) const
FXVec3f operator* (const FXMat4f &m) const
FXfloat operator* (const FXVec3f &v) const
FXVec3f operator^ (const FXVec3f &v) const
FXbool operator! () const
FXbool operator== (const FXVec3f &v) const
FXbool operator!= (const FXVec3f &v) const
FXbool operator< (const FXVec3f &v) const
FXbool operator<= (const FXVec3f &v) const
FXbool operator> (const FXVec3f &v) const
FXbool operator>= (const FXVec3f &v) const
FXfloat length2 () const
FXfloat length () const
FXVec3fclamp (FXfloat lo, FXfloat hi)

Public Attributes

FXfloat x
FXfloat y
FXfloat z

Friends

FXVec3f operator* (const FXVec3f &a, FXfloat n)
FXVec3f operator* (FXfloat n, const FXVec3f &a)
FXVec3f operator/ (const FXVec3f &a, FXfloat n)
FXVec3f operator/ (FXfloat n, const FXVec3f &a)
FXbool operator== (const FXVec3f &a, FXfloat n)
FXbool operator!= (const FXVec3f &a, FXfloat n)
FXbool operator== (FXfloat n, const FXVec3f &a)
FXbool operator!= (FXfloat n, const FXVec3f &a)
FXbool operator< (const FXVec3f &a, FXfloat n)
FXbool operator<= (const FXVec3f &a, FXfloat n)
FXbool operator> (const FXVec3f &a, FXfloat n)
FXbool operator>= (const FXVec3f &a, FXfloat n)
FXbool operator< (FXfloat n, const FXVec3f &a)
FXbool operator<= (FXfloat n, const FXVec3f &a)
FXbool operator> (FXfloat n, const FXVec3f &a)
FXbool operator>= (FXfloat n, const FXVec3f &a)
FXVec3f lo (const FXVec3f &a, const FXVec3f &b)
FXVec3f hi (const FXVec3f &a, const FXVec3f &b)
FXColor colorFromVec3f (const FXVec3f &vec)
FXVec3f colorToVec3f (FXColor clr)
FXVec3f normal (const FXVec3f &a, const FXVec3f &b, const FXVec3f &c)
FXVec3f normal (const FXVec3f &a, const FXVec3f &b, const FXVec3f &c, const FXVec3f &d)
FXVec3f normalize (const FXVec3f &v)
FXStreamoperator<< (FXStream &store, const FXVec3f &v)
FXStreamoperator>> (FXStream &store, FXVec3f &v)


Detailed Description

Single-precision 3-element vector.

Constructor & Destructor Documentation

FX::FXVec3f::FXVec3f (  )  [inline]

Default constructor; value is not initialized.

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

Initialize from another vector.

References x, y, and z.

FX::FXVec3f::FXVec3f ( const FXfloat  v[]  )  [inline]

Initialize from array of floats.

FX::FXVec3f::FXVec3f ( FXfloat  xx,
FXfloat  yy,
FXfloat  zz = 1.0f 
) [inline]

Initialize from components.


Member Function Documentation

FXfloat& FX::FXVec3f::operator[] ( FXint  i  )  [inline]

Return a non-const reference to the ith element.

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

Return a const reference to the ith element.

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

Assignment.

References x, y, and z.

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

Assignment from array of floats.

FXVec3f& FX::FXVec3f::set ( const FXVec3f v  )  [inline]

Set value from another vector.

References x.

FXVec3f& FX::FXVec3f::set ( const FXfloat  v[]  )  [inline]

Set value from array of floats.

FXVec3f& FX::FXVec3f::set ( FXfloat  xx,
FXfloat  yy,
FXfloat  zz 
) [inline]

Set value from components.

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

Assigning operators.

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

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

References x, y, and z.

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

References x, y, and z.

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

Conversions.

FX::FXVec3f::operator const FXfloat * (  )  const [inline]

FX::FXVec3f::operator FXVec2f & (  )  [inline]

FX::FXVec3f::operator const FXVec2f & (  )  const [inline]

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

Unary.

FXVec3f FX::FXVec3f::operator- (  )  const [inline]

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

Vector and vector.

References x, y, and z.

FXVec3f FX::FXVec3f::operator- ( const FXVec3f v  )  const [inline]

References x, y, and z.

FXVec3f FX::FXVec3f::operator* ( const FXMat3f m  )  const

Vector and matrix.

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

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

Dot product.

References x, y, and z.

FXVec3f FX::FXVec3f::operator^ ( const FXVec3f v  )  const [inline]

Cross product.

References x, y, and z.

FXbool FX::FXVec3f::operator! (  )  const [inline]

Test if zero.

FXbool FX::FXVec3f::operator== ( const FXVec3f v  )  const [inline]

Equality tests.

References x, y, and z.

FXbool FX::FXVec3f::operator!= ( const FXVec3f v  )  const [inline]

References x, y, and z.

FXbool FX::FXVec3f::operator< ( const FXVec3f v  )  const [inline]

Inequality tests.

References x, y, and z.

FXbool FX::FXVec3f::operator<= ( const FXVec3f v  )  const [inline]

References x, y, and z.

FXbool FX::FXVec3f::operator> ( const FXVec3f v  )  const [inline]

References x, y, and z.

FXbool FX::FXVec3f::operator>= ( const FXVec3f v  )  const [inline]

References x, y, and z.

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

Length and square of length.

FXfloat FX::FXVec3f::length (  )  const [inline]

References sqrtf.

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

Clamp values of vector between limits.

References FXCLAMP.


Friends And Related Function Documentation

FXVec3f operator* ( const FXVec3f a,
FXfloat  n 
) [friend]

Scaling.

FXVec3f operator* ( FXfloat  n,
const FXVec3f a 
) [friend]

FXVec3f operator/ ( const FXVec3f a,
FXfloat  n 
) [friend]

FXVec3f operator/ ( FXfloat  n,
const FXVec3f a 
) [friend]

FXbool operator== ( const FXVec3f a,
FXfloat  n 
) [friend]

FXbool operator!= ( const FXVec3f a,
FXfloat  n 
) [friend]

FXbool operator== ( FXfloat  n,
const FXVec3f a 
) [friend]

FXbool operator!= ( FXfloat  n,
const FXVec3f a 
) [friend]

FXbool operator< ( const FXVec3f a,
FXfloat  n 
) [friend]

FXbool operator<= ( const FXVec3f a,
FXfloat  n 
) [friend]

FXbool operator> ( const FXVec3f a,
FXfloat  n 
) [friend]

FXbool operator>= ( const FXVec3f a,
FXfloat  n 
) [friend]

FXbool operator< ( FXfloat  n,
const FXVec3f a 
) [friend]

FXbool operator<= ( FXfloat  n,
const FXVec3f a 
) [friend]

FXbool operator> ( FXfloat  n,
const FXVec3f a 
) [friend]

FXbool operator>= ( FXfloat  n,
const FXVec3f a 
) [friend]

FXVec3f lo ( const FXVec3f a,
const FXVec3f b 
) [friend]

Lowest or highest components.

FXVec3f hi ( const FXVec3f a,
const FXVec3f b 
) [friend]

FXColor colorFromVec3f ( const FXVec3f vec  )  [friend]

Convert vector to color and back.

FXVec3f colorToVec3f ( FXColor  clr  )  [friend]

FXVec3f normal ( const FXVec3f a,
const FXVec3f b,
const FXVec3f c 
) [friend]

Compute normal from three points a,b,c.

FXVec3f normal ( const FXVec3f a,
const FXVec3f b,
const FXVec3f c,
const FXVec3f d 
) [friend]

Compute approximate normal from four points a,b,c,d.

FXVec3f normalize ( const FXVec3f v  )  [friend]

Normalize vector.

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

Save vector to a stream.

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

Load vector from a stream.


Member Data Documentation

Copyright © 1997-2009 Jeroen van der Zijp