3 #include <AtomsUtils/AtomsMath.h>
4 #include <AtomsUtils/Mesh.h>
9 enum BVHNodeType { INTERNAL, LEAF };
17 BVHNodeType rightType;
31 void init(
Mesh *mesh);
34 bool intersect(
const AtomsMath::Vector3f &orig,
const AtomsMath::Vector3f &dir,
float ¶m,
35 unsigned int &outFaceId,
float &outU,
float &outV,
36 bool bothDirection)
const;
37 bool RayIntersectsTriangle(
const AtomsMath::Vector3f rayOrigin,
38 const AtomsMath::Vector3f rayVector,
int i,
39 AtomsMath::Vector3f &outIntersectionPoint,
42 std::vector<MortonCode> mortons;
43 std::vector<BVHNode> internalNodes;
44 std::vector<AtomsMath::Vector3f> treeAABBs;
46 std::vector<AtomsMath::Vector3f> m_outMesh;
58 void init(Mesh *mesh) {}
61 bool intersect(
const AtomsMath::Vector3f &orig,
const AtomsMath::Vector3f &dir,
float ¶m,
62 unsigned int &outFaceId,
float &outU,
float &outV,
63 bool bothDirection)
const {
66 bool RayIntersectsTriangle(
const AtomsMath::Vector3f rayOrigin,
67 const AtomsMath::Vector3f rayVector,
int i,
68 AtomsMath::Vector3f &outIntersectionPoint,
Mesh class.
Definition: Mesh.h:30
AtomsCore namespace.
Definition: Base64.h:13