Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members Related Pages
MathUtils.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef MATHUTILS_H
00022 #define MATHUTILS_H
00023
00024 #include "common.h"
00025
00026 namespace OpenVRML {
00027
00028 inline void Vset(float V[3], const float A[3]) {
00029 V[0] = A[0];
00030 V[1] = A[1];
00031 V[2] = A[2];
00032 }
00033
00034 inline void Vscale(float V[3], const float s) {
00035 V[0] *= s;
00036 V[1] *= s;
00037 V[2] *= s;
00038 }
00039
00040 inline float Vdot(const float A[3], const float B[3]) {
00041 return A[0] * B[0] + A[1] * B[1] + A[2] * B[2];
00042 }
00043
00044 void Vdiff(float V[3], const float A[3], const float B[3]);
00045 void Vcross(float V[3], const float A[3], const float B[3]);
00046
00047 void axis_aligned_bbox(float M[4][4], float *min, float *max);
00048 }
00049
00050 #endif