Blender V2.61 - r43446
|
#include <bvh_node.h>
Public Member Functions | |
BVHNode () | |
virtual | ~BVHNode () |
virtual bool | is_leaf () const =0 |
virtual int | num_children () const =0 |
virtual BVHNode * | get_child (int i) const =0 |
virtual int | num_triangles () const |
virtual void | print (int depth=0) const =0 |
float | getArea () const |
int | getSubtreeSize (BVH_STAT stat=BVH_STAT_NODE_COUNT) const |
float | computeSubtreeSAHCost (const BVHParams &p, float probability=1.0f) const |
void | deleteSubtree () |
Public Attributes | |
struct BVHNode ** | children |
struct BVHNode * | parent |
struct BVHNode * | skip [2] |
float * | bv |
int | index |
char | totnode |
char | main_axis |
BoundBox | m_bounds |
uint | m_visibility |
Definition at line 53 of file BLI_kdopbvh.c.
BVHNode::BVHNode | ( | ) | [inline] |
Definition at line 41 of file bvh_node.h.
virtual BVHNode::~BVHNode | ( | ) | [inline, virtual] |
Definition at line 45 of file bvh_node.h.
float BVHNode::computeSubtreeSAHCost | ( | const BVHParams & | p, |
float | probability = 1.0f |
||
) | const |
Definition at line 67 of file bvh_node.cpp.
References BoundBox::area(), computeSubtreeSAHCost(), BVHParams::cost(), get_child(), i, m_bounds, num_children(), and num_triangles().
Referenced by BVH::build(), and computeSubtreeSAHCost().
void BVHNode::deleteSubtree | ( | ) |
Definition at line 59 of file bvh_node.cpp.
References deleteSubtree(), get_child(), i, and num_children().
Referenced by BVH::build(), BVHBuild::build_node(), and deleteSubtree().
virtual BVHNode* BVHNode::get_child | ( | int | i | ) | const [pure virtual] |
Implemented in InnerNode, and LeafNode.
Referenced by computeSubtreeSAHCost(), deleteSubtree(), getSubtreeSize(), and QBVH::pack_nodes().
float BVHNode::getArea | ( | ) | const [inline] |
Definition at line 52 of file bvh_node.h.
References BoundBox::area(), and m_bounds.
CCL_NAMESPACE_BEGIN int BVHNode::getSubtreeSize | ( | BVH_STAT | stat = BVH_STAT_NODE_COUNT | ) | const |
Definition at line 27 of file bvh_node.cpp.
References assert, BVH_STAT_CHILDNODE_COUNT, BVH_STAT_INNER_COUNT, BVH_STAT_LEAF_COUNT, BVH_STAT_NODE_COUNT, BVH_STAT_TRIANGLE_COUNT, get_child(), getSubtreeSize(), i, is_leaf(), num_children(), and num_triangles().
Referenced by getSubtreeSize(), RegularBVH::pack_nodes(), and QBVH::pack_nodes().
virtual bool BVHNode::is_leaf | ( | ) | const [pure virtual] |
Implemented in InnerNode, and LeafNode.
Referenced by getSubtreeSize(), and QBVH::pack_nodes().
virtual int BVHNode::num_children | ( | ) | const [pure virtual] |
Implemented in InnerNode, and LeafNode.
Referenced by computeSubtreeSAHCost(), deleteSubtree(), and getSubtreeSize().
virtual int BVHNode::num_triangles | ( | ) | const [inline, virtual] |
Reimplemented in LeafNode.
Definition at line 49 of file bvh_node.h.
Referenced by computeSubtreeSAHCost(), and getSubtreeSize().
virtual void BVHNode::print | ( | int | depth = 0 | ) | const [pure virtual] |
Implemented in InnerNode, and LeafNode.
Referenced by InnerNode::print().
float* BVHNode::bv |
Definition at line 58 of file BLI_kdopbvh.c.
Referenced by BLI_bvhtree_insert(), BLI_bvhtree_new(), BLI_bvhtree_update_node(), bvh_insertionsort(), bvh_partition(), calc_nearest_point(), create_kdop_hull(), dfs_find_nearest_dfs(), dfs_range_query(), dfs_raycast(), fast_ray_nearest_hit(), node_join(), non_recursive_bvh_div_nodes(), refit_kdop_hull(), and tree_overlap().
struct BVHNode** BVHNode::children |
Reimplemented in InnerNode.
Definition at line 55 of file BLI_kdopbvh.c.
Referenced by BLI_bvhtree_new(), BLI_bvhtree_overlap(), build_skip_links(), dfs_find_nearest_dfs(), dfs_range_query(), dfs_raycast(), node_join(), non_recursive_bvh_div_nodes(), and traverse().
int BVHNode::index |
Definition at line 59 of file BLI_kdopbvh.c.
Referenced by BLI_bvhtree_insert(), BLI_bvhtree_range_query(), dfs_find_nearest_dfs(), dfs_range_query(), dfs_raycast(), and traverse().
Definition at line 54 of file bvh_node.h.
Referenced by computeSubtreeSAHCost(), BVHBuild::create_object_leaf_nodes(), getArea(), InnerNode::InnerNode(), LeafNode::LeafNode(), and RegularBVH::pack_leaf().
Definition at line 55 of file bvh_node.h.
Referenced by InnerNode::InnerNode(), LeafNode::LeafNode(), and RegularBVH::pack_leaf().
char BVHNode::main_axis |
Definition at line 61 of file BLI_kdopbvh.c.
Referenced by dfs_find_nearest_dfs(), dfs_raycast(), and non_recursive_bvh_div_nodes().
struct BVHNode* BVHNode::parent |
Definition at line 56 of file BLI_kdopbvh.c.
Referenced by non_recursive_bvh_div_nodes().
struct BVHNode* BVHNode::skip[2] |
Definition at line 57 of file BLI_kdopbvh.c.
Referenced by build_skip_links().
char BVHNode::totnode |
Definition at line 60 of file BLI_kdopbvh.c.
Referenced by BLI_bvhtree_overlap(), BLI_bvhtree_range_query(), build_skip_links(), dfs_find_nearest_dfs(), dfs_range_query(), dfs_raycast(), non_recursive_bvh_div_nodes(), and traverse().