Go to the documentation of this file.
30 uint32_t numBoxes = 0;
33 void generateBoxesFromExtremes();
34 void generateExtremes(
const std::vector<float>& vertexData,
const Vec3& scale, uint32_t subdivisions);
35 void generateSubExtremes(
const std::vector<float>& vertexData,
const Vec3& scale);
44 float minZ = 0.0f, maxZ = 0.0f, minX = 0.0f, maxX = 0.0f, minY = 0.0f, maxY = 0.0f;
76 BoundingBoxSet(
const std::vector<float>& vertexData,
const Vec3& scale, uint32_t subdivisions);
109 const Mat4 thisRotation)
const;
124 const Vec3 thisOffset,
125 const Mat4 thisRotation,
126 const Vec3 otherOffset,
127 const Mat4 otherRotation)
const;
Vectors, matrices and other math things.
std::vector< std::vector< unsigned int > > facesVertexIndexes
Faces vertex indexes (rectangles)
Definition: BoundingBoxSet.hpp:93
bool containsCorners(const BoundingBoxSet &otherBoxSet, const Vec3 thisOffset, const Mat4 thisRotation, const Vec3 otherOffset, const Mat4 otherRotation) const
Check any of the corners of another set of bounding boxes is inside any of the boxes of this set.
Definition: BoundingBoxSet.cpp:49
std::vector< std::vector< float > > vertices
Vertex coordinates.
Definition: BoundingBoxSet.hpp:87
bool contains(const Vec3 point, const Vec3 thisOffset, const Mat4 thisRotation) const
Check if a point is inside any of the boxes.
Definition: BoundingBoxSet.cpp:27
std::vector< extremes > boxExtremes
The extreme coordinates (max and min) of each box.
Definition: BoundingBoxSet.hpp:52
~BoundingBoxSet()=default
Destructor.
Set of bounding boxes for a SceneObject, calculated based on the vertices of a Model.
Definition: BoundingBoxSet.hpp:27
Definition: BinaryFile.hpp:15
BoundingBoxSet()
Default constructor.
Definition: BoundingBoxSet.cpp:17
int getNumBoxes() const
Get the number of boxes contained in the set.
Definition: BoundingBoxSet.cpp:315
std::vector< std::vector< unsigned int > > facesVertexIndexesTriangulated
Faces vertex indexes (triangles, for rendering)
Definition: BoundingBoxSet.hpp:98
3 component float vector
Definition: Math.hpp:19
std::vector< Model > getModels()
Get the bounding boxes in a set of Models that can be rendered.
Definition: BoundingBoxSet.cpp:319
4x4 float matrix
Definition: Math.hpp:99