![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| void | add_intersection (flt, object *, ray *) |
| void | add_object (object *) |
| int | closest_intersection (flt *, object **, intersectstruct *) |
| void | free_objects (object *) |
| void | intersect_objects (ray *) |
| unsigned int | max_objectid (void) |
| unsigned int | new_objectid (void) |
| int | next_intersection (object **, object *, intersectstruct *) |
| void | reset_intersection (intersectstruct *) |
| void | reset_object (void) |
| int | shadow_intersection (intersectstruct *intstruct, flt maxdist) |
Definition at line 133 of file intersect.cpp.
References EPSILON, ray::flags, ray::intstruct, intersectstruct::list, ray::maxdist, intersectstruct::num, mission1::obj, intersection::obj, RT_RAY_FINISHED, RT_RAY_SHADOW, and intersection::t.
Referenced by box_intersect(), cylinder_intersect(), fcylinder_intersect(), light_intersect(), plane_intersect(), quadric_intersect(), ring_intersect(), sphere_intersect(), and tri_intersect().
{
intersectstruct * intstruct = ry->intstruct;
if (t > EPSILON) {
/* if we hit something before maxdist update maxdist */
if (t < ry->maxdist) {
ry->maxdist = t;
/* if we hit *anything* before maxdist, and we're firing a */
/* shadow ray, then we are finished ray tracing the shadow */
if (ry->flags & RT_RAY_SHADOW)
ry->flags |= RT_RAY_FINISHED;
}
intstruct->num++;
intstruct->list[intstruct->num].obj = obj;
intstruct->list[intstruct->num].t = t;
}
}
| void add_object | ( | object * | ) |
Definition at line 79 of file intersect.cpp.
References object::id, new_objectid(), object::nextobj, mission1::obj, and rootobj.
Referenced by rt_box(), rt_cylinder(), rt_extvol(), rt_fcylinder(), rt_light(), rt_plane(), rt_quadsphere(), rt_ring(), rt_scalarvol(), rt_sphere(), rt_stri(), and rt_tri().
| int closest_intersection | ( | flt * | , |
| object ** | , | ||
| intersectstruct * | |||
| ) |
Definition at line 155 of file intersect.cpp.
References FHUGE, intersectstruct::list, intersectstruct::num, intersection::obj, and intersection::t.
Referenced by shader().
| void free_objects | ( | object * | ) |
Definition at line 92 of file intersect.cpp.
References object_methods::free, object::methods, and object::nextobj.
Referenced by free_bndbox(), grid_free(), and reset_object().
| void intersect_objects | ( | ray * | ) |
Definition at line 114 of file intersect.cpp.
References object_methods::intersect, object::methods, object::nextobj, and rootobj.
| unsigned int max_objectid | ( | void | ) |
Definition at line 75 of file intersect.cpp.
References numobjects.
Referenced by parallel_thread().
{
return numobjects;
}
| unsigned int new_objectid | ( | void | ) |
Definition at line 71 of file intersect.cpp.
References numobjects.
Referenced by add_object(), and newgrid().
{
return numobjects++; /* global used to generate unique object ID's */
}
| int next_intersection | ( | object ** | , |
| object * | , | ||
| intersectstruct * | |||
| ) |
| void reset_intersection | ( | intersectstruct * | ) |
Definition at line 125 of file intersect.cpp.
References FHUGE, intersectstruct::list, intersectstruct::num, intersection::obj, and intersection::t.
| void reset_object | ( | void | ) |
Definition at line 106 of file intersect.cpp.
References free_objects(), numobjects, and rootobj.
Referenced by rt_initialize().
{
if (rootobj != NULL)
free_objects(rootobj);
rootobj = NULL;
numobjects = 0; /* set number of objects back to 0 */
}
| int shadow_intersection | ( | intersectstruct * | intstruct, |
| flt | maxdist | ||
| ) |
Definition at line 169 of file intersect.cpp.
References intersectstruct::list, intersectstruct::num, intersection::obj, texture::shadowcast, intersection::t, and object::tex.
Referenced by shader().
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.