84 SplitInfo(
S32 axis,
SplitType splitType,
bool osahTested): m_code(0) { m_code |= (osahTested << 31); m_code |= splitType << 2; m_code |= axis; }
90 SplitInfo(
unsigned long bitCode): m_code(bitCode) {}
128 unsigned long m_code;
129 static char* m_axisNames[3];
130 static char* m_typeNames[3];
148 virtual bool isLeaf()
const = 0;
SplitInfo(S32 axis, SplitType splitType, bool osahTested)
Constructor.
S32 m_lo
Lower index to the BVH's triangle index array.
BVH_STAT
Available BVH stats.
LeafNode(const AABB &bounds, int lo, int hi)
Constructor.
String getTypeName() const
float computeSubtreeSAHCost(const Platform &p) const
Calculates subtree SAH cost. Requires calculated probabilities.
S32 getNumChildNodes() const
bool getOSAHChosen() const
int m_index
in linearized tree (qmachine uses this).
BVHNode * getChildNode(S32 i) const
Returns one of the node's child nodes.
virtual S32 getNumTriangles() const
SplitAxis getAxis() const
SplitInfo(unsigned long bitCode)
Constructor.
S32 getNumChildNodes() const
void assignIndicesDepthFirst(S32 index=0, bool includeLeafNodes=true)
Assigns node's sbutree indices in depth first order.
void assignIndicesBreadthFirst(S32 index=0, bool includeLeafNodes=true)
Assigns node's subtree indices in breadth first order.
void computeSubtreeProbabilities(const Platform &p, float parentProbability, float &sah)
Calculates node's subtree probabilities and also sah price.
FW_CUDA_FUNC float area(void) const
String getAxisName() const
virtual bool isLeaf() const =0
SplitType
Available split types.
SplitInfo m_splitInfo
Split info.
bool getOSAHTested() const
int m_treelet
For queuing tests (qmachine uses this).
AABB m_bounds
Bounding box of the node.
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction int int grid_height CUevent unsigned int Flags CUevent hEvent CUevent hEvent CUstream unsigned int Flags CUstream hStream GLuint bufferobj unsigned int CUdevice dev CUdeviceptr unsigned int CUmodule const char name CUdeviceptr unsigned int bytesize CUdeviceptr dptr void unsigned int bytesize void CUdeviceptr unsigned int ByteCount CUarray unsigned int CUdeviceptr unsigned int ByteCount CUarray unsigned int const void unsigned int ByteCount CUarray unsigned int CUarray unsigned int unsigned int ByteCount void CUarray unsigned int unsigned int CUstream hStream const CUDA_MEMCPY2D pCopy CUdeviceptr const void unsigned int CUstream hStream const CUDA_MEMCPY2D CUstream hStream CUdeviceptr unsigned char unsigned int N CUdeviceptr unsigned int unsigned int N CUdeviceptr unsigned int unsigned short unsigned int unsigned int Height CUarray const CUDA_ARRAY_DESCRIPTOR pAllocateArray CUarray const CUDA_ARRAY3D_DESCRIPTOR pAllocateArray unsigned int CUtexref CUdeviceptr unsigned int bytes CUcontext unsigned int CUdevice device GLenum texture GLenum GLuint buffer GLenum GLuint renderbuffer GLenum GLsizeiptr const GLvoid GLenum usage GLuint shader GLenum type GLsizei const GLuint framebuffers GLsizei const GLuint renderbuffers GLuint v GLuint v GLenum GLenum GLenum GLuint GLint level GLsizei GLuint framebuffers GLuint const GLchar name GLenum GLintptr GLsizeiptr GLvoid data GLuint GLenum GLint param GLuint GLenum GLint param GLhandleARB programObj GLenum GLenum GLsizei GLsizei height GLenum GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid pixels GLint GLsizei const GLfloat value GLint GLfloat GLfloat v1 GLint GLfloat GLfloat GLfloat v2 GLint GLsizei const GLfloat value GLint GLsizei GLboolean const GLfloat value GLuint program GLuint index
Class holding information about a split of a BVH node.
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void p CUfunction unsigned int bytes CUtexref pTexRef CUtexref CUarray unsigned int Flags CUtexref int CUaddress_mode am CUtexref unsigned int Flags CUaddress_mode CUtexref int dim CUarray_format int CUtexref hTexRef CUfunction unsigned int numbytes CUfunction int float value CUfunction int CUtexref hTexRef CUfunction f
BVHNode * getChildNode(S32) const
Returns one of the node's child nodes.
virtual BVHNode * getChildNode(S32 i) const =0
Returns one of the node's child nodes.
void deleteSubtree()
Deletes node's subtree.
LeafNode(const LeafNode &s)
Copy constructor.
virtual S32 getNumChildNodes() const =0
int getSubtreeSize(BVH_STAT stat=BVH_STAT_NODE_COUNT) const
Calculates various information about the node's subtree.
InnerNode(const AABB &bounds, BVHNode *child0, BVHNode *child1, S32 axis, SplitInfo::SplitType splitType, bool osahTested)
Constructor.
BVH virtual node. Parent class of both a leaf node and an inner node.
CUdevice int ordinal char int CUdevice dev CUdevprop CUdevice dev CUcontext ctx CUcontext ctx CUcontext pctx CUmodule const void image CUmodule const void fatCubin CUfunction CUmodule const char name void * p
S32 getNumTriangles() const
float m_parentProbability
Probability of coming to parent (widebvh uses this).
float m_probability
Probability of coming here (widebvh uses this).
unsigned long getBitCode() const
S32 m_hi
Higher index to the BVH's triangle index array.
SplitAxis
Available split axes.
BVHNode * m_children[2]
Child nodes.
SplitType getType() const
InnerNode(const AABB &bounds, BVHNode *child0, BVHNode *child1)
Constructor.