22 #ifndef VTFLIB_VTFMATHLIB_H
23 #define VTFLIB_VTFMATHLIB_H
32 # define CACHE_ALIGN __declspec(align(CACHE_LINE))
34 # define CACHE_ALIGN __attribute__((aligned (CACHE_LINE)))
39 #define drand48() (((vlSingle) rand())/((vlSingle) RAND_MAX))
void Init(vlSingle vX, vlSingle vY, vlSingle vZ)
Initialise the vector with the three given values.
Definition: VTFMathlib.h:56
Simple 3D Vector class.
Definition: VTFMathlib.h:47
vlSingle x
Vector value in the X axis.
Definition: VTFMathlib.h:51
vlSingle x
Vector value in the X axis.
Definition: VTFMathlib.h:84
Application framework header plus VTFLib custom data types.
void Init(void)
Initialise the vector defaulting all values to zero.
Definition: VTFMathlib.h:64
void VecReflect(Vector *axis, Vector *v, Vector *r)
Vector reflect function.
Definition: VTFMathlib.cpp:43
vlSingle y
Vector value in the Y axis.
Definition: VTFMathlib.h:52
void VecSub(Vector *a, Vector *b, Vector *diff)
Vector subtraction function.
Definition: VTFMathlib.cpp:24
VectorAligned(void)
Initialise the vector defaulting all values to zero.
Definition: VTFMathlib.h:97
VectorAligned(vlSingle vX, vlSingle vY, vlSingle vZ)
Initialise the vector with the three given values.
Definition: VTFMathlib.h:89
vlSingle z
Vector value in the Z axis.
Definition: VTFMathlib.h:53
signed int vlInt
Signed integer value.
Definition: stdafx.h:55
Simple Aligned 3D Vector class.
Definition: VTFMathlib.h:80
vlInt Intersect(Vector *v)
Vector intersect function.
Definition: VTFMathlib.cpp:50
vlSingle z
Vector value in the Z axis.
Definition: VTFMathlib.h:86
vlSingle VecDot(Vector *u, Vector *v)
Vector dot-product function.
Definition: VTFMathlib.cpp:38
vlSingle y
Vector value in the Y axis.
Definition: VTFMathlib.h:85
float vlSingle
Floating point number.
Definition: stdafx.h:59
void VecAdd(Vector *a, Vector *b, Vector *sum)
Vector addition function.
Definition: VTFMathlib.cpp:17
void VecScale(Vector *v, vlSingle scale)
Vector scale function.
Definition: VTFMathlib.cpp:31