Blender V2.61 - r43446
Defines | Functions

kernel_bvh.h File Reference

Go to the source code of this file.

Defines

#define ENTRYPOINT_SENTINEL   0x76543210
#define BVH_STACK_SIZE   192
#define BVH_NODE_SIZE   4
#define TRI_NODE_SIZE   3
#define NO_EXTENDED_PRECISION

Functions

__device_inline float3 bvh_inverse_direction (float3 dir)
__device_inline void bvh_instance_push (KernelGlobals *kg, int object, const Ray *ray, float3 *P, float3 *idir, float *t, const float tmax)
__device_inline void bvh_instance_pop (KernelGlobals *kg, int object, const Ray *ray, float3 *P, float3 *idir, float *t, const float tmax)
__device_inline void bvh_node_intersect (KernelGlobals *kg, bool *traverseChild0, bool *traverseChild1, bool *closestChild1, int *nodeAddr0, int *nodeAddr1, float3 P, float3 idir, float t, uint visibility, int nodeAddr)
__device_inline void bvh_triangle_intersect (KernelGlobals *kg, Intersection *isect, float3 P, float3 idir, uint visibility, int object, int triAddr)
__device_inline bool scene_intersect (KernelGlobals *kg, const Ray *ray, const uint visibility, Intersection *isect)
__device_inline float3 ray_offset (float3 P, float3 Ng)
__device_inline float3 bvh_triangle_refine (KernelGlobals *kg, const Intersection *isect, const Ray *ray)

Define Documentation

#define BVH_NODE_SIZE   4

Definition at line 33 of file kernel_bvh.h.

Referenced by bvh_node_intersect(), and scene_intersect().

#define BVH_STACK_SIZE   192

Definition at line 32 of file kernel_bvh.h.

Referenced by scene_intersect().

#define ENTRYPOINT_SENTINEL   0x76543210

Definition at line 30 of file kernel_bvh.h.

Referenced by scene_intersect().

#define NO_EXTENDED_PRECISION

Definition at line 40 of file kernel_bvh.h.

Referenced by bvh_node_intersect().

#define TRI_NODE_SIZE   3

Definition at line 34 of file kernel_bvh.h.

Referenced by bvh_triangle_intersect(), and bvh_triangle_refine().


Function Documentation

__device_inline void bvh_instance_pop ( KernelGlobals *  kg,
int  object,
const Ray ray,
float3 P,
float3 idir,
float *  t,
const float  tmax 
)
__device_inline void bvh_instance_push ( KernelGlobals *  kg,
int  object,
const Ray ray,
float3 P,
float3 idir,
float *  t,
const float  tmax 
)
__device_inline float3 bvh_inverse_direction ( float3  dir)

Definition at line 45 of file kernel_bvh.h.

References copysignf, fabsf, float3::x, float3::y, and float3::z.

Referenced by bvh_instance_pop(), bvh_instance_push(), and scene_intersect().

__device_inline void bvh_node_intersect ( KernelGlobals *  kg,
bool *  traverseChild0,
bool *  traverseChild1,
bool *  closestChild1,
int *  nodeAddr0,
int *  nodeAddr1,
float3  P,
float3  idir,
float  t,
uint  visibility,
int  nodeAddr 
)
__device_inline void bvh_triangle_intersect ( KernelGlobals *  kg,
Intersection isect,
float3  P,
float3  idir,
uint  visibility,
int  object,
int  triAddr 
)
__device_inline float3 bvh_triangle_refine ( KernelGlobals *  kg,
const Intersection isect,
const Ray ray 
)
__device_inline float3 ray_offset ( float3  P,
float3  Ng 
)
__device_inline bool scene_intersect ( KernelGlobals *  kg,
const Ray ray,
const uint  visibility,
Intersection isect 
)