Eigene Dateien/9.Semester/Visualisierung/LU/Volume_Renderer_dec05v2/Volume Renderer/VectorMatrixOp.h File Reference

#include "Vector3.h"
#include "Structs.h"

Functions

void addVector (Vector3 *vector, Vector3 *vector1, Vector3 *vector2)
void subtractVector (Vector3 *vector, Vector3 *vector1, Vector3 *vector2)
void multVector (Vector3 *vector, Vector3 *vector1, GLfloat scalar)
void scaleVector (Vector3 *vector, Vector3 *vector1, GLfloat scalar)
float getSquaredLength (Vector3 *vector)
float getDotProduct (Vector3 *vector1, Vector3 *vector2)
float getDotProduct (Gradient *grad, Vector3 *vector)
void setVector (Vector3 *vector, float x, float y, float z)
 ----------------------------------------------------------------setVector()-
void normalizeVector (Vector3 *vector1, Vector3 *vector2)
Vector3calcVectorCrossProduct (Vector3 *vector, Vector3 *vector1, Vector3 *vector2)
float calcAngle (Vector3 *vector1, Vector3 *vector2)
void rotateVector (Vector3 *vector, Vector3 *vector1, Vector3 *vector2, float angle)
void matrixMulVector (Vector3 *vector, matrix44 *matr, Vector3 *vector1)
void loadIdentity (matrix44 *matrix)
void matrixMulMatrix (matrix44 *matrix, matrix44 *matr1, matrix44 *matr2)
void translateMatrix (matrix44 *matrix, float x_direction, float y_direction, float z_direction)
void scaleMatrix (matrix44 *matrix, float x_direction, float y_direction, float z_direction)
void rotateMatrix (matrix44 *matrix, float x, float y, float z, float angle)

Function Documentation

void addVector ( Vector3 vector,
Vector3 vector1,
Vector3 vector2 
)

VectorOperations.cpp - This file contains the definition of the vector operations.

float calcAngle ( Vector3 vector1,
Vector3 vector2 
)

This returns the angle between two vectors.

Parameters:
vector1 The first vector for calculate the angle.
vector2 The second vector for calculate the angle.
Returns:
The angle the vector.

Vector3* calcVectorCrossProduct ( Vector3 vector,
Vector3 vector1,
Vector3 vector2 
)

This calculates the crossprodukt of two vectors.

Parameters:
vector In this parameter the result of the cross product operations will be stored.
vector1 The first vector for calculate the cross produkt.
vector2 The second vector for calculate the cross produkt.

float getDotProduct ( Gradient grad,
Vector3 vector 
)

This returns the dot product of the vector.

Parameters:
gradient The gradient for calculate the dot produkt.
vector The second vector for calculate the dot produkt.
Returns:
The dot product of the gradient and vector.

float getDotProduct ( Vector3 vector1,
Vector3 vector2 
)

This returns the dot product of the vector.

Parameters:
vector1 The first vector for calculate the dot produkt.
vector2 The second vector for calculate the dot produkt.
Returns:
The dot product of the vector1 and vector2.

float getSquaredLength ( Vector3 vector  ) 

This returns the squared length of the vector.

Returns:
The squared length of the vector.

void loadIdentity ( matrix44 matrix  ) 

This sets the identity matrix.

Parameters:
matrix The matrix to reset to the identity matrix.

void matrixMulMatrix ( matrix44 matrix,
matrix44 matr1,
matrix44 matr2 
)

This multiplies a matrix with another matrix.

Parameters:
matrix The matrix for calculate the produkt.
matr1 The first matrix for the multiplication.
matr2 The second matrix for the multiplication.

void matrixMulVector ( Vector3 vector,
matrix44 matr,
Vector3 vector1 
)

This returns a vector multiplied with a matrix.

Parameters:
vector The vector for calculate produkt.
matr The matrix to multiplie with the vector.
vector1 The vector to multiplie with the matrix.
Returns:
vector The produkt of matrix * vector.

void multVector ( Vector3 vector,
Vector3 vector1,
GLfloat  scalar 
)

Operator overoading of * to multiply this vector with a skalar.

Parameters:
vector1 The vector to multiplie with the scale factor.
scalar The scale factor.

void normalizeVector ( Vector3 vector1,
Vector3 vector2 
)

This normalizes the vector

Parameters:
vector In this parameter the result of the normalization will be stored.
vector1 The vector to normalize.

void rotateMatrix ( matrix44 matrix,
float  x,
float  y,
float  z,
float  angle 
)

This rotates a matrix on the specified point around the specified angle.

Parameters:
x The x coordinate of the point.
y The y coordinate of the point.
z The z coordinate of the point.
angle The rotation angle.

void rotateVector ( Vector3 vector,
Vector3 vector1,
Vector3 vector2,
float  angle 
)

This returns the vector rotated in the direction of vector2 and the specified angle.

Parameters:
vector1 The vector which should be rotated.
vector2 The dirction vector of the rotation.
angle The rotation angle.
Returns:
vector The rotated vector.

void scaleMatrix ( matrix44 matrix,
float  x_direction,
float  y_direction,
float  z_direction 
)

This scales a matrix with the specified scale factors of each direction.

Parameters:
x_direction The scale factor along the x-direction.
y_direction The scale factor along the y-direction.
z_direction The scale factor along the z-direction.

void scaleVector ( Vector3 vector,
Vector3 vector1,
GLfloat  scalar 
)

Operator overoading of / to divide this vector by a skalar.

Parameters:
vector1 The vector to divide by the scale factor.
scalar The scale factor.
Returns:
vector The vector with the produkt of vector1 / scalar.

void setVector ( Vector3 vector,
float  x,
float  y,
float  z 
)

----------------------------------------------------------------setVector()-

----------------------------------------------------------------setVector()-

This sets the values of the vector.

Parameters:
vector The vector in which the values should be inserted.
x The new x coordinate.
y The new y coordinate.
z The new z coordinate.

void subtractVector ( Vector3 vector,
Vector3 vector1,
Vector3 vector2 
)

Operator overoading of - to subtract vectors.

Parameters:
vector1 The first vector to subtract.
vector2 The second vector to subtract.

void translateMatrix ( matrix44 matrix,
float  x_direction,
float  y_direction,
float  z_direction 
)

This translates a matrix to the specified location.

Parameters:
x_direction The direction along the x-axis.
y_direction The direction along the y-axis.
z_direction The direction along the z-axis.


Generated on Wed Dec 6 11:27:26 2006 by  doxygen 1.4.7