raytrace.h File Reference

Ray intersection tests for primitives. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

BOOL line_plane (const LLVector3 &line_point, const LLVector3 &line_direction, const LLVector3 &plane_point, const LLVector3 plane_normal, LLVector3 &intersection)
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, const LLVector3 &circle_center, const LLVector3 plane_normal, F32 circle_radius, LLVector3 &intersection)
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)
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, const LLVector3 &sphere_center, F32 sphere_radius, LLVector3 &intersection, LLVector3 &intersection_normal)
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)
U32 ray_box (const LLVector3 &ray_point, const LLVector3 &ray_direction, const LLVector3 &box_center, const LLVector3 &box_scale, const LLQuaternion &box_rotation, LLVector3 &intersection, LLVector3 &intersection_normal)
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, 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, const LLVector3 &p_center, const LLVector3 &p_scale, const LLQuaternion &p_rotation, LLVector3 &intersection, LLVector3 &intersection_normal)
BOOL linesegment_circle (const LLVector3 &point_a, const LLVector3 &point_b, const LLVector3 &circle_center, const LLVector3 plane_normal, F32 circle_radius, LLVector3 &intersection)
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)
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, const LLVector3 &sphere_center, F32 sphere_radius, LLVector3 &intersection, LLVector3 &intersection_normal)
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)
U32 linesegment_box (const LLVector3 &point_a, const LLVector3 &point_b, const LLVector3 &box_center, const LLVector3 &box_scale, const LLQuaternion &box_rotation, LLVector3 &intersection, LLVector3 &intersection_normal)
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, 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, const LLVector3 &p_center, const LLVector3 &p_scale, const LLQuaternion &p_rotation, LLVector3 &intersection, LLVector3 &intersection_normal)


Detailed Description

Ray intersection tests for primitives.

LicenseInfo
firstyear=2001&license=viewergpl

Copyright (c) 2001-2008, Linden Research, Inc.

Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlifegrid.net/programs/open_source/licensing/gplv2

There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlifegrid.net/programs/open_source/licensing/flossexception

By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.

ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$

Definition in file raytrace.h.


Function Documentation

BOOL line_plane ( const LLVector3 line_point,
const LLVector3 line_direction,
const LLVector3 plane_point,
const LLVector3  plane_normal,
LLVector3 intersection 
)

Definition at line 42 of file raytrace.cpp.

References FALSE, N, and TRUE.

Referenced by ray_cylinder().

Here is the caller graph for this function:

U32 linesegment_box ( const LLVector3 point_a,
const LLVector3 point_b,
const LLVector3 box_center,
const LLVector3 box_scale,
const LLQuaternion box_rotation,
LLVector3 intersection,
LLVector3 intersection_normal 
)

Definition at line 1202 of file raytrace.cpp.

References LLVector3::isNull(), NO_SIDE, LLVector3::normVec(), and ray_box().

Here is the call graph for this function:

BOOL linesegment_circle ( const LLVector3 point_a,
const LLVector3 point_b,
const LLVector3 circle_center,
const LLVector3  plane_normal,
F32  circle_radius,
LLVector3 intersection 
)

Definition at line 1112 of file raytrace.cpp.

References FALSE, LLVector3::normVec(), ray_circle(), and TRUE.

Here is the call graph for this function:

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 
)

Definition at line 1184 of file raytrace.cpp.

References FALSE, LLVector3::normVec(), ray_cylinder(), and TRUE.

Here is the call graph for this function:

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 
)

Definition at line 1223 of file raytrace.cpp.

References FALSE, LLVector3::normVec(), ray_prism(), and TRUE.

Here is the call graph for this function:

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 
)

Definition at line 1259 of file raytrace.cpp.

References FALSE, LLVector3::normVec(), ray_pyramid(), and TRUE.

Here is the call graph for this function:

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 
)

Definition at line 1148 of file raytrace.cpp.

References FALSE, LLVector3::normVec(), ray_quadrangle(), and TRUE.

Here is the call graph for this function:

BOOL linesegment_sphere ( const LLVector3 point_a,
const LLVector3 point_b,
const LLVector3 sphere_center,
F32  sphere_radius,
LLVector3 intersection,
LLVector3 intersection_normal 
)

Definition at line 1166 of file raytrace.cpp.

References FALSE, LLVector3::normVec(), ray_sphere(), and TRUE.

Here is the call graph for this function:

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 
)

Definition at line 1241 of file raytrace.cpp.

References FALSE, LLVector3::normVec(), ray_tetrahedron(), and TRUE.

Here is the call graph for this function:

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 
)

Definition at line 1130 of file raytrace.cpp.

References FALSE, LLVector3::normVec(), ray_triangle(), and TRUE.

Here is the call graph for this function:

U32 ray_box ( const LLVector3 ray_point,
const LLVector3 ray_direction,
const LLVector3 box_center,
const LLVector3 box_scale,
const LLQuaternion box_rotation,
LLVector3 intersection,
LLVector3 intersection_normal 
)

Definition at line 418 of file raytrace.cpp.

References BACK_SIDE, BOTTOM_SIDE, LLQuaternion::conjQuat(), FRONT_SIDE, LEFT_SIDE, LLVector3::mV, NO_SIDE, RIGHT_SIDE, TOP_SIDE, VX, VY, and VZ.

Referenced by linesegment_box().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ray_circle ( const LLVector3 ray_point,
const LLVector3 ray_direction,
const LLVector3 circle_center,
const LLVector3  plane_normal,
F32  circle_radius,
LLVector3 intersection 
)

Definition at line 88 of file raytrace.cpp.

References FALSE, ray_plane(), and TRUE.

Referenced by linesegment_circle().

Here is the call graph for this function:

Here is the caller graph for this function:

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 
)

Definition at line 207 of file raytrace.cpp.

References dot(), FALSE, line_plane(), llmax(), LLVector3::magVec(), LLVector3::mV, LLVector3::normVec(), LLVector3::setVec(), TRUE, VX, VY, and VZ.

Referenced by linesegment_cylinder().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ray_plane ( const LLVector3 ray_point,
const LLVector3 ray_direction,
const LLVector3 plane_point,
const LLVector3  plane_normal,
LLVector3 intersection 
)

Definition at line 62 of file raytrace.cpp.

References FALSE, N, and TRUE.

Referenced by ray_circle(), ray_quadrangle(), and ray_triangle().

Here is the caller graph for this function:

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 
)

Definition at line 718 of file raytrace.cpp.

References FALSE, LLVector3::mV, ray_quadrangle(), ray_triangle(), TRUE, VX, VY, and VZ.

Referenced by linesegment_prism().

Here is the call graph for this function:

Here is the caller graph for this function:

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 
)

Definition at line 982 of file raytrace.cpp.

References FALSE, LLVector3::mV, ray_quadrangle(), ray_triangle(), TRUE, VX, VY, and VZ.

Referenced by linesegment_pyramid().

Here is the call graph for this function:

Here is the caller graph for this function:

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 
)

Definition at line 128 of file raytrace.cpp.

References FALSE, LLVector3::normVec(), ray_plane(), and TRUE.

Referenced by linesegment_quadrangle(), ray_prism(), and ray_pyramid().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL ray_sphere ( const LLVector3 ray_point,
const LLVector3 ray_direction,
const LLVector3 sphere_center,
F32  sphere_radius,
LLVector3 intersection,
LLVector3 intersection_normal 
)

Definition at line 155 of file raytrace.cpp.

References dot(), FALSE, LLVector3::magVecSquared(), LLVector3::setVec(), and TRUE.

Referenced by linesegment_sphere().

Here is the call graph for this function:

Here is the caller graph for this function:

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 
)

Definition at line 868 of file raytrace.cpp.

References d, F_SQRT2, F_SQRT3, FALSE, LLVector3::mV, ray_triangle(), TRUE, VX, VY, and VZ.

Referenced by linesegment_tetrahedron().

Here is the call graph for this function:

Here is the caller graph for this function:

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 
)

Definition at line 103 of file raytrace.cpp.

References FALSE, LLVector3::normVec(), ray_plane(), and TRUE.

Referenced by linesegment_triangle(), ray_prism(), ray_pyramid(), and ray_tetrahedron().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Fri May 16 08:35:17 2008 for SecondLife by  doxygen 1.5.5