Blender V2.61 - r43446
|
Go to the source code of this file.
Classes | |
struct | MBVHTask |
struct | MVBHRay |
Defines | |
#define | MBVH_OBJECT_SENTINEL 0x76543210 |
#define | MBVH_NODE_SIZE 8 |
#define | MBVH_STACK_SIZE 1024 |
#define | MBVH_RAY_STACK_SIZE 10000 |
Typedefs | |
typedef struct MBVHTask | MBVHTask |
typedef struct MVBHRay | MBVHRay |
Functions | |
__device float3 | mbvh_inverse_direction (float3 dir) |
__device void | mbvh_instance_push (KernelGlobals *kg, int object, MBVHRay *ray) |
__device void | mbvh_instance_pop (KernelGlobals *kg, int object, MBVHRay *ray) |
__device void | mbvh_triangle_intersect (KernelGlobals *kg, MBVHRay *ray, int object, int triAddr) |
__device void | mbvh_node_intersect (KernelGlobals *kg, __m128 *traverseChild, __m128 *tHit, float3 P, float3 idir, float t, int nodeAddr) |
static void | mbvh_sort_by_length (int id[4], float len[4]) |
__device void | scene_intersect (KernelGlobals *kg, MBVHRay *rays, int numrays) |
__device void | mbvh_set_ray (MBVHRay *rays, int i, Ray *ray, float tmax) |
__device bool | mbvh_get_intersection (MVBHRay *rays, int i, Intersection *isect, float tmax) |
__device bool | mbvh_get_shadow (MBVHRay *rays, int i, float tmax) |
#define MBVH_NODE_SIZE 8 |
Definition at line 22 of file kernel_mbvh.h.
Referenced by mbvh_node_intersect(), mbvh_triangle_intersect(), and scene_intersect().
#define MBVH_OBJECT_SENTINEL 0x76543210 |
Definition at line 21 of file kernel_mbvh.h.
Referenced by scene_intersect().
#define MBVH_RAY_STACK_SIZE 10000 |
Definition at line 24 of file kernel_mbvh.h.
Referenced by scene_intersect().
#define MBVH_STACK_SIZE 1024 |
Definition at line 23 of file kernel_mbvh.h.
Referenced by scene_intersect().
__device bool mbvh_get_intersection | ( | MVBHRay * | rays, |
int | i, | ||
Intersection * | isect, | ||
float | tmax | ||
) |
Definition at line 372 of file kernel_mbvh.h.
References i, MVBHRay::index, MVBHRay::object, Intersection::object, Intersection::t, MVBHRay::t, Intersection::u, MVBHRay::u, Intersection::v, and MVBHRay::v.
__device bool mbvh_get_shadow | ( | MBVHRay * | rays, |
int | i, | ||
float | tmax | ||
) |
Definition at line 388 of file kernel_mbvh.h.
__device void mbvh_instance_pop | ( | KernelGlobals * | kg, |
int | object, | ||
MBVHRay * | ray | ||
) |
Definition at line 76 of file kernel_mbvh.h.
References MVBHRay::idir, len(), mbvh_inverse_direction(), object_fetch_transform(), OBJECT_TRANSFORM, MVBHRay::origD, MVBHRay::origP, MVBHRay::P, MVBHRay::t, MVBHRay::tmax, and transform_direction().
Referenced by scene_intersect().
__device void mbvh_instance_push | ( | KernelGlobals * | kg, |
int | object, | ||
MBVHRay * | ray | ||
) |
Definition at line 60 of file kernel_mbvh.h.
References MVBHRay::idir, len(), mbvh_inverse_direction(), normalize(), object_fetch_transform(), OBJECT_INVERSE_TRANSFORM, MVBHRay::origD, MVBHRay::origP, MVBHRay::P, MVBHRay::t, MVBHRay::tmax, transform(), and transform_direction().
Referenced by scene_intersect().
Definition at line 47 of file kernel_mbvh.h.
References copysignf, fabsf, float3::x, float3::y, and float3::z.
Referenced by mbvh_instance_pop(), mbvh_instance_push(), and mbvh_set_ray().
__device void mbvh_node_intersect | ( | KernelGlobals * | kg, |
__m128 * | traverseChild, | ||
__m128 * | tHit, | ||
float3 | P, | ||
float3 | idir, | ||
float | t, | ||
int | nodeAddr | ||
) |
Definition at line 127 of file kernel_mbvh.h.
References kernel_tex_fetch_m128, MBVH_NODE_SIZE, float3::x, float3::y, and float3::z.
Referenced by scene_intersect().
Definition at line 362 of file kernel_mbvh.h.
References Ray::D, i, MVBHRay::idir, mbvh_inverse_direction(), Ray::P, MVBHRay::P, and MVBHRay::t.
static void mbvh_sort_by_length | ( | int | id[4], |
float | len[4] | ||
) | [static] |
Definition at line 164 of file kernel_mbvh.h.
Referenced by scene_intersect().
__device void mbvh_triangle_intersect | ( | KernelGlobals * | kg, |
MBVHRay * | ray, | ||
int | object, | ||
int | triAddr | ||
) |
Definition at line 88 of file kernel_mbvh.h.
References MVBHRay::idir, MVBHRay::index, kernel_tex_fetch, MBVH_NODE_SIZE, MVBHRay::object, P(), MVBHRay::P, MVBHRay::t, MVBHRay::u, MVBHRay::v, float4::w, float3::x, float4::x, float3::y, float4::y, float3::z, and float4::z.
Referenced by scene_intersect().
__device void scene_intersect | ( | KernelGlobals * | kg, |
MBVHRay * | rays, | ||
int | numrays | ||
) |
Definition at line 177 of file kernel_mbvh.h.
References __float_as_int(), i, MVBHRay::idir, MBVHTask::index, kernel_data, kernel_tex_fetch, len(), mbvh_instance_pop(), mbvh_instance_push(), mbvh_node_intersect(), MBVH_NODE_SIZE, MBVH_OBJECT_SENTINEL, MBVH_RAY_STACK_SIZE, mbvh_sort_by_length(), MBVH_STACK_SIZE, mbvh_triangle_intersect(), MBVHTask::node, MBVHTask::num, MBVHTask::object, MVBHRay::P, ray_offset(), MVBHRay::t, float4::w, float4::x, float4::y, and float4::z.