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

XFcVector3 Class Reference

3-Dimensional vector. More...

Collaboration diagram for XFcVector3:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 XFcVector3 ()
 Empty constructor.

 XFcVector3 (REAL aX, REAL aY, REAL aZ)
 Creation from 3 REALs.

XFcVector3 & operator+= (const XFcVector3 &aVec)
 Adds components of another vector to this vector.

XFcVector3 operator+ (const XFcVector3 &aVec) const
 Adds components of another vector to this vector.

XFcVector3 operator+ (const INT32 aArg) const
 Adds an integer value to each component of this vector.

XFcVector3 operator+ (const FLOAT32 aArg) const
 Adds a floating point value to each component of this vector.

XFcVector3 & operator-= (const XFcVector3 &aVec)
 Subtracts components of another vector from this vector.

XFcVector3 operator- (const XFcVector3 &aVec) const
 Subtracts components of another vector from this vector.

XFcVector3 operator- (const INT32 aArg) const
 Subtracts an integer value from each component of this vector.

XFcVector3 operator- (const FLOAT32 aArg) const
 Subtracts a floating point value from each component of this vector.

XFcVector3 & operator *= (const INT32 aArg)
 Multiplies components of this vector with an integer value.

XFcVector3 & operator *= (const FLOAT32 aArg)
 Multiplies components of this vector with a floating point value.

XFcVector3 operator * (const INT32 aArg) const
 Multiplies components of this vector with an integer value.

XFcVector3 operator * (const FLOAT32 aArg) const
 Multiplies components of this vector with a floating point value.

XFcVector3 & operator/= (const INT32 aArg)
 Divides components of this vector with an integer value.

XFcVector3 & operator/= (const FLOAT32 aArg)
 Divides components of this vector with a floating point value.

XFcVector3 operator/ (const INT32 aArg) const
 Divides components of this vector with an integer value.

XFcVector3 operator/ (const FLOAT32 aArg) const
 Divides components of this vector with a floating point value.

XFcVector3 operator+ (const REAL &aArg) const
 Adds a REAL value to each component of this vector.

XFcVector3 operator- (const REAL &aArg) const
 Subtracts a REAL value from each component of this vector.

XFcVector3 & operator *= (const REAL &aArg)
 Multiplies components of this vector with a REAL value.

XFcVector3 operator * (const REAL &aArg) const
 Multiplies components of this vector with a REAL value.

XFcVector3 & operator/= (const REAL &aArg)
 Divides components of this vector with a REAL value.

XFcVector3 operator/ (const REAL &aArg) const
 Divides components of this vector with a REAL value.

XFcVector3 operator- () const
 Negates all components of this vector.

REAL dotProduct (const XFcVector3 &aVec)
 Returns dot product of this vector with an another vector.

XFcVector3 crossProduct (const XFcVector3 &aVec)
 Returns cross product of this vector with an another vector.

REAL length ()
 Returns length of this vector.

REAL lengthSq ()
 Returns squared length of this vector.

void normalize ()
 Normalizes this vector.

void normalizeFast ()
 Normalizes this vector. This is fast but has problems with large vectors.

void pseudoNormalize ()
 "Normalizes" this vector to length between 1 and 2. This can be used to make fixed point vector math safe.


Public Attributes

REAL x
 The vector components.

REAL y
 The vector components.

REAL z
 The vector components.


Friends

XFcVector3 operator * (const INT32 aArg, const XFcVector3 &aVec)
 Multiplies components of a vector with an integer value.

XFcVector3 operator * (const FLOAT32 aArg, const XFcVector3 &aVec)
 Multiplies components of a vector with a floating point value.

XFcVector3 operator/ (const INT32 aArg, const XFcVector3 &aVec)
 Divides components of a vector with an integer value.

XFcVector3 operator/ (const FLOAT32 aArg, const XFcVector3 &aVec)
 Divides components of a vector with a floating point value.

XFcVector3 operator * (const REAL &aArg, const XFcVector3 &aVec)
 Multiplies components of a vector with a REAL value.

XFcVector3 operator/ (const REAL &aArg, const XFcVector3 &aVec)
 Divides components of a vector with a REAL value.


Detailed Description

3-Dimensional vector.

Typical vector operators implemented.

See also:
XFcMath


Constructor & Destructor Documentation

XFcVector3::XFcVector3   [inline]
 

Empty constructor.

XFcVector3::XFcVector3 REAL    aX,
REAL    aY,
REAL    aZ
[inline]
 

Creation from 3 REALs.


Member Function Documentation

XFcVector3 XFcVector3::crossProduct const XFcVector3 &    aVec [inline]
 

Returns cross product of this vector with an another vector.

Parameters:
aVec the other vector of the cross product.
Returns:
a new result vector which is the cross product of the vectors.

REAL XFcVector3::dotProduct const XFcVector3 &    aVec [inline]
 

Returns dot product of this vector with an another vector.

Parameters:
aVec the other vector of the dot product.
Returns:
dot product of the vectors.

REAL XFcVector3::length   [inline]
 

Returns length of this vector.

See also:
lengthSq

REAL XFcVector3::lengthSq   [inline]
 

Returns squared length of this vector.

Note:
Calculating squared length is faster than calculating length.
See also:
length

void XFcVector3::normalize   [inline]
 

Normalizes this vector.

void XFcVector3::normalizeFast   [inline]
 

Normalizes this vector. This is fast but has problems with large vectors.

XFcVector3 XFcVector3::operator * const REAL   aArg const [inline]
 

Multiplies components of this vector with a REAL value.

Parameters:
aArg value for the multiplication.
Returns:
a new result vector.

XFcVector3 XFcVector3::operator * const FLOAT32    aArg const [inline]
 

Multiplies components of this vector with a floating point value.

Parameters:
aArg floating point value for the multiplication.
Returns:
a new result vector.

XFcVector3 XFcVector3::operator * const INT32    aArg const [inline]
 

Multiplies components of this vector with an integer value.

Parameters:
aArg integer value for the multiplication.
Returns:
a new result vector.

XFcVector3 & XFcVector3::operator *= const REAL   aArg [inline]
 

Multiplies components of this vector with a REAL value.

Parameters:
aArg value for the multiplication.
Returns:
reference to this vector.

XFcVector3 & XFcVector3::operator *= const FLOAT32    aArg [inline]
 

Multiplies components of this vector with a floating point value.

Parameters:
aArg floating point value for the multiplication.
Returns:
reference to this vector.

XFcVector3 & XFcVector3::operator *= const INT32    aArg [inline]
 

Multiplies components of this vector with an integer value.

Parameters:
aArg integer value for the multiplication.
Returns:
reference to this vector.

XFcVector3 XFcVector3::operator+ const REAL   aArg const [inline]
 

Adds a REAL value to each component of this vector.

Parameters:
aArg value for the addition.
Returns:
a new result vector.

XFcVector3 XFcVector3::operator+ const FLOAT32    aArg const [inline]
 

Adds a floating point value to each component of this vector.

Parameters:
aArg floating point value for the addition.
Returns:
a new result vector.

XFcVector3 XFcVector3::operator+ const INT32    aArg const [inline]
 

Adds an integer value to each component of this vector.

Parameters:
aArg integer value for the addition.
Returns:
a new result vector.

XFcVector3 XFcVector3::operator+ const XFcVector3 &    aVec const [inline]
 

Adds components of another vector to this vector.

Parameters:
aVec vector to be added to this vector.
Returns:
a new result vector.

XFcVector3 & XFcVector3::operator+= const XFcVector3 &    aVec [inline]
 

Adds components of another vector to this vector.

Parameters:
aVec vector to be added to this vector.
Returns:
reference to this vector.

XFcVector3 XFcVector3::operator-   const [inline]
 

Negates all components of this vector.

Returns:
a new result vector.

XFcVector3 XFcVector3::operator- const REAL   aArg const [inline]
 

Subtracts a REAL value from each component of this vector.

Parameters:
aArg value for the subtraction.
Returns:
a new result vector.

XFcVector3 XFcVector3::operator- const FLOAT32    aArg const [inline]
 

Subtracts a floating point value from each component of this vector.

Parameters:
aArg floating point value for the subtraction.
Returns:
a new result vector.

XFcVector3 XFcVector3::operator- const INT32    aArg const [inline]
 

Subtracts an integer value from each component of this vector.

Parameters:
aArg integer value for the subtraction.
Returns:
a new result vector.

XFcVector3 XFcVector3::operator- const XFcVector3 &    aVec const [inline]
 

Subtracts components of another vector from this vector.

Parameters:
aVec vector to be subtracted from this vector.
Returns:
a new result vector.

XFcVector3 & XFcVector3::operator-= const XFcVector3 &    aVec [inline]
 

Subtracts components of another vector from this vector.

Parameters:
aVec vector to be subtracted from this vector.
Returns:
reference to this vector.

XFcVector3 XFcVector3::operator/ const REAL   aArg const [inline]
 

Divides components of this vector with a REAL value.

Parameters:
aArg integer value for the division.
Returns:
a new result vector.

XFcVector3 XFcVector3::operator/ const FLOAT32    aArg const [inline]
 

Divides components of this vector with a floating point value.

Parameters:
aArg floating point value for the division.
Returns:
a new result vector.

XFcVector3 XFcVector3::operator/ const INT32    aArg const [inline]
 

Divides components of this vector with an integer value.

Parameters:
aArg integer value for the division.
Returns:
a new result vector.

XFcVector3 & XFcVector3::operator/= const REAL   aArg [inline]
 

Divides components of this vector with a REAL value.

Parameters:
aArg value for the division.
Returns:
reference to this vector.

XFcVector3 & XFcVector3::operator/= const FLOAT32    aArg [inline]
 

Divides components of this vector with a floating point value.

Parameters:
aArg floating point value for the division.
Returns:
reference to this vector.

XFcVector3 & XFcVector3::operator/= const INT32    aArg [inline]
 

Divides components of this vector with an integer value.

Parameters:
aArg integer value for the division.
Returns:
reference to this vector.

void XFcVector3::pseudoNormalize   [inline]
 

"Normalizes" this vector to length between 1 and 2. This can be used to make fixed point vector math safe.


Friends And Related Function Documentation

XFcVector3 operator * const REAL   aArg,
const XFcVector3 &    aVec
[friend]
 

Multiplies components of a vector with a REAL value.

Parameters:
aArg value for the multiplication.
aVec vector to be multiplied.
Returns:
a new result vector.

XFcVector3 operator * const FLOAT32    aArg,
const XFcVector3 &    aVec
[friend]
 

Multiplies components of a vector with a floating point value.

Parameters:
aArg floating point value for the multiplication.
aVec vector to be multiplied.
Returns:
a new result vector.

XFcVector3 operator * const INT32    aArg,
const XFcVector3 &    aVec
[friend]
 

Multiplies components of a vector with an integer value.

Parameters:
aArg integer value for the multiplication.
aVec vector to be multiplied.
Returns:
a new result vector.

XFcVector3 operator/ const REAL   aArg,
const XFcVector3 &    aVec
[friend]
 

Divides components of a vector with a REAL value.

Parameters:
aArg value for the division.
aVec vector to be divided.
Returns:
a new result vector.

XFcVector3 operator/ const FLOAT32    aArg,
const XFcVector3 &    aVec
[friend]
 

Divides components of a vector with a floating point value.

Parameters:
aArg floating point value for the division.
aVec vector to be divided.
Returns:
a new result vector.

XFcVector3 operator/ const INT32    aArg,
const XFcVector3 &    aVec
[friend]
 

Divides components of a vector with an integer value.

Parameters:
aArg integer value for the division.
aVec vector to be divided.
Returns:
a new result vector.


Member Data Documentation

REAL XFcVector3::x
 

The vector components.

REAL XFcVector3::y
 

The vector components.

REAL XFcVector3::z
 

The vector components.


   
X-Forge Documentation
Confidential
Copyright © 2002-2003 Fathammer
   
Documentation generated
with doxygen
by Dimitri van Heesch