119 bool Intersect(
const RAY& aRay,
HITINFO& aHitInfo,
unsigned int aAccNodeInfo )
const override;
121 bool IntersectP(
const RAY& aRay,
float aMaxDistance )
const override;
132 const std::vector<BVHPrimitiveInfo>& primitiveInfo,
std::list< void * > m_nodesToFree
int flattenBVHTree(BVHBuildNode *node, uint32_t *offset)
unsigned int m_I[RAYPACKET_RAYS_PER_PACKET]
BVHBuildNode * emitLBVH(BVHBuildNode *&buildNodes, const std::vector< BVHPrimitiveInfo > &primitiveInfo, MortonPrimitive *mortonPrims, int nPrimitives, int *totalNodes, CONST_VECTOR_OBJECT &orderedPrims, int *orderedPrimsOffset, int bit)
TODO: after implement memory arena, put const back to this functions.
BVHBuildNode * buildUpperSAH(std::vector< BVHBuildNode * > &treeletRoots, int start, int end, int *totalNodes)
const int m_maxPrimsInNode
bool Intersect(const RAY &aRay, HITINFO &aHitInfo) const override
CONST_VECTOR_OBJECT m_primitives
bool IntersectP(const RAY &aRay, float aMaxDistance) const override
BVHBuildNode * HLBVHBuild(const std::vector< BVHPrimitiveInfo > &primitiveInfo, int *totalNodes, CONST_VECTOR_OBJECT &orderedPrims)
BVHBuildNode * recursiveBuild(std::vector< BVHPrimitiveInfo > &primitiveInfo, int start, int end, int *totalNodes, CONST_VECTOR_OBJECT &orderedPrims)
SPLITMETHOD m_splitMethod
std::vector< const OBJECT_3D * > CONST_VECTOR_OBJECT
#define RAYPACKET_RAYS_PER_PACKET
Manage a bounding box defined by two SFVEC3F min max points.
Stores the hit information of a ray with a point on the surface of a object.
int secondChildOffset
interior
uint8_t axis
interior node: xyz
uint16_t nPrimitives
0 -> interior node
uint8_t pad[1]
ensure 32 byte total size