3 #include <DirectXMath.h> 11 namespace GeometryGenerator {
14 explicit Vertex(
const DirectX::XMFLOAT3& position,
15 const DirectX::XMFLOAT3& normal,
16 const DirectX::XMFLOAT3& tangent,
17 const DirectX::XMFLOAT2& uv);
24 DirectX::XMFLOAT3 mPosition = { 0.0f, 0.0f, 0.0f };
25 DirectX::XMFLOAT3 mNormal = { 0.0f, 0.0f, 0.0f };
26 DirectX::XMFLOAT3 mTangent = { 0.0f, 0.0f, 0.0f };
27 DirectX::XMFLOAT2 mUV = { 0.0f, 0.0f };
31 std::vector<Vertex> mVertices;
32 std::vector<std::uint32_t> mIndices32;
33 std::vector<std::uint16_t>& GetIndices16() noexcept;
36 std::vector<std::uint16_t> mIndices16{};
42 void CreateBox(
const float width,
45 const std::uint32_t numSubdivisions,
49 void CreateSphere(
const float radius,
50 const std::uint32_t sliceCount,
51 const std::uint32_t stackCount,
55 void CreateGeosphere(
const float radius,
56 const std::uint32_t numSubdivisions,
62 void CreateCylinder(
const float bottomRadius,
63 const float topRadius,
65 const std::uint32_t sliceCount,
66 const std::uint32_t stackCount,
71 void CreateGrid(
const float width,
73 const std::uint32_t rows,
74 const std::uint32_t columns,
Definition: GeometryGenerator.h:12
Definition: GeometryGenerator.h:30