FX::FXVec2f Class Reference

#include <FXVec2f.h>

List of all members.


Detailed Description

Single-precision 2-element vector.

Public Member Functions

 FXVec2f ()
 FXVec2f (const FXVec2f &v)
 FXVec2f (const FXfloat v[])
 FXVec2f (FXfloat xx, FXfloat yy)
FXfloat & operator[] (FXint i)
const FXfloat & operator[] (FXint i) const
FXVec2foperator= (const FXVec2f &v)
FXVec2foperator= (const FXfloat v[])
FXVec2fset (const FXVec2f &v)
FXVec2fset (const FXfloat v[])
FXVec2fset (FXfloat xx, FXfloat yy)
FXVec2foperator*= (FXfloat n)
FXVec2foperator/= (FXfloat n)
FXVec2foperator+= (const FXVec2f &v)
FXVec2foperator-= (const FXVec2f &v)
 operator FXfloat * ()
 operator const FXfloat * () const
FXVec2f operator+ () const
FXVec2f operator- () const
FXVec2f operator+ (const FXVec2f &v) const
FXVec2f operator- (const FXVec2f &v) const
FXVec2f operator* (const FXMat3f &m) const
FXfloat operator* (const FXVec2f &v) const
bool operator! () const
bool operator== (const FXVec2f &v) const
bool operator!= (const FXVec2f &v) const
bool operator< (const FXVec2f &v) const
bool operator<= (const FXVec2f &v) const
bool operator> (const FXVec2f &v) const
bool operator>= (const FXVec2f &v) const
FXfloat length2 () const
FXfloat length () const
FXVec2fclamp (FXfloat lo, FXfloat hi)

Public Attributes

FXfloat x
FXfloat y

Friends

FXVec2f operator* (const FXVec2f &a, FXfloat n)
FXVec2f operator* (FXfloat n, const FXVec2f &a)
FXVec2f operator/ (const FXVec2f &a, FXfloat n)
FXVec2f operator/ (FXfloat n, const FXVec2f &a)
bool operator== (const FXVec2f &a, FXfloat n)
bool operator!= (const FXVec2f &a, FXfloat n)
bool operator== (FXfloat n, const FXVec2f &a)
bool operator!= (FXfloat n, const FXVec2f &a)
bool operator< (const FXVec2f &a, FXfloat n)
bool operator<= (const FXVec2f &a, FXfloat n)
bool operator> (const FXVec2f &a, FXfloat n)
bool operator>= (const FXVec2f &a, FXfloat n)
bool operator< (FXfloat n, const FXVec2f &a)
bool operator<= (FXfloat n, const FXVec2f &a)
bool operator> (FXfloat n, const FXVec2f &a)
bool operator>= (FXfloat n, const FXVec2f &a)
FXVec2f veclo (const FXVec2f &a, const FXVec2f &b)
FXVec2f vechi (const FXVec2f &a, const FXVec2f &b)
FXAPI FXVec2f vecnormalize (const FXVec2f &v)
FXAPI FXStreamoperator<< (FXStream &store, const FXVec2f &v)
FXAPI FXStreamoperator>> (FXStream &store, FXVec2f &v)

Constructor & Destructor Documentation

FX::FXVec2f::FXVec2f (  )  [inline]

Default constructor.

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

Initialize from another vector.

References x, and y.

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

Initialize from array of floats.

FX::FXVec2f::FXVec2f ( FXfloat  xx,
FXfloat  yy 
) [inline]

Initialize from components.


Member Function Documentation

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

Return a non-const reference to the ith element.

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

Return a const reference to the ith element.

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

Assignment.

References x, and y.

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

Assignment from array of floats.

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

Set value from another vector.

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

Set value from array of floats.

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

Set value from components.

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

Assigning operators.

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

Conversions.

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

Unary.

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

Vector and vector.

References x, and y.

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

Vector and matrix.

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

Dot product.

References x, and y.

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

Test if zero.

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

Equality tests.

References x, and y.

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

Inequality tests.

References x, and y.

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

Length and square of length.

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

Clamp values of vector between limits.


Friends And Related Function Documentation

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

Scaling.

FXVec2f veclo ( const FXVec2f a,
const FXVec2f b 
) [friend]

Lowest or highest components.

FXAPI FXVec2f vecnormalize ( const FXVec2f v  )  [friend]

Normalize vector.

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

Save vector to a stream.

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

Load vector 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:28 2008 for TnFOX by doxygen v1.5.6