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

FX::FXVec2f Class Reference

Single-precision 2-element vector. More...

#include <FXVec2f.h>

List of all members.

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[])
FXVec2foperator *= (FXfloat n)
FXVec2foperator/= (FXfloat n)
FXVec2foperator+= (const FXVec2f &v)
FXVec2foperator-= (const FXVec2f &v)
 operator FXfloat * ()
 operator const FXfloat * () const

Public Attributes

FXfloat x
FXfloat y


FXVec2f operator+ (const FXVec2f &v)
FXVec2f operator- (const FXVec2f &v)
FXVec2f operator+ (const FXVec2f &a, const FXVec2f &b)
FXVec2f operator- (const FXVec2f &a, const FXVec2f &b)
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)
FXfloat operator * (const FXVec2f &a, const FXVec2f &b)
int operator! (const FXVec2f &a)
int operator== (const FXVec2f &a, const FXVec2f &b)
int operator!= (const FXVec2f &a, const FXVec2f &b)
int operator== (const FXVec2f &a, FXfloat n)
int operator!= (const FXVec2f &a, FXfloat n)
int operator== (FXfloat n, const FXVec2f &a)
int operator!= (FXfloat n, const FXVec2f &a)
int operator< (const FXVec2f &a, const FXVec2f &b)
int operator<= (const FXVec2f &a, const FXVec2f &b)
int operator> (const FXVec2f &a, const FXVec2f &b)
int operator>= (const FXVec2f &a, const FXVec2f &b)
int operator< (const FXVec2f &a, FXfloat n)
int operator<= (const FXVec2f &a, FXfloat n)
int operator> (const FXVec2f &a, FXfloat n)
int operator>= (const FXVec2f &a, FXfloat n)
int operator< (FXfloat n, const FXVec2f &a)
int operator<= (FXfloat n, const FXVec2f &a)
int operator> (FXfloat n, const FXVec2f &a)
int operator>= (FXfloat n, const FXVec2f &a)
FXfloat len2 (const FXVec2f &a)
FXfloat len (const FXVec2f &a)
FXVec2f normalize (const FXVec2f &a)
FXVec2f lo (const FXVec2f &a, const FXVec2f &b)
FXVec2f hi (const FXVec2f &a, const FXVec2f &b)
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]

Copy constructor.

FX::FXVec2f::FXVec2f FXfloat  xx,
FXfloat  yy

Initialize with 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]


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

Assignment from array of floats.

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

Assigning operators.

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


Friends And Related Function Documentation

FXVec2f operator+ const FXVec2f v  )  [friend]


FXVec2f operator+ const FXVec2f a,
const FXVec2f b


FXVec2f operator- const FXVec2f a,
const FXVec2f b


FXVec2f operator * const FXVec2f a,
FXfloat  n


FXfloat operator * const FXVec2f a,
const FXVec2f b

Dot product.

int operator! const FXVec2f a  )  [friend]

Test if zero.

int operator== const FXVec2f a,
const FXVec2f b

Equality tests.

int operator< const FXVec2f a,
const FXVec2f b

Inequality tests.

FXfloat len2 const FXVec2f a  )  [friend]

Length and square of length.

FXVec2f normalize const FXVec2f a  )  [friend]

Normalize vector.

FXVec2f lo const FXVec2f a,
const FXVec2f b

Lowest or highest components.

FXStream& operator<< FXStream store,
const FXVec2f v

Save vector to a stream.

FXStream& operator>> FXStream store,
FXVec2f v

Load vector from a stream.

Copyright © 1997-2004 Jeroen van der Zijp