fixed floors sample

This commit is contained in:
Sandro Sobczyński
2020-11-03 16:44:39 +01:00
parent 5aa2a9bdb5
commit b75b2d6e4f
30 changed files with 331 additions and 224 deletions
+9 -3
View File
@@ -75,11 +75,17 @@ public:
/** Array of materials. Size of getMaterialsCount() */
MeshMaterial *getMaterials() const { return materials; };
/**
* Returns bounding box (AABB).
* Total length: 8
*/
Vector3 *getBoundingBox() { return boundingBox; };
/**
* Returns bounding box (AABB) vertex.
* Total length: 8
*/
Vector3 &getBoundingBox(const u8 &i) { return boundingBox[i]; };
Vector3 &getBoundingBoxVertex(const u8 &i) { return boundingBox[i]; };
// ----
// Setters
@@ -126,11 +132,11 @@ public:
void allocateMaterials(const u32 &t_val);
/**
* Calculates bounding box (AABB).
* Calculates bounding box (AABB) for frame and for materiaals.
* Should be called by data loader,
* so there is no need to run it again.
*/
void calculateBoundingBox();
void calculateBoundingBoxes();
private:
Vector3 boundingBox[8];