H3D::ArithmeticTypes::Vec3f Struct Reference
[Basic types.]

A Vec3f specifies a high-precision 3d vector. More...

#include <Vec3f.h>

List of all members.

Public Member Functions

 H3D_API_EXCEPTION (Vec3fNormalizeError)
 Exception thrown when error while normalizing vector types.
 Vec3f ()
 Default constructor.
 Vec3f (H3DFloat _x, H3DFloat _y, H3DFloat _z)
 Constructor.
 Vec3f (const Vec3d &v)
 Conversion from Vec3d.
H3DFloat dotProduct (const Vec3f &v) const
 Returns the dot product between this Vec3f and v.
Vec3f crossProduct (const Vec3f &v) const
 Returns the cross product between this Vec3f and v.
void normalize ()
 Normalize the vector to be of length 1.
void normalizeSafe ()
 Normalize the vector to be of length 1.
H3DFloat lengthSqr ()
 Returns the length squeared of the vector.
H3DFloat length ()
 Returns the length of the vector.
H3DFloatoperator[] (int i)
const H3DFloatoperator[] (int i) const

Public Attributes

H3DFloat x
 The public values of the vector.
H3DFloat y
H3DFloat z


Detailed Description

A Vec3f specifies a high-precision 3d vector.

The values of the Vec3f are H3DFloat.


Member Function Documentation

Vec3f H3D::ArithmeticTypes::Vec3f::crossProduct const Vec3f v  )  const [inline]
 

Returns the cross product between this Vec3f and v.

The operator* operator can also be used to get the dot product between two vectors.

H3DFloat H3D::ArithmeticTypes::Vec3f::dotProduct const Vec3f v  )  const [inline]
 

Returns the dot product between this Vec3f and v.

The operator* operator can also be used to get the dot product between two vectors.

void H3D::ArithmeticTypes::Vec3f::normalize  )  [inline]
 

Normalize the vector to be of length 1.

Exceptions:
NormalizeError If the vector is of zero length.

void H3D::ArithmeticTypes::Vec3f::normalizeSafe  )  [inline]
 

Normalize the vector to be of length 1.

If the vector is of zero length nothing will be done.


Generated on Thu Aug 24 12:40:32 2006 for H3D API by  doxygen 1.4.5