summaryrefslogtreecommitdiff
path: root/indra/llmath/raytrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/raytrace.h')
-rw-r--r--indra/llmath/raytrace.h63
1 files changed, 30 insertions, 33 deletions
diff --git a/indra/llmath/raytrace.h b/indra/llmath/raytrace.h
index 01b8ee64f4..b55f29aef6 100644
--- a/indra/llmath/raytrace.h
+++ b/indra/llmath/raytrace.h
@@ -38,8 +38,8 @@ class LLQuaternion;
// Vector arguments of the form "shape_scale" represent the scale of the
// object along the three axes.
//
-// All functions return the expected TRUE or FALSE, unless otherwise noted.
-// When FALSE is returned, any resulting values that might have been stored
+// All functions return the expected true or false, unless otherwise noted.
+// When false is returned, any resulting values that might have been stored
// are undefined.
//
// Rays are defined by a "ray_point" and a "ray_direction" (unit).
@@ -61,25 +61,25 @@ class LLQuaternion;
// frame.
-// returns TRUE iff line is not parallel to plane.
-BOOL line_plane(const LLVector3 &line_point, const LLVector3 &line_direction,
+// returns true if line is not parallel to plane.
+bool line_plane(const LLVector3 &line_point, const LLVector3 &line_direction,
const LLVector3 &plane_point, const LLVector3 plane_normal,
LLVector3 &intersection);
-// returns TRUE iff line is not parallel to plane.
-BOOL ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+// returns true if line is not parallel to plane.
+bool ray_plane(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &plane_point, const LLVector3 plane_normal,
LLVector3 &intersection);
-BOOL ray_circle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_circle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &circle_center, const LLVector3 plane_normal, F32 circle_radius,
LLVector3 &intersection);
// point_0 through point_2 define the plane_normal via the right-hand rule:
// circle from point_0 to point_2 with fingers ==> thumb points in direction of normal
-BOOL ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
LLVector3 &intersection, LLVector3 &intersection_normal);
@@ -88,24 +88,24 @@ BOOL ray_triangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
// right-hand-rule... curl fingers from lower-left toward lower-right then toward upper-right
// ==> thumb points in direction of normal
// assumes a parallelogram, so point_3 is determined by the other points
-BOOL ray_quadrangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_quadrangle(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_sphere(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &sphere_center, F32 sphere_radius,
LLVector3 &intersection, LLVector3 &intersection_normal);
// finite right cylinder is defined by end centers: "cyl_top", "cyl_bottom",
// and by the cylinder radius "cyl_radius"
-BOOL ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_cylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &cyl_center, const LLVector3 &cyl_scale, const LLQuaternion &cyl_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
-// this function doesn't just return a BOOL because the return is currently
+// this function doesn't just return a bool because the return is currently
// used to decide how to break up boxes that have been hit by shots...
// a hack that will probably be changed later
//
@@ -117,66 +117,66 @@ U32 ray_box(const LLVector3 &ray_point, const LLVector3 &ray_direction,
/* TODO
-BOOL ray_ellipsoid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_ellipsoid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &e_center, const LLVector3 &e_scale, const LLQuaternion &e_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL ray_cone(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_cone(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &cone_tip, const LLVector3 &cone_bottom,
const LLVector3 &cone_scale, const LLQuaternion &cone_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
*/
-BOOL ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_prism(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &prism_center, const LLVector3 &prism_scale, const LLQuaternion &prism_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_tetrahedron(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &t_center, const LLVector3 &t_scale, const LLQuaternion &t_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_pyramid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &p_center, const LLVector3 &p_scale, const LLQuaternion &p_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
/* TODO
-BOOL ray_hemiellipsoid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_hemiellipsoid(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &e_center, const LLVector3 &e_scale, const LLQuaternion &e_rotation,
const LLVector3 &e_cut_normal,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL ray_hemisphere(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_hemisphere(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &sphere_center, F32 sphere_radius, const LLVector3 &sphere_cut_normal,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL ray_hemicylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_hemicylinder(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &cyl_top, const LLVector3 &cyl_bottom, F32 cyl_radius,
const LLVector3 &cyl_cut_normal,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL ray_hemicone(const LLVector3 &ray_point, const LLVector3 &ray_direction,
+bool ray_hemicone(const LLVector3 &ray_point, const LLVector3 &ray_direction,
const LLVector3 &cone_tip, const LLVector3 &cone_bottom,
const LLVector3 &cone_scale, const LLVector3 &cyl_cut_normal,
LLVector3 &intersection, LLVector3 &intersection_normal);
*/
-BOOL linesegment_circle(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_circle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &circle_center, const LLVector3 plane_normal, F32 circle_radius,
LLVector3 &intersection);
// point_0 through point_2 define the plane_normal via the right-hand rule:
// circle from point_0 to point_2 with fingers ==> thumb points in direction of normal
-BOOL linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
LLVector3 &intersection, LLVector3 &intersection_normal);
@@ -185,24 +185,24 @@ BOOL linesegment_triangle(const LLVector3 &point_a, const LLVector3 &point_b,
// right-hand-rule... curl fingers from lower-left toward lower-right then toward upper-right
// ==> thumb points in direction of normal
// assumes a parallelogram, so point_3 is determined by the other points
-BOOL linesegment_quadrangle(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_quadrangle(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &point_0, const LLVector3 &point_1, const LLVector3 &point_2,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL linesegment_sphere(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_sphere(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &sphere_center, F32 sphere_radius,
LLVector3 &intersection, LLVector3 &intersection_normal);
// finite right cylinder is defined by end centers: "cyl_top", "cyl_bottom",
// and by the cylinder radius "cyl_radius"
-BOOL linesegment_cylinder(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_cylinder(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &cyl_center, const LLVector3 &cyl_scale, const LLQuaternion &cyl_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
-// this function doesn't just return a BOOL because the return is currently
+// this function doesn't just return a bool because the return is currently
// used to decide how to break up boxes that have been hit by shots...
// a hack that will probably be changed later
//
@@ -213,20 +213,17 @@ U32 linesegment_box(const LLVector3 &point_a, const LLVector3 &point_b,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_prism(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &prism_center, const LLVector3 &prism_scale, const LLQuaternion &prism_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL linesegment_tetrahedron(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_tetrahedron(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &t_center, const LLVector3 &t_scale, const LLQuaternion &t_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
-BOOL linesegment_pyramid(const LLVector3 &point_a, const LLVector3 &point_b,
+bool linesegment_pyramid(const LLVector3 &point_a, const LLVector3 &point_b,
const LLVector3 &p_center, const LLVector3 &p_scale, const LLQuaternion &p_rotation,
LLVector3 &intersection, LLVector3 &intersection_normal);
-
-
#endif
-