7 #ifndef __math_algorithms_h__ 8 #define __math_algorithms_h__ 14 BWORD intersectRaySphere( Real *a_collisionDistance,
15 const SpatialVector &a_rayRoot,
16 const SpatialVector &a_rayDirection,
17 const SpatialVector &a_sphereCenter,
18 const Real &a_sphereRadius);
22 BWORD intersectLinePlane( SpatialVector &a_intersection,
23 BWORD a_loBound, BWORD a_hiBound,
24 const SpatialVector &a_lineLo,
25 const SpatialVector &a_lineHi,
26 const SpatialVector &a_pointOnPlane,
27 const SpatialVector &a_planeNormal);
31 BWORD intersectRayPlane( SpatialVector &a_intersection,
32 const SpatialVector &a_lineLo,
33 const SpatialVector &a_lineHi,
34 const SpatialVector &a_pointOnPlane,
35 const SpatialVector &a_planeNormal);
39 BWORD intersectLineTriangle( SpatialVector &a_intersection,
40 BWORD a_loBound, BWORD a_hiBound,
41 const SpatialVector &a_lineLo,
42 const SpatialVector &a_lineHi,
43 const SpatialVector &a_triA,
44 const SpatialVector &a_triB,
45 const SpatialVector &a_triC,
46 const SpatialVector &a_triNormal);
50 BWORD intersectRayTriangle( SpatialVector &a_intersection,
51 const SpatialVector &a_lineLo,
52 const SpatialVector &a_lineHi,
53 const SpatialVector &a_triA,
54 const SpatialVector &a_triB,
55 const SpatialVector &a_triC);
58 BWORD intersectTrianglePlane(SpatialVector &a_intersectionA,
59 SpatialVector &a_intersectionB,
60 const SpatialVector &a_triA,
61 const SpatialVector &a_triB,
62 const SpatialVector &a_triC,
63 const SpatialVector &a_pointOnPlane,
64 const SpatialVector &a_planeNormal);
67 BWORD pointInTriangle(
const SpatialVector &a_point,
68 const SpatialVector &a_triA,
69 const SpatialVector &a_triB,
70 const SpatialVector &a_triC);
73 Vector2 uvDelta(
const Vector2 &a_uv0,
74 const Vector2 &a_uv1);
77 BWORD triangleDuDv( Vector<3,Real> &a_du,
79 const Vector<3,Real> &a_point0,
80 const Vector<3,Real> &a_point1,
81 const Vector<3,Real> &a_point2,
84 const Vector2 &a_uv2);
87 BWORD tangentFromDuDvN( Vector<3,Real> &a_tangent,
88 const Vector<3,Real> &a_du,
89 const Vector<3,Real> &a_dv,
90 const Vector<3,Real> &a_normal);
93 void randomRealSeed(
const U32 &a_seed);
96 Real randomReal(
const Real &a_min,
100 Real randomRealReentrant( U32* a_pSeed,
kernel
Definition: namespace.dox:3