FX::FXVec4d Class Reference

#include <FXVec4d.h>

Inheritance diagram for FX::FXVec4d:

Inheritance graph
[legend]

List of all members.


Detailed Description

Double-precision 4-element vector.

Public Member Functions

 FXVec4d ()
 FXVec4d (const FXVec4d &v)
 FXVec4d (const FXVec3d &v, FXdouble ww=1.0)
 FXVec4d (const FXdouble v[])
 FXVec4d (FXdouble xx, FXdouble yy, FXdouble zz, FXdouble ww=1.0)
 FXVec4d (FXColor color)
FXdouble & operator[] (FXint i)
const FXdouble & operator[] (FXint i) const
FXVec4doperator= (FXColor color)
FXVec4doperator= (const FXVec3d &v)
FXVec4doperator= (const FXVec4d &v)
FXVec4doperator= (const FXdouble v[])
FXVec4dset (const FXVec4d &v)
FXVec4dset (const FXdouble v[])
FXVec4dset (FXdouble xx, FXdouble yy, FXdouble zz, FXdouble ww)
FXVec4doperator*= (FXdouble n)
FXVec4doperator/= (FXdouble n)
FXVec4doperator+= (const FXVec4d &v)
FXVec4doperator-= (const FXVec4d &v)
 operator FXdouble * ()
 operator const FXdouble * () const
 operator FXVec3d & ()
 operator const FXVec3d & () const
 operator FXColor () const
FXVec4d operator+ () const
FXVec4d operator- () const
FXVec4d operator+ (const FXVec4d &v) const
FXVec4d operator- (const FXVec4d &v) const
FXVec4d operator* (const FXMat4d &m) const
FXdouble operator* (const FXVec4d &v) const
bool operator! () const
bool operator== (const FXVec4d &v) const
bool operator!= (const FXVec4d &v) const
bool operator< (const FXVec4d &v) const
bool operator<= (const FXVec4d &v) const
bool operator> (const FXVec4d &v) const
bool operator>= (const FXVec4d &v) const
FXdouble length2 () const
FXdouble length () const
FXVec4dclamp (FXdouble lo, FXdouble hi)
FXdouble vecdistance (const FXVec3d &p) const
bool veccrosses (const FXVec3d &a, const FXVec3d &b) const

Public Attributes

FXdouble x
FXdouble y
FXdouble z
FXdouble w

Friends

FXVec4d operator* (const FXVec4d &a, FXdouble n)
FXVec4d operator* (FXdouble n, const FXVec4d &a)
FXVec4d operator/ (const FXVec4d &a, FXdouble n)
FXVec4d operator/ (FXdouble n, const FXVec4d &a)
bool operator== (const FXVec4d &a, FXdouble n)
bool operator!= (const FXVec4d &a, FXdouble n)
bool operator== (FXdouble n, const FXVec4d &a)
bool operator!= (FXdouble n, const FXVec4d &a)
bool operator< (const FXVec4d &a, FXdouble n)
bool operator<= (const FXVec4d &a, FXdouble n)
bool operator> (const FXVec4d &a, FXdouble n)
bool operator>= (const FXVec4d &a, FXdouble n)
bool operator< (FXdouble n, const FXVec4d &a)
bool operator<= (FXdouble n, const FXVec4d &a)
bool operator> (FXdouble n, const FXVec4d &a)
bool operator>= (FXdouble n, const FXVec4d &a)
FXVec4d veclo (const FXVec4d &a, const FXVec4d &b)
FXVec4d vechi (const FXVec4d &a, const FXVec4d &b)
FXAPI FXVec4d vecplane (const FXVec4d &vec)
FXAPI FXVec4d vecplane (const FXVec3d &vec, FXdouble dist)
FXAPI FXVec4d vecplane (const FXVec3d &vec, const FXVec3d &p)
FXAPI FXVec4d vecplane (const FXVec3d &a, const FXVec3d &b, const FXVec3d &c)
FXAPI FXVec4d vecnormalize (const FXVec4d &v)
FXAPI FXStreamoperator<< (FXStream &store, const FXVec4d &v)
FXAPI FXStreamoperator>> (FXStream &store, FXVec4d &v)

Constructor & Destructor Documentation

FX::FXVec4d::FXVec4d (  )  [inline]

Default constructor.

FX::FXVec4d::FXVec4d ( const FXVec4d v  )  [inline]

Initialize from another vector.

References w, x, y, and z.

FX::FXVec4d::FXVec4d ( const FXVec3d v,
FXdouble  ww = 1.0 
) [inline]

Construct with 3-vector and optional scalar.

References FX::FXVec3d::x, FX::FXVec3d::y, and FX::FXVec3d::z.

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

Initialize from array of doubles.

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

Initialize with components.

FX::FXVec4d::FXVec4d ( FXColor  color  ) 

Initialize with color.


Member Function Documentation

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

Return a non-const reference to the ith element.

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

Return a const reference to the ith element.

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

Assign color.

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

Assignment.

References FX::FXVec3d::x, FX::FXVec3d::y, and FX::FXVec3d::z.

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

Assignment from array of doubles.

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

Set value from another vector.

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

Set value from array of floats.

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

Set value from components.

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

Assigning operators.

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

Conversion.

FX::FXVec4d::operator FXColor (  )  const

Convert to color.

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

Unary.

FXVec4d FX::FXVec4d::operator+ ( const FXVec4d v  )  const [inline]

Vector and vector.

References w, x, y, and z.

FXVec4d FX::FXVec4d::operator* ( const FXMat4d m  )  const

Vector and matrix.

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

Dot product.

References w, x, y, and z.

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

Test if zero.

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

Equality tests.

References w, x, y, and z.

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

Inequality tests.

References w, x, y, and z.

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

Length and square of length.

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

Clamp values of vector between limits.

FXdouble FX::FXVec4d::vecdistance ( const FXVec3d p  )  const

Signed distance normalized plane and point.

bool FX::FXVec4d::veccrosses ( const FXVec3d a,
const FXVec3d b 
) const

Return true if edge a-b crosses plane.


Friends And Related Function Documentation

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

Scaling.

FXVec4d veclo ( const FXVec4d a,
const FXVec4d b 
) [friend]

Lowest or highest components.

FXAPI FXVec4d vecplane ( const FXVec4d vec  )  [friend]

Compute normalized plane equation ax+by+cz+d=0.

FXAPI FXVec4d vecnormalize ( const FXVec4d v  )  [friend]

Normalize vector.

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

Save to a stream.

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

Load from a stream.


The documentation for this class was generated from the following file:

(C) 2002-2008 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Jun 13 22:25:36 2008 for TnFOX by doxygen v1.5.6