Blender V2.61 - r43446
Classes | Public Member Functions | Protected Member Functions | Protected Attributes

BVHBuild Class Reference

#include <bvh_build.h>

List of all members.

Classes

struct  NodeSpec
struct  ObjectSplit
struct  Reference
struct  SpatialBin
struct  SpatialSplit

Public Member Functions

 BVHBuild (const vector< Object * > &objects, vector< int > &prim_index, vector< int > &prim_object, const BVHParams &params, Progress &progress)
 ~BVHBuild ()
BVHNoderun ()

Protected Member Functions

void add_reference_mesh (NodeSpec &root, Mesh *mesh, int i)
void add_reference_object (NodeSpec &root, Object *ob, int i)
void add_references (NodeSpec &root)
BVHNodebuild_node (const NodeSpec &spec, int level, float progress_start, float progress_end)
BVHNodecreate_leaf_node (const NodeSpec &spec)
BVHNodecreate_object_leaf_nodes (const Reference *ref, int num)
void progress_update (float progress_start, float progress_end)
ObjectSplit find_object_split (const NodeSpec &spec, float nodeSAH)
void do_object_split (NodeSpec &left, NodeSpec &right, const NodeSpec &spec, const ObjectSplit &split)
SpatialSplit find_spatial_split (const NodeSpec &spec, float nodeSAH)
void do_spatial_split (NodeSpec &left, NodeSpec &right, const NodeSpec &spec, const SpatialSplit &split)
void split_reference (Reference &left, Reference &right, const Reference &ref, int dim, float pos)

Protected Attributes

vector< Object * > objects
vector< Referencereferences
vector< int > & prim_index
vector< int > & prim_object
BVHParams params
Progressprogress
double progress_start_time
int progress_num_duplicates
float spatial_min_overlap
vector< BoundBoxspatial_right_bounds
SpatialBin spatial_bins [3][BVHParams::NUM_SPATIAL_BINS]

Detailed Description

Definition at line 37 of file bvh_build.h.


Constructor & Destructor Documentation

CCL_NAMESPACE_BEGIN BVHBuild::BVHBuild ( const vector< Object * > &  objects,
vector< int > &  prim_index,
vector< int > &  prim_object,
const BVHParams params,
Progress progress 
)

Definition at line 36 of file bvh_build.cpp.

References progress_num_duplicates, and spatial_min_overlap.

BVHBuild::~BVHBuild ( )

Definition at line 50 of file bvh_build.cpp.


Member Function Documentation

void BVHBuild::add_reference_mesh ( NodeSpec root,
Mesh mesh,
int  i 
) [protected]
void BVHBuild::add_reference_object ( NodeSpec root,
Object ob,
int  i 
) [protected]
void BVHBuild::add_references ( NodeSpec root) [protected]
BVHNode * BVHBuild::build_node ( const NodeSpec spec,
int  level,
float  progress_start,
float  progress_end 
) [protected]
BVHNode * BVHBuild::create_leaf_node ( const NodeSpec spec) [protected]
BVHNode * BVHBuild::create_object_leaf_nodes ( const Reference ref,
int  num 
) [protected]
void BVHBuild::do_object_split ( NodeSpec left,
NodeSpec right,
const NodeSpec spec,
const ObjectSplit split 
) [protected]
void BVHBuild::do_spatial_split ( NodeSpec left,
NodeSpec right,
const NodeSpec spec,
const SpatialSplit split 
) [protected]
BVHBuild::ObjectSplit BVHBuild::find_object_split ( const NodeSpec spec,
float  nodeSAH 
) [protected]
BVHBuild::SpatialSplit BVHBuild::find_spatial_split ( const NodeSpec spec,
float  nodeSAH 
) [protected]
void BVHBuild::progress_update ( float  progress_start,
float  progress_end 
) [protected]
BVHNode * BVHBuild::run ( )
void BVHBuild::split_reference ( Reference left,
Reference right,
const Reference ref,
int  dim,
float  pos 
) [protected]

Member Data Documentation

vector<Object*> BVHBuild::objects [protected]
vector<int>& BVHBuild::prim_index [protected]

Definition at line 132 of file bvh_build.h.

Referenced by create_leaf_node(), and create_object_leaf_nodes().

vector<int>& BVHBuild::prim_object [protected]

Definition at line 133 of file bvh_build.h.

Referenced by create_leaf_node(), and create_object_leaf_nodes().

Definition at line 139 of file bvh_build.h.

Referenced by add_references(), build_node(), progress_update(), and run().

Definition at line 141 of file bvh_build.h.

Referenced by build_node(), BVHBuild(), progress_update(), and run().

double BVHBuild::progress_start_time [protected]

Definition at line 140 of file bvh_build.h.

Referenced by progress_update(), and run().

vector<Reference> BVHBuild::references [protected]
SpatialBin BVHBuild::spatial_bins[3][BVHParams::NUM_SPATIAL_BINS] [protected]

Definition at line 146 of file bvh_build.h.

Referenced by find_spatial_split().

float BVHBuild::spatial_min_overlap [protected]

Definition at line 144 of file bvh_build.h.

Referenced by build_node(), BVHBuild(), and run().

Definition at line 145 of file bvh_build.h.

Referenced by find_object_split(), find_spatial_split(), and run().


The documentation for this class was generated from the following files: