Blender V2.61 - r43446
Defines | Functions

kernel_qbvh.h File Reference

Go to the source code of this file.

Defines

#define ENTRYPOINT_SENTINEL   0x76543210
#define QBVH_STACK_SIZE   192
#define QBVH_NODE_SIZE   8
#define TRI_NODE_SIZE   3

Functions

__device_inline float3 qbvh_inverse_direction (float3 dir)
__device_inline void qbvh_instance_push (KernelGlobals *kg, int object, const Ray *ray, float3 *P, float3 *idir, float *t, const float tmax)
__device_inline void qbvh_instance_pop (KernelGlobals *kg, int object, const Ray *ray, float3 *P, float3 *idir, float *t, const float tmax)
__device_inline bool qbvh_bb_intersect (float3 bmin, float3 bmax, float3 P, float3 idir, float t)
__device_inline void qbvh_node_intersect (KernelGlobals *kg, int *traverseChild, int nodeAddrChild[4], float3 P, float3 idir, float t, int nodeAddr)
__device_inline void qbvh_triangle_intersect (KernelGlobals *kg, Intersection *isect, float3 P, float3 idir, int object, int triAddr)
__device_inline bool scene_intersect (KernelGlobals *kg, const Ray *ray, const bool isshadowray, 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 ENTRYPOINT_SENTINEL   0x76543210

Definition at line 30 of file kernel_qbvh.h.

Referenced by scene_intersect().

#define QBVH_NODE_SIZE   8

Definition at line 33 of file kernel_qbvh.h.

Referenced by qbvh_node_intersect(), and scene_intersect().

#define QBVH_STACK_SIZE   192

Definition at line 32 of file kernel_qbvh.h.

Referenced by scene_intersect().

#define TRI_NODE_SIZE   3

Definition at line 34 of file kernel_qbvh.h.

Referenced by bvh_triangle_refine(), and qbvh_triangle_intersect().


Function Documentation

__device_inline float3 bvh_triangle_refine ( KernelGlobals *  kg,
const Intersection isect,
const Ray ray 
)
__device_inline bool qbvh_bb_intersect ( float3  bmin,
float3  bmax,
float3  P,
float3  idir,
float  t 
)

Definition at line 123 of file kernel_qbvh.h.

References max, max4(), min, min4(), float3::x, float3::y, and float3::z.

Referenced by qbvh_node_intersect().

__device_inline void qbvh_instance_pop ( KernelGlobals *  kg,
int  object,
const Ray ray,
float3 P,
float3 idir,
float *  t,
const float  tmax 
)
__device_inline void qbvh_instance_push ( KernelGlobals *  kg,
int  object,
const Ray ray,
float3 P,
float3 idir,
float *  t,
const float  tmax 
)
__device_inline float3 qbvh_inverse_direction ( float3  dir)

Definition at line 36 of file kernel_qbvh.h.

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

Referenced by qbvh_instance_pop(), qbvh_instance_push(), and scene_intersect().

__device_inline void qbvh_node_intersect ( KernelGlobals *  kg,
int *  traverseChild,
int  nodeAddrChild[4],
float3  P,
float3  idir,
float  t,
int  nodeAddr 
)
__device_inline void qbvh_triangle_intersect ( KernelGlobals *  kg,
Intersection isect,
float3  P,
float3  idir,
int  object,
int  triAddr 
)
__device_inline float3 ray_offset ( float3  P,
float3  Ng 
)
__device_inline bool scene_intersect ( KernelGlobals *  kg,
const Ray ray,
const bool  isshadowray,
Intersection isect 
)