|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <BoundingIntervalHierarchy.h>
Classes | |
| struct | buildData |
| class | BuildStats |
| struct | StackNode |
Public Member Functions | |
| BIH () | |
| template<class BoundsFunc, class PrimArray> | |
| void | build (const PrimArray &primitives, BoundsFunc &getBounds, uint32 leafSize=3, bool printStats=false) |
| template<typename IsectCallback> | |
| void | intersectPoint (const G3D::Vector3 &p, IsectCallback &intersectCallback) const |
| template<typename RayCallback> | |
| void | intersectRay (const G3D::Ray &r, RayCallback &intersectCallback, float &maxDist, bool stopAtFirst=false) const |
| uint32 | primCount () const |
| bool | readFromFile (FILE *rf) |
| bool | writeToFile (FILE *wf) const |
Protected Member Functions | |
| void | buildHierarchy (std::vector< uint32 > &tempTree, buildData &dat, BuildStats &stats) |
| void | createNode (std::vector< uint32 > &tempTree, int nodeIndex, uint32 left, uint32 right) const |
| void | subdivide (int left, int right, std::vector< uint32 > &tempTree, buildData &dat, AABound &gridBox, AABound &nodeBox, int nodeIndex, int depth, BuildStats &stats) |
Protected Attributes | |
| G3D::AABox | bounds |
| std::vector< uint32 > | objects |
| std::vector< uint32 > | tree |
Private Member Functions | |
| void | init_empty () |
Bounding Interval Hierarchy Class. Building and Ray-Intersection functions based on BIH from Sunflow, a Java Raytracer, released under MIT/X11 License http://sunflow.sourceforge.net/ Copyright (c) 2003-2007 Christopher Kulla
Definition at line 57 of file BoundingIntervalHierarchy.h.
|
inline |
Definition at line 69 of file BoundingIntervalHierarchy.h.
References init_empty().
|
inline |
Definition at line 71 of file BoundingIntervalHierarchy.h.
References bounds, buildHierarchy(), BIH::buildData::indices, init_empty(), BIH::buildData::maxPrims, BIH::buildData::numPrims, objects, BIH::buildData::primBound, BIH::BuildStats::printStats(), and tree.
Referenced by VMAP::TileAssembler::convertWorld2().
|
protected |
Definition at line 14 of file BoundingIntervalHierarchy.cpp.
References bounds, BIH::buildData::numPrims, and subdivide().
Referenced by build().
|
inlineprotected |
Definition at line 377 of file BoundingIntervalHierarchy.h.
Referenced by subdivide().
|
inlineprivate |
|
inline |
Definition at line 247 of file BoundingIntervalHierarchy.h.
References bounds, intBitsToFloat(), MAX_STACK_SIZE, BIH::StackNode::node, objects, and tree.
|
inline |
Definition at line 108 of file BoundingIntervalHierarchy.h.
References bounds, floatToRawIntBits(), intBitsToFloat(), MAX_STACK_SIZE, BIH::StackNode::node, objects, BIH::StackNode::tfar, BIH::StackNode::tnear, and tree.
|
inline |
Definition at line 105 of file BoundingIntervalHierarchy.h.
References objects.
| bool BIH::readFromFile | ( | FILE * | rf | ) |
Definition at line 248 of file BoundingIntervalHierarchy.cpp.
|
protected |
Definition at line 28 of file BoundingIntervalHierarchy.cpp.
References createNode(), floatToRawIntBits(), AABound::hi, BIH::buildData::indices, isnan, AABound::lo, MAX_STACK_SIZE, BIH::buildData::maxPrims, BIH::buildData::primBound, subdivide(), BIH::BuildStats::updateBVH2(), BIH::BuildStats::updateInner(), and BIH::BuildStats::updateLeaf().
Referenced by buildHierarchy(), and subdivide().
| bool BIH::writeToFile | ( | FILE * | wf | ) | const |
Definition at line 234 of file BoundingIntervalHierarchy.cpp.
References bounds, objects, and tree.
Referenced by VMAP::TileAssembler::convertWorld2().
|
protected |
Definition at line 330 of file BoundingIntervalHierarchy.h.
Referenced by build(), buildHierarchy(), intersectPoint(), intersectRay(), readFromFile(), and writeToFile().
|
protected |
Definition at line 329 of file BoundingIntervalHierarchy.h.
Referenced by build(), init_empty(), intersectPoint(), intersectRay(), primCount(), readFromFile(), and writeToFile().
|
protected |
Definition at line 328 of file BoundingIntervalHierarchy.h.
Referenced by build(), init_empty(), intersectPoint(), intersectRay(), readFromFile(), and writeToFile().