Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions

kernel_mbvh.h File Reference

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 Documentation

#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().


Typedef Documentation

typedef struct MVBHRay MBVHRay
typedef struct MBVHTask MBVHTask

Function Documentation

__device bool mbvh_get_intersection ( MVBHRay rays,
int  i,
Intersection isect,
float  tmax 
)
__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 
)
__device void mbvh_instance_push ( KernelGlobals *  kg,
int  object,
MBVHRay ray 
)
__device float3 mbvh_inverse_direction ( float3  dir)

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().

__device void mbvh_set_ray ( MBVHRay rays,
int  i,
Ray ray,
float  tmax 
)

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.

References i, and swap().

Referenced by scene_intersect().

__device void mbvh_triangle_intersect ( KernelGlobals *  kg,
MBVHRay ray,
int  object,
int  triAddr 
)
__device void scene_intersect ( KernelGlobals *  kg,
MBVHRay rays,
int  numrays 
)