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

Friends

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 const FXfloat  v[]  )  [inline]
 

Initialize from array of floats.

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

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]
 

Assignment.

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]
 

Conversions.


Friends And Related Function Documentation

FXVec2f operator+ const FXVec2f v  )  [friend]
 

Unary.

FXVec2f operator+ const FXVec2f a,
const FXVec2f b
[friend]
 

Adding.

FXVec2f operator- const FXVec2f a,
const FXVec2f b
[friend]
 

Subtracting.

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

Scaling.

FXfloat operator * const FXVec2f a,
const FXVec2f b
[friend]
 

Dot product.

int operator! const FXVec2f a  )  [friend]
 

Test if zero.

int operator== const FXVec2f a,
const FXVec2f b
[friend]
 

Equality tests.

int operator< const FXVec2f a,
const FXVec2f b
[friend]
 

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
[friend]
 

Lowest or highest components.

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.

Copyright © 1997-2005 Jeroen van der Zijp