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

FX::FXVec2d Class Reference

Double-precision 2-element vector. More...

#include <FXVec2d.h>

List of all members.

Public Member Functions

 FXVec2d ()
 FXVec2d (const FXVec2d &v)
 FXVec2d (const FXdouble v[])
 FXVec2d (FXdouble xx, FXdouble yy)
FXdouble & operator[] (FXint i)
const FXdouble & operator[] (FXint i) const
FXVec2doperator= (const FXVec2d &v)
FXVec2doperator= (const FXdouble v[])
FXVec2doperator *= (FXdouble n)
FXVec2doperator/= (FXdouble n)
FXVec2doperator+= (const FXVec2d &v)
FXVec2doperator-= (const FXVec2d &v)
 operator FXdouble * ()
 operator const FXdouble * () const

Public Attributes

FXdouble x
FXdouble y

Friends

FXVec2d operator+ (const FXVec2d &v)
FXVec2d operator- (const FXVec2d &v)
FXVec2d operator+ (const FXVec2d &a, const FXVec2d &b)
FXVec2d operator- (const FXVec2d &a, const FXVec2d &b)
FXVec2d operator * (const FXVec2d &a, FXdouble n)
FXVec2d operator * (FXdouble n, const FXVec2d &a)
FXVec2d operator/ (const FXVec2d &a, FXdouble n)
FXVec2d operator/ (FXdouble n, const FXVec2d &a)
FXdouble operator * (const FXVec2d &a, const FXVec2d &b)
int operator! (const FXVec2d &a)
int operator== (const FXVec2d &a, const FXVec2d &b)
int operator!= (const FXVec2d &a, const FXVec2d &b)
int operator== (const FXVec2d &a, FXdouble n)
int operator!= (const FXVec2d &a, FXdouble n)
int operator== (FXdouble n, const FXVec2d &a)
int operator!= (FXdouble n, const FXVec2d &a)
int operator< (const FXVec2d &a, const FXVec2d &b)
int operator<= (const FXVec2d &a, const FXVec2d &b)
int operator> (const FXVec2d &a, const FXVec2d &b)
int operator>= (const FXVec2d &a, const FXVec2d &b)
int operator< (const FXVec2d &a, FXdouble n)
int operator<= (const FXVec2d &a, FXdouble n)
int operator> (const FXVec2d &a, FXdouble n)
int operator>= (const FXVec2d &a, FXdouble n)
int operator< (FXdouble n, const FXVec2d &a)
int operator<= (FXdouble n, const FXVec2d &a)
int operator> (FXdouble n, const FXVec2d &a)
int operator>= (FXdouble n, const FXVec2d &a)
FXdouble len2 (const FXVec2d &a)
FXdouble len (const FXVec2d &a)
FXVec2d normalize (const FXVec2d &a)
FXVec2d lo (const FXVec2d &a, const FXVec2d &b)
FXVec2d hi (const FXVec2d &a, const FXVec2d &b)
FXStreamoperator<< (FXStream &store, const FXVec2d &v)
FXStreamoperator>> (FXStream &store, FXVec2d &v)


Detailed Description

Double-precision 2-element vector.


Constructor & Destructor Documentation

FX::FXVec2d::FXVec2d  )  [inline]
 

Default constructor.

FX::FXVec2d::FXVec2d const FXVec2d v  )  [inline]
 

Copy constructor.

FX::FXVec2d::FXVec2d const FXdouble  v[]  )  [inline]
 

Initialize from array of floats.

FX::FXVec2d::FXVec2d FXdouble  xx,
FXdouble  yy
[inline]
 

Initialize with components.


Member Function Documentation

FXdouble& FX::FXVec2d::operator[] FXint  i  )  [inline]
 

Return a non-const reference to the ith element.

const FXdouble& FX::FXVec2d::operator[] FXint  i  )  const [inline]
 

Return a const reference to the ith element.

FXVec2d& FX::FXVec2d::operator= const FXVec2d v  )  [inline]
 

Assignment.

FXVec2d& FX::FXVec2d::operator= const FXdouble  v[]  )  [inline]
 

Assignment from array of floats.

FXVec2d& FX::FXVec2d::operator *= FXdouble  n  )  [inline]
 

Assigning operators.

FX::FXVec2d::operator FXdouble *  )  [inline]
 

Conversions.


Friends And Related Function Documentation

FXVec2d operator+ const FXVec2d v  )  [friend]
 

Unary.

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

Adding.

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

Subtracting.

FXVec2d operator * const FXVec2d a,
FXdouble  n
[friend]
 

Scaling.

FXdouble operator * const FXVec2d a,
const FXVec2d b
[friend]
 

Dot product.

int operator! const FXVec2d a  )  [friend]
 

Test if zero.

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

Equality tests.

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

Inequality tests.

FXdouble len2 const FXVec2d a  )  [friend]
 

Length and square of length.

FXVec2d normalize const FXVec2d a  )  [friend]
 

Normalize vector.

FXVec2d lo const FXVec2d a,
const FXVec2d b
[friend]
 

Lowest or highest components.

FXStream& operator<< FXStream store,
const FXVec2d v
[friend]
 

Save vector to a stream.

FXStream& operator>> FXStream store,
FXVec2d v
[friend]
 

Load vector from a stream.

Copyright © 1997-2005 Jeroen van der Zijp