From ae15906c9928d8ea2f854304b844c605ec314a97 Mon Sep 17 00:00:00 2001 From: Foxar Date: Mon, 21 Dec 2020 18:30:18 +0100 Subject: [PATCH] Added: Accessors in bounding_box class allowing access to vertices array. --- src/engine/include/models/bounding_box.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/engine/include/models/bounding_box.hpp b/src/engine/include/models/bounding_box.hpp index 1e7b364..e2aaccc 100644 --- a/src/engine/include/models/bounding_box.hpp +++ b/src/engine/include/models/bounding_box.hpp @@ -66,6 +66,13 @@ public: const BoundingBoxFace &getTopFace() { return _topFace; }; /** Return the bottom face (nearer on y-axis) */ const BoundingBoxFace &getBottomFace() { return _bottomFace; }; + /** + * Returns bounding box raw vertices array. + * Total length: 8 + */ + Vector3 &getVertex(const u8 &i) { return _vertices[i]; }; + /** Returns single vertex from raw vertices array.*/ + Vector3 *getVertices() { return _vertices; }; private: Vector3 _vertices[8];