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

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

#include <Vec3d.h>

List of all members.

Public Member Functions

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

Public Attributes

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


Detailed Description

A Vec3d specifies a high-precision 3d vector.

The values of the Vec3d are H3DDouble.


Member Function Documentation

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

Returns the cross product between this Vec3d and v.

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

H3DDouble H3D::ArithmeticTypes::Vec3d::dotProduct const Vec3d v  )  const [inline]
 

Returns the dot product between this Vec3d and v.

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

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

Normalize the vector to be of length 1.

Exceptions:
NormalizeError If the vector is of zero length.

void H3D::ArithmeticTypes::Vec3d::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