Blender V2.61 - r43446
Defines | Functions

bvh.h File Reference

#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "raycounter.h"
#include "rayintersection.h"
#include "rayobject.h"
#include "rayobject_hint.h"
#include "rayobject_rtbuild.h"
#include <assert.h>

Go to the source code of this file.

Defines

#define RE_RAYTRACE_BVH_H

Functions

static int rayobject_bb_intersect_test (const Isect *isec, const float *_bb)
template<class Tree >
static int bvh_intersect (Tree *obj, Isect *isec)
template<class Tree >
static void bvh_add (Tree *obj, RayObject *ob)
template<class Node >
bool is_leaf (Node *node)
template<class Tree >
static void bvh_done (Tree *obj)
template<class Tree >
static void bvh_free (Tree *obj)
template<class Tree >
static void bvh_bb (Tree *obj, float *min, float *max)
template<class Tree >
static float bvh_cost (Tree *obj)
template<class Node >
static int bvh_node_hit_test (Node *node, Isect *isec)
template<class Node >
static void bvh_node_merge_bb (Node *node, float *min, float *max)
template<class Node >
static void bvh_node_push_childs (Node *node, Isect *isec, Node **stack, int &stack_pos)
template<class Node , int MAX_STACK_SIZE, bool TEST_ROOT, bool SHADOW>
static int bvh_node_stack_raycast (Node *root, Isect *isec)
template<class Node , class HintObject >
void bvh_dfs_make_hint (Node *node, LCTSHint *hint, int reserve_space, HintObject *hintObject)
template<class Tree >
static RayObjectAPIbvh_get_api (int maxstacksize)
template<class Tree , int DFS_STACK_SIZE>
static RayObjectbvh_create_tree (int size)

Detailed Description

Definition in file source/blender/render/intern/raytrace/bvh.h.


Define Documentation

#define RE_RAYTRACE_BVH_H

Definition at line 50 of file source/blender/render/intern/raytrace/bvh.h.


Function Documentation

template<class Tree >
static void bvh_add ( Tree *  obj,
RayObject ob 
) [static]

Definition at line 102 of file source/blender/render/intern/raytrace/bvh.h.

References rtbuild_add().

template<class Tree >
static void bvh_bb ( Tree *  obj,
float *  min,
float *  max 
) [static]

Definition at line 128 of file source/blender/render/intern/raytrace/bvh.h.

References bvh_node_merge_bb().

template<class Tree >
static float bvh_cost ( Tree *  obj) [static]

Definition at line 136 of file source/blender/render/intern/raytrace/bvh.h.

References assert.

template<class Tree , int DFS_STACK_SIZE>
static RayObject* bvh_create_tree ( int  size) [inline, static]
template<class Node , class HintObject >
void bvh_dfs_make_hint ( Node node,
LCTSHint hint,
int  reserve_space,
HintObject *  hintObject 
)
template<class Tree >
static void bvh_done ( Tree *  obj) [static]
template<class Tree >
static void bvh_free ( Tree *  obj) [static]

Definition at line 116 of file source/blender/render/intern/raytrace/bvh.h.

References BLI_memarena_free(), MEM_freeN(), and rtbuild_free().

Referenced by bfree().

template<class Tree >
static RayObjectAPI* bvh_get_api ( int  maxstacksize) [static]

Definition at line 198 of file rayobject_vbvh.cpp.

References assert.

template<class Tree >
static int bvh_intersect ( Tree *  obj,
Isect isec 
) [static]
template<class Node >
static int bvh_node_hit_test ( Node node,
Isect isec 
) [inline, static]
template<class Node >
static void bvh_node_merge_bb ( Node node,
float *  min,
float *  max 
) [inline, static]

Definition at line 152 of file source/blender/render/intern/raytrace/bvh.h.

References DO_MAX, DO_MIN, is_leaf(), and RE_rayobject_merge_bb().

Referenced by bvh_bb().

template<class Node >
static void bvh_node_push_childs ( Node node,
Isect isec,
Node **  stack,
int &  stack_pos 
) [inline, static]

Referenced by bvh_node_stack_raycast().

template<class Node , int MAX_STACK_SIZE, bool TEST_ROOT, bool SHADOW>
static int bvh_node_stack_raycast ( Node root,
Isect isec 
) [static]
template<class Node >
bool is_leaf ( Node node) [inline]
static int rayobject_bb_intersect_test ( const Isect isec,
const float *  _bb 
) [static]