Files
OpenVulkano/openVulkanoCpp/Scene/GeometryFactory.hpp
2024-07-24 17:36:56 +03:00

25 lines
1.2 KiB
C++

/*
* 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));
};
}