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

FX::FXVec2f Class Reference

#include <FXVec2f.h>

Public Member Functions

 FXVec2f ()
 
 FXVec2f (const FXVec2f &v)
 
 FXVec2f (const FXfloat v[])
 
 FXVec2f (FXfloat xx, FXfloat yy)
 
FXfloatoperator[] (FXint i)
 
const FXfloatoperator[] (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 lo (const FXVec2f &a, const FXVec2f &b)
 
FXVec2f hi (const FXVec2f &a, const FXVec2f &b)
 
FXVec2f normalize (const FXVec2f &v)
 
FXStreamoperator<< (FXStream &store, const FXVec2f &v)
 
FXStreamoperator>> (FXStream &store, FXVec2f &v)
 

Detailed Description

Single-precision 2-element vector.

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.

References x, and y.

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.

FXVec2f& FX::FXVec2f::operator/= ( FXfloat  n)
inline
FXVec2f& FX::FXVec2f::operator+= ( const FXVec2f v)
inline

References x, and y.

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

References x, and y.

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

Conversions.

FX::FXVec2f::operator const FXfloat * ( ) const
inline
FXVec2f FX::FXVec2f::operator+ ( ) const
inline

Unary.

FXVec2f FX::FXVec2f::operator- ( ) const
inline
FXVec2f FX::FXVec2f::operator+ ( const FXVec2f v) const
inline

Vector and vector.

References x, and y.

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

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

References x, and y.

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

Inequality tests.

References x, and y.

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

References x, and y.

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

References x, and y.

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

References x, and y.

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

Length and square of length.

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

References sqrtf.

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

Clamp values of vector between limits.

References FXCLAMP.

Friends And Related Function Documentation

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

Scaling.

FXVec2f operator* ( FXfloat  n,
const FXVec2f a 
)
friend
FXVec2f operator/ ( const FXVec2f a,
FXfloat  n 
)
friend
FXVec2f operator/ ( FXfloat  n,
const FXVec2f a 
)
friend
bool operator== ( const FXVec2f a,
FXfloat  n 
)
friend
bool operator!= ( const FXVec2f a,
FXfloat  n 
)
friend
bool operator== ( FXfloat  n,
const FXVec2f a 
)
friend
bool operator!= ( FXfloat  n,
const FXVec2f a 
)
friend
bool operator< ( const FXVec2f a,
FXfloat  n 
)
friend
bool operator<= ( const FXVec2f a,
FXfloat  n 
)
friend
bool operator> ( const FXVec2f a,
FXfloat  n 
)
friend
bool operator>= ( const FXVec2f a,
FXfloat  n 
)
friend
bool operator< ( FXfloat  n,
const FXVec2f a 
)
friend
bool operator<= ( FXfloat  n,
const FXVec2f a 
)
friend
bool operator> ( FXfloat  n,
const FXVec2f a 
)
friend
bool operator>= ( FXfloat  n,
const FXVec2f a 
)
friend
FXVec2f lo ( const FXVec2f a,
const FXVec2f b 
)
friend

Lowest or highest components.

FXVec2f hi ( const FXVec2f a,
const FXVec2f b 
)
friend
FXVec2f normalize ( const FXVec2f v)
friend

Normalize vector.

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

Save vector to a stream.

FXStream& operator>> ( FXStream store,
FXVec2f v 
)
friend

Load vector from a stream.

Member Data Documentation

Copyright © 1997-2005 Jeroen van der Zijp