Added GeometryFactory classes
This commit is contained in:
24
openVulkanoCpp/Scene/GeometryFactory.hpp
Normal file
24
openVulkanoCpp/Scene/GeometryFactory.hpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Geometry.hpp"
|
||||
|
||||
namespace OpenVulkano::Scene
|
||||
{
|
||||
class GeometryFactory
|
||||
{
|
||||
public:
|
||||
static Geometry* MakeCube(float x = 1, float y = 1, float z = 1, const Math::Vector4f& color = Math::Vector4f(1));
|
||||
static Geometry* MakePlane(float width = 1, float height = 1, const Math::Vector4f& color = Math::Vector4f(1));
|
||||
static Geometry* MakeSphere(float radius, uint32_t segments, uint32_t rings, const Math::Vector4f& color = Math::Vector4f(1));
|
||||
static Geometry* MakeHemisphere(float radius, uint32_t segments, uint32_t rings, const Math::Vector4f& color = Math::Vector4f(1));
|
||||
static Geometry* MakeTriangle(const Math::Vector3f& p1, const Math::Vector3f& p2, const Math::Vector3f& p3, const Math::Vector4f& color = Math::Vector4f(1));
|
||||
static Geometry* MakeCylinder(float radius, float height, uint32_t segments, const Math::Vector4f& color = Math::Vector4f(1));
|
||||
static Geometry* MakePyramid(float baseLength = 1, float height = 1, const Math::Vector4f& color = Math::Vector4f(1));
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user