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

FX::FXVec3d Class Reference

Double-precision 3-element vector. More...

#include <FXVec3d.h>

List of all members.

Public Member Functions

 FXVec3d ()
 FXVec3d (const FXVec3d &v)
 FXVec3d (const FXdouble v[])
 FXVec3d (FXdouble xx, FXdouble yy, FXdouble zz=1.0)
 FXVec3d (FXColor color)
FXdouble & operator[] (FXint i)
const FXdouble & operator[] (FXint i) const
FXVec3d & operator= (FXColor color)
FXVec3d & operator= (const FXVec3d &v)
FXVec3d & operator= (const FXdouble v[])
FXVec3d & set (const FXVec3d &v)
FXVec3d & set (const FXdouble v[])
FXVec3d & set (FXdouble xx, FXdouble yy, FXdouble zz)
FXVec3d & operator *= (FXdouble n)
FXVec3d & operator/= (FXdouble n)
FXVec3d & operator+= (const FXVec3d &v)
FXVec3d & operator-= (const FXVec3d &v)
 operator FXdouble * ()
 operator const FXdouble * () const
 operator FXVec2d & ()
 operator const FXVec2d & () const
 operator FXColor () const
FXVec3d operator+ () const
FXVec3d operator- () const
FXVec3d operator+ (const FXVec3d &v) const
FXVec3d operator- (const FXVec3d &v) const
FXVec3d operator * (const FXMat3d &m) const
FXVec3d operator * (const FXMat4d &m) const
FXdouble operator * (const FXVec3d &v) const
FXVec3d operator^ (const FXVec3d &v) const
bool operator! () const
bool operator== (const FXVec3d &v) const
bool operator!= (const FXVec3d &v) const
bool operator< (const FXVec3d &v) const
bool operator<= (const FXVec3d &v) const
bool operator> (const FXVec3d &v) const
bool operator>= (const FXVec3d &v) const
FXdouble length2 () const
FXdouble length () const
FXVec3d & clamp (FXdouble lo, FXdouble hi)

Public Attributes

FXdouble x
FXdouble y
FXdouble z

Friends

FXVec3d operator * (const FXVec3d &a, FXdouble n)
FXVec3d operator * (FXdouble n, const FXVec3d &a)
FXVec3d operator/ (const FXVec3d &a, FXdouble n)
FXVec3d operator/ (FXdouble n, const FXVec3d &a)
bool operator== (const FXVec3d &a, FXdouble n)
bool operator!= (const FXVec3d &a, FXdouble n)
bool operator== (FXdouble n, const FXVec3d &a)
bool operator!= (FXdouble n, const FXVec3d &a)
bool operator< (const FXVec3d &a, FXdouble n)
bool operator<= (const FXVec3d &a, FXdouble n)
bool operator> (const FXVec3d &a, FXdouble n)
bool operator>= (const FXVec3d &a, FXdouble n)
bool operator< (FXdouble n, const FXVec3d &a)
bool operator<= (FXdouble n, const FXVec3d &a)
bool operator> (FXdouble n, const FXVec3d &a)
bool operator>= (FXdouble n, const FXVec3d &a)
FXVec3d lo (const FXVec3d &a, const FXVec3d &b)
FXVec3d hi (const FXVec3d &a, const FXVec3d &b)
FXVec3d normal (const FXVec3d &a, const FXVec3d &b, const FXVec3d &c)
FXVec3d normal (const FXVec3d &a, const FXVec3d &b, const FXVec3d &c, const FXVec3d &d)
FXVec3d normalize (const FXVec3d &v)
FXStream & operator<< (FXStream &store, const FXVec3d &v)
FXStream & operator>> (FXStream &store, FXVec3d &v)


Detailed Description

Double-precision 3-element vector.


Constructor & Destructor Documentation

FX::FXVec3d::FXVec3d (   )  [inline]
 

Default constructor.

FX::FXVec3d::FXVec3d (  const FXVec3d &  v  )  [inline]
 

Initialize from another vector.

FX::FXVec3d::FXVec3d (  const FXdouble  v[]  )  [inline]
 

Initialize from array of doubles.

FX::FXVec3d::FXVec3d (  FXdouble  xx,
FXdouble  yy,
FXdouble  zz = 1.0
)  [inline]
 

Initialize with components.

FX::FXVec3d::FXVec3d (  FXColor  color  ) 
 

Initialize with color.


Member Function Documentation

FXdouble& FX::FXVec3d::operator[] (  FXint  i  )  [inline]
 

Return a non-const reference to the ith element.

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

Return a const reference to the ith element.

FXVec3d& FX::FXVec3d::operator= (  FXColor  color  ) 
 

Assign color.

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

Assignment.

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

Assignment from array of doubles.

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

Set value from another vector.

FXVec3d& FX::FXVec3d::set (  const FXdouble  v[]  )  [inline]
 

Set value from array of floats.

FXVec3d& FX::FXVec3d::set (  FXdouble  xx,
FXdouble  yy,
FXdouble  zz
)  [inline]
 

Set value from components.

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

Assigning operators.

FXVec3d& FX::FXVec3d::operator/= (  FXdouble  n  )  [inline]
 

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

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

FX::FXVec3d::operator FXdouble * (   )  [inline]
 

Conversions.

FX::FXVec3d::operator const FXdouble * (   )  const [inline]
 

FX::FXVec3d::operator FXVec2d & (   )  [inline]
 

FX::FXVec3d::operator const FXVec2d & (   )  const [inline]
 

FX::FXVec3d::operator FXColor (   )  const
 

Convert to color.

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

Unary.

FXVec3d FX::FXVec3d::operator- (   )  const [inline]
 

FXVec3d FX::FXVec3d::operator+ (  const FXVec3d &  v  )  const [inline]
 

Vector and vector.

FXVec3d FX::FXVec3d::operator- (  const FXVec3d &  v  )  const [inline]
 

FXVec3d FX::FXVec3d::operator * (  const FXMat3d &  m  )  const
 

Vector and matrix.

FXVec3d FX::FXVec3d::operator * (  const FXMat4d &  m  )  const
 

FXdouble FX::FXVec3d::operator * (  const FXVec3d &  v  )  const [inline]
 

Dot product.

FXVec3d FX::FXVec3d::operator^ (  const FXVec3d &  v  )  const [inline]
 

Cross product.

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

Test if zero.

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

Equality tests.

bool FX::FXVec3d::operator!= (  const FXVec3d &  v  )  const [inline]
 

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

Inequality tests.

bool FX::FXVec3d::operator<= (  const FXVec3d &  v  )  const [inline]
 

bool FX::FXVec3d::operator> (  const FXVec3d &  v  )  const [inline]
 

bool FX::FXVec3d::operator>= (  const FXVec3d &  v  )  const [inline]
 

FXdouble FX::FXVec3d::length2 (   )  const [inline]
 

Length and square of length.

FXdouble FX::FXVec3d::length (   )  const [inline]
 

FXVec3d& FX::FXVec3d::clamp (  FXdouble  lo,
FXdouble  hi
)  [inline]
 

Clamp values of vector between limits.


Friends And Related Function Documentation

FXVec3d operator * (  const FXVec3d &  a,
FXdouble  n
)  [friend]
 

Scaling.

FXVec3d operator * (  FXdouble  n,
const FXVec3d &  a
)  [friend]
 

FXVec3d operator/ (  const FXVec3d &  a,
FXdouble  n
)  [friend]
 

FXVec3d operator/ (  FXdouble  n,
const FXVec3d &  a
)  [friend]
 

bool operator== (  const FXVec3d &  a,
FXdouble  n
)  [friend]
 

bool operator!= (  const FXVec3d &  a,
FXdouble  n
)  [friend]
 

bool operator== (  FXdouble  n,
const FXVec3d &  a
)  [friend]
 

bool operator!= (  FXdouble  n,
const FXVec3d &  a
)  [friend]
 

bool operator< (  const FXVec3d &  a,
FXdouble  n
)  [friend]
 

bool operator<= (  const FXVec3d &  a,
FXdouble  n
)  [friend]
 

bool operator> (  const FXVec3d &  a,
FXdouble  n
)  [friend]
 

bool operator>= (  const FXVec3d &  a,
FXdouble  n
)  [friend]
 

bool operator< (  FXdouble  n,
const FXVec3d &  a
)  [friend]
 

bool operator<= (  FXdouble  n,
const FXVec3d &  a
)  [friend]
 

bool operator> (  FXdouble  n,
const FXVec3d &  a
)  [friend]
 

bool operator>= (  FXdouble  n,
const FXVec3d &  a
)  [friend]
 

FXVec3d lo (  const FXVec3d &  a,
const FXVec3d &  b
)  [friend]
 

Lowest or highest components.

FXVec3d hi (  const FXVec3d &  a,
const FXVec3d &  b
)  [friend]
 

FXVec3d normal (  const FXVec3d &  a,
const FXVec3d &  b,
const FXVec3d &  c
)  [friend]
 

Compute normal from three points a,b,c.

FXVec3d normal (  const FXVec3d &  a,
const FXVec3d &  b,
const FXVec3d &  c,
const FXVec3d &  d
)  [friend]
 

Compute approximate normal from four points a,b,c,d.

FXVec3d normalize (  const FXVec3d &  v  )  [friend]
 

Normalize vector.

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

Save vector to a stream.

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

Load vector from a stream.


Member Data Documentation

FXdouble FX::FXVec3d::x
 

FXdouble FX::FXVec3d::y
 

FXdouble FX::FXVec3d::z
 

Copyright © 1997-2005 Jeroen van der Zijp