Blender V2.61 - r43446
|
#include <assert.h>
#include "MEM_guardedalloc.h"
#include "BLI_kdopbvh.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "rayintersection.h"
#include "rayobject.h"
Go to the source code of this file.
Classes | |
struct | BVHObject |
struct | BVHCallbackUserData |
Typedefs | |
typedef struct BVHObject | BVHObject |
Functions | |
static int | RE_rayobject_blibvh_intersect (RayObject *o, Isect *isec) |
static void | RE_rayobject_blibvh_add (RayObject *o, RayObject *ob) |
static void | RE_rayobject_blibvh_done (RayObject *o) |
static void | RE_rayobject_blibvh_free (RayObject *o) |
static void | RE_rayobject_blibvh_bb (RayObject *o, float *min, float *max) |
static float | RE_rayobject_blibvh_cost (RayObject *UNUSED(o)) |
static void | RE_rayobject_blibvh_hint_bb (RayObject *UNUSED(o), RayHint *UNUSED(hint), float *UNUSED(min), float *UNUSED(max)) |
RayObject * | RE_rayobject_blibvh_create (int size) |
static void | bvh_callback (void *userdata, int index, const BVHTreeRay *UNUSED(ray), BVHTreeRayHit *hit) |
Variables | |
static RayObjectAPI | bvh_api |
Definition in file rayobject_blibvh.cpp.
static void bvh_callback | ( | void * | userdata, |
int | index, | ||
const BVHTreeRay * | UNUSEDray, | ||
BVHTreeRayHit * | hit | ||
) | [static] |
Definition at line 99 of file rayobject_blibvh.cpp.
References data, BVHTreeRayHit::dist, Isect::dist, BVHTreeRayHit::index, BVHCallbackUserData::isec, BVHCallbackUserData::leafs, Isect::mode, RE_RAY_SHADOW, and RE_rayobject_intersect().
Referenced by RE_rayobject_blibvh_intersect().
Definition at line 133 of file rayobject_blibvh.cpp.
References BVHObject::bb, BLI_bvhtree_insert(), BVHObject::bvh, DO_MAX, DO_MIN, INIT_MINMAX, BVHObject::leafs, BVHObject::next_leaf, and RE_rayobject_merge_bb().
static void RE_rayobject_blibvh_bb | ( | RayObject * | o, |
float * | min, | ||
float * | max | ||
) | [static] |
Definition at line 166 of file rayobject_blibvh.cpp.
References BVHObject::bb, DO_MAX, and DO_MIN.
static float RE_rayobject_blibvh_cost | ( | RayObject * | UNUSEDo | ) | [static] |
Definition at line 49 of file rayobject_blibvh.cpp.
RayObject* RE_rayobject_blibvh_create | ( | int | size | ) |
Definition at line 80 of file rayobject_blibvh.cpp.
References RayObject::api, assert, BVHObject::bb, BLI_bvhtree_new(), BVHObject::bvh, bvh_api, INIT_MINMAX, BVHObject::leafs, MEM_callocN(), BVHObject::next_leaf, BVHObject::rayobj, RE_rayobject_isAligned, and RE_rayobject_unalignRayAPI.
Referenced by RE_rayobject_create().
static void RE_rayobject_blibvh_done | ( | RayObject * | o | ) | [static] |
Definition at line 147 of file rayobject_blibvh.cpp.
References BLI_bvhtree_balance(), and BVHObject::bvh.
static void RE_rayobject_blibvh_free | ( | RayObject * | o | ) | [static] |
Definition at line 153 of file rayobject_blibvh.cpp.
References BLI_bvhtree_free(), BVHObject::bvh, BVHObject::leafs, and MEM_freeN().
static void RE_rayobject_blibvh_hint_bb | ( | RayObject * | UNUSEDo, |
RayHint * | UNUSEDhint, | ||
float * | UNUSEDmin, | ||
float * | UNUSEDmax | ||
) | [static] |
Definition at line 55 of file rayobject_blibvh.cpp.
Definition at line 116 of file rayobject_blibvh.cpp.
References BLI_bvhtree_ray_cast(), BVHObject::bvh, bvh_callback(), copy_v3_v3(), Isect::dir, Isect::dist, BVHTreeRayHit::dist, BVHTreeRayHit::index, BVHCallbackUserData::isec, BVHObject::leafs, BVHCallbackUserData::leafs, and Isect::start.
RayObjectAPI bvh_api [static] |
{ RE_rayobject_blibvh_intersect, RE_rayobject_blibvh_add, RE_rayobject_blibvh_done, RE_rayobject_blibvh_free, RE_rayobject_blibvh_bb, RE_rayobject_blibvh_cost, RE_rayobject_blibvh_hint_bb }
Definition at line 61 of file rayobject_blibvh.cpp.
Referenced by RE_rayobject_blibvh_create().