diff --git a/openVulkanoCpp/Scene/Geometry.cpp b/openVulkanoCpp/Scene/Geometry.cpp index 0421fe2..8cfd270 100644 --- a/openVulkanoCpp/Scene/Geometry.cpp +++ b/openVulkanoCpp/Scene/Geometry.cpp @@ -92,56 +92,6 @@ namespace OpenVulkano::Scene #endif } - void Geometry::InitCube(float x, float y, float z, const Math::Vector4f& color) - { - Init(24, 36); - SetIndices(new uint32_t[indexCount]{ - 0, 1, 2, 0, 2, 3, // front face index data - 4, 5, 6, 4, 6, 7, // back face index data - 8, 9, 10, 8, 10, 11, // top face index data - 12, 13, 14, 12, 14, 15, // bottom face index data - 16, 17, 18, 16, 18, 19, // left face index data - 20, 21, 22, 20, 22, 23 // right face index data - }, indexCount); - x *= 0.5f; y *= 0.5f; z *= 0.5f; - uint32_t i = 0; - // front face vertex data - vertices[i++].Set(+x, -y, +z, +0, +0, +1, +0, +1); - vertices[i++].Set(+x, +y, +z, +0, +0, +1, +0, +0); - vertices[i++].Set(-x, +y, +z, +0, +0, +1, +1, +0); - vertices[i++].Set(-x, -y, +z, +0, +0, +1, +1, +1); - // back face vertex data - vertices[i++].Set(+x, -y, -z, +0, +0, -1, +1, +1); - vertices[i++].Set(-x, -y, -z, +0, +0, -1, +0, +1); - vertices[i++].Set(-x, +y, -z, +0, +0, -1, +0, +0); - vertices[i++].Set(+x, +y, -z, +0, +0, -1, +1, +0); - // top face vertex data - vertices[i++].Set(+x, +y, +z, +0, -1, +0, +0, +1); - vertices[i++].Set(+x, +y, -z, +0, -1, +0, +0, +0); - vertices[i++].Set(-x, +y, -z, +0, -1, +0, +1, +0); - vertices[i++].Set(-x, +y, +z, +0, -1, +0, +1, +1); - // bottom face vertex data - vertices[i++].Set(+x, -y, +z, +0, +1, +0, +1, +1); - vertices[i++].Set(-x, -y, +z, +0, +1, +0, +0, +1); - vertices[i++].Set(-x, -y, -z, +0, +1, +0, +0, +0); - vertices[i++].Set(+x, -y, -z, +0, +1, +0, +1, +0); - // Fill in the left face vertex data - vertices[i++].Set(-x, -y, -z, -1, +0, +0, +1, +1); - vertices[i++].Set(-x, -y, +z, -1, +0, +0, +0, +1); - vertices[i++].Set(-x, +y, +z, -1, +0, +0, +0, +0); - vertices[i++].Set(-x, +y, -z, -1, +0, +0, +1, +0); - // Fill in the right face vertex data - vertices[i++].Set(+x, -y, +z, +1, +0, +0, +1, +1); - vertices[i++].Set(+x, -y, -z, +1, +0, +0, +0, +1); - vertices[i++].Set(+x, +y, -z, +1, +0, +0, +0, +0); - vertices[i].Set(+x, +y, +z, +1, +0, +0, +1, +0); - - for(i = 0; i < vertexCount; i++) - { - vertices[i].color = color; - } - } - void Geometry::SetIndices(const uint32_t* data, uint32_t size, uint32_t offset) const { size += offset; diff --git a/openVulkanoCpp/Scene/Geometry.hpp b/openVulkanoCpp/Scene/Geometry.hpp index ae12e4a..40880ae 100644 --- a/openVulkanoCpp/Scene/Geometry.hpp +++ b/openVulkanoCpp/Scene/Geometry.hpp @@ -65,8 +65,6 @@ namespace OpenVulkano void Init(aiMesh* mesh); - void InitCube(float x = 1, float y = 1, float z = 1, const Math::Vector4f& color = Math::Vector4f(1)); - void SetIndices(const uint32_t* data, uint32_t size, uint32_t offset = 0) const; void Close() override;