Geometry Class Reference

Some basic geometrical operations. More...

#include <Geometry.h>

List of all members.

Static Public Member Functions

static Point PlaneIntersection (const Plane &p1, const Plane &p2, const Plane &p3)
static void InvertHomogenousMatrix (double *src, double *dest)
static void InvertHomogenousMatrix (float *src, float *dest)
static void MatrixMultiply (double *m1, double *m2, double *dest)
static void VectorMultiply (float *m, const Vector &vect, Vector &res)
static void VectorNormalize (Vector &vect)
static float VectorLength (Vector &vect)
static float EnclosingAngle (Vector &v1, Vector &v2)
static Vector CrossProduct (const Vector &v1, const Vector &v2)
static float ScalarProduct (const Vector &v1, const Vector &v2)

Private Member Functions

 Geometry ()


Detailed Description

Some basic geometrical operations.

This class cannot be instantiated. Its static routines, however, provide some basic geometrical operations.

Definition at line 61 of file Geometry.h.


Constructor & Destructor Documentation

Geometry::Geometry  )  [private]
 

Hide the default constructor.


Member Function Documentation

Vector Geometry::CrossProduct const Vector v1,
const Vector v2
[static]
 

Calculates the cross product of 2 vectors.

Parameters:
v1 The first vector used for the calculation of the cross product.
v2 The second vector used for the calculation of the cross product.
Returns:
The vector resulting from the cross product of v1 and v2.

Definition at line 32 of file Geomety.cpp.

float Geometry::EnclosingAngle Vector v1,
Vector v2
[static]
 

Computes the enclosing angle between two vectors in radians.

Parameters:
v1 The first vector used for the calculation of the enclosing angle.
v2 The second vector used for the calculation of the enclosing angle.
Returns:
The enclosing angle of the two vectors in radians (0..PI).

Definition at line 139 of file Geomety.cpp.

void Geometry::InvertHomogenousMatrix float *  src,
float *  dest
[static]
 

Inverts a homogenous matrix. Matrices that only consist of a sequence of rotations and translations are always homogenous. This routine operates on single precision values.

Parameters:
src Pointer to an array of 16 consecutive values describing a 4x4 column major matrix. This matrix will be inverted.
dest Pointer to an array of 16 consecutive values describing a 4x4 column major matrix. The inverted matrix is written into this array.

Definition at line 71 of file Geomety.cpp.

void Geometry::InvertHomogenousMatrix double *  src,
double *  dest
[static]
 

Inverts a homogenous matrix. Matrices that only consist of a sequence of rotations and translations are always homogenous. This routine operates on double precision values.

Parameters:
src Pointer to an array of 16 consecutive values describing a 4x4 column major matrix. This matrix will be inverted.
dest Pointer to an array of 16 consecutive values describing a 4x4 column major matrix. The inverted matrix is written into this array.

Definition at line 48 of file Geomety.cpp.

void Geometry::MatrixMultiply double *  m1,
double *  m2,
double *  dest
[static]
 

Multipies two matrices. This routine operates on double precision values.

Parameters:
m1 Pointer to an array of 16 consecutive values describing a 4x4 column major matrix. This matrix serves as the left operand of the multiplication.
m2 Pointer to an array of 16 consecutive values describing a 4x4 column major matrix. This matrix serves as the right operand of the multiplication.
dest Pointer to an array of 16 consecutive values describing a 4x4 column major matrix. The result of the multiplication is written into this array.

Definition at line 94 of file Geomety.cpp.

Point Geometry::PlaneIntersection const Plane p1,
const Plane p2,
const Plane p3
[static]
 

Returns the intersection point of 3 planes or (0,0,0) if any two of them are parallel.

Parameters:
p1 One of the three planes to be intersected with each other.
p2 One of the three planes to be intersected with each other.
p3 One of the three planes to be intersected with each other.

Definition at line 3 of file Geomety.cpp.

float Geometry::ScalarProduct const Vector v1,
const Vector v2
[static]
 

Calculates the scalar product of 2 vectors.

Parameters:
v1 The first vector used for the calculation of the scalar product.
v2 The second vector used for the calculation of the scalar product.
Returns:
The scalar product of the two vectors.

Definition at line 43 of file Geomety.cpp.

float Geometry::VectorLength Vector vect  )  [static]
 

Returns the length of any given vector.

Parameters:
vect The vector of which the length shall be calculated.

Definition at line 134 of file Geomety.cpp.

void Geometry::VectorMultiply float *  m,
const Vector vect,
Vector res
[static]
 

Multipies a matrix with a vector.

Parameters:
m Pointer to an array of 16 consecutive values describing a 4x4 column major matrix. This matrix serves as the left operand of the multiplication.
vect A vector in 3D space serving as the right operand of the multiplication. Its homogenous (4th) coordinate is supposed to be '1.0'.
res The result of the multiplication is written to this vector in 3D space.

Definition at line 114 of file Geomety.cpp.

void Geometry::VectorNormalize Vector vect  )  [static]
 

Normalizes a vector. If the vector is of length 0, it will stay that way.

Parameters:
vect The vector in 3D space to be normalized.

Definition at line 121 of file Geomety.cpp.


Generated on Sun Jul 2 13:20:40 2006 for Demo by  doxygen 1.4.6-NO