N3DVECTOR3 Functions


Data Structures

struct  N3DVECTOR3
 Describes a vector in 3D space. More...

Functions

N3DINLINE void N3DVec3Add (N3DVECTOR3 &_dest, const N3DVECTOR3 &_v1, const N3DVECTOR3 &_v2)
 Adds two 3-D vectors.
N3DINLINE void N3DVec3Cross (N3DVECTOR3 &_dest, const N3DVECTOR3 &_v1, const N3DVECTOR3 &_v2)
 Determines the cross-product of two 3-D vectors.
N3DINLINE N3DFLOAT N3DVec3Dot (const N3DVECTOR3 &_v1, const N3DVECTOR3 &_v2)
 Determines the dot-product of two 3-D vectors.
N3DINLINE N3DFLOAT N3DVec3Length (const N3DVECTOR3 &_v)
 Returns the length of a 3-D vector.
N3DINLINE N3DFLOAT N3DVec3LengthSq (const N3DVECTOR3 &_v)
 Returns the square of the length of a 3-D vector.
N3DINLINE void N3DVec3Lerp (N3DVECTOR3 &_dest, const N3DVECTOR3 &_v1, const N3DVECTOR3 &_v2, N3DFLOAT _s)
 Performs a linear interpolation between two 3D vectors.
N3DINLINE void N3DVec3Maximize (N3DVECTOR3 &_dest, const N3DVECTOR3 &_v1, const N3DVECTOR3 &_v2)
 Returns a 3-D vector that is made up of the largest components of two 3-D vectors.
N3DINLINE void N3DVec3Minimize (N3DVECTOR3 &_dest, const N3DVECTOR3 &_v1, const N3DVECTOR3 &_v2)
 Returns a 3-D vector that is made up of the smallest components of two 3-D vectors.
N3DINLINE void N3DVec3Normalize (N3DVECTOR3 &_dest, const N3DVECTOR3 &_v)
 Returns the normalized version of a 3-D vector.
N3DINLINE void N3DVec3RotationY (N3DVECTOR3 &_dest, const N3DVECTOR3 &_v, const N3DFLOAT _angle)
 Rotates a vector around the y-axis.
N3DINLINE void N3DVec3Scale (N3DVECTOR3 &_dest, const N3DVECTOR3 &_v, N3DFLOAT _scale)
 Scale a 3-D vector.
N3DINLINE void N3DVec3Subtract (N3DVECTOR3 &_dest, const N3DVECTOR3 &_v1, const N3DVECTOR3 &_v2)
 Subtracts two 3-D vectors.

Function Documentation

N3DINLINE void N3DVec3Add ( N3DVECTOR3 _dest,
const N3DVECTOR3 _v1,
const N3DVECTOR3 _v2 
)

Adds two 3-D vectors.

Parameters:
[in,out] _dest Reference to the N3DVECTOR3 structure that is the result of the operation.
[in] _v1 Reference to a source N3DVECTOR3 structure.
[in] _v2 Reference to a source N3DVECTOR3 structure.

N3DINLINE void N3DVec3Cross ( N3DVECTOR3 _dest,
const N3DVECTOR3 _v1,
const N3DVECTOR3 _v2 
)

Determines the cross-product of two 3-D vectors.

Parameters:
[in,out] _dest Reference to the N3DVECTOR3 structure that is the result of the operation.
[in] _v1 Reference to a source N3DVECTOR3 structure.
[in] _v2 Reference to a source N3DVECTOR3 structure.

N3DINLINE N3DFLOAT N3DVec3Dot ( const N3DVECTOR3 _v1,
const N3DVECTOR3 _v2 
)

Determines the dot-product of two 3-D vectors.

Parameters:
[in] _v1 Reference to a source N3DVECTOR3 structure.
[in] _v2 Reference to a source N3DVECTOR3 structure.
Returns:
The dot-product.
Todo:
Fix possible overflow bug

N3DINLINE N3DFLOAT N3DVec3Length ( const N3DVECTOR3 _v  ) 

Returns the length of a 3-D vector.

Parameters:
[in,out] _dest Reference to the N3DVECTOR3 structure that is the result of the operation.

N3DINLINE N3DFLOAT N3DVec3LengthSq ( const N3DVECTOR3 _v  ) 

Returns the square of the length of a 3-D vector.

Parameters:
[in,out] _dest Reference to the N3DVECTOR3 structure that is the result of the operation.
Todo:
Fix possible overflow bug

N3DINLINE void N3DVec3Lerp ( N3DVECTOR3 _dest,
const N3DVECTOR3 _v1,
const N3DVECTOR3 _v2,
N3DFLOAT  _s 
)

Performs a linear interpolation between two 3D vectors.

Parameters:
[in,out] _dest Reference to the N3DVECTOR3 structure that is the result of the operation.
[in] _v1 Reference to a source N3DVECTOR3 structure.
[in] _v2 Reference to a source N3DVECTOR3 structure.
[in] _s Weighting factor in ranges from 0..1 that linearly interpolates between the vectors.

N3DINLINE void N3DVec3Maximize ( N3DVECTOR3 _dest,
const N3DVECTOR3 _v1,
const N3DVECTOR3 _v2 
)

Returns a 3-D vector that is made up of the largest components of two 3-D vectors.

Parameters:
[in,out] _dest Reference to the N3DVECTOR3 structure that is the result of the operation.
[in] _v1 Reference to a source N3DVECTOR3 structure.
[in] _v2 Reference to a source N3DVECTOR3 structure.

N3DINLINE void N3DVec3Minimize ( N3DVECTOR3 _dest,
const N3DVECTOR3 _v1,
const N3DVECTOR3 _v2 
)

Returns a 3-D vector that is made up of the smallest components of two 3-D vectors.

Parameters:
[in,out] _dest Reference to the N3DVECTOR3 structure that is the result of the operation.
[in] _v1 Reference to a source N3DVECTOR3 structure.
[in] _v2 Reference to a source N3DVECTOR3 structure.

N3DINLINE void N3DVec3Normalize ( N3DVECTOR3 _dest,
const N3DVECTOR3 _v 
)

Returns the normalized version of a 3-D vector.

Parameters:
[in,out] _dest Reference to the N3DVECTOR3 structure that is the result of the operation.
[in] _v Reference to a source N3DVECTOR3 structure.
Todo:
Use hardware sqrt

N3DINLINE void N3DVec3RotationY ( N3DVECTOR3 _dest,
const N3DVECTOR3 _v,
const N3DFLOAT  _angle 
)

Rotates a vector around the y-axis.

Parameters:
[in,out] _dest Reference to the N3DVECTOR3 structure that is the result of the operation.
[in] _v Reference to a source N3DVECTOR3 structure.
[in] _angle Angle of rotation in radians.

N3DINLINE void N3DVec3Scale ( N3DVECTOR3 _dest,
const N3DVECTOR3 _v,
N3DFLOAT  _scale 
)

Scale a 3-D vector.

Parameters:
[in,out] _dest Reference to the N3DVECTOR3 structure that is the result of the operation.
[in] _v Reference to a source N3DVECTOR3 structure.
[in] _scale Scaling value.

N3DINLINE void N3DVec3Subtract ( N3DVECTOR3 _dest,
const N3DVECTOR3 _v1,
const N3DVECTOR3 _v2 
)

Subtracts two 3-D vectors.

Parameters:
[in,out] _dest Reference to the N3DVECTOR3 structure that is the result of the operation.
[in] _v1 Reference to a source N3DVECTOR3 structure.
[in] _v2 Reference to a source N3DVECTOR3 structure.


Generated on Wed Aug 29 19:48:04 2007 for N3D by  doxygen 1.5.3