Oxygen Engine
Modern C++ 3D Engine using OpenGL
Loading...
Searching...
No Matches
oe::scene::primitive::PlatonicSolid< VertexType > Struct Template Reference

Primitive generating a Platonic solid. More...

#include <OxygenEngine/scene/primitive/platonic_solid.h>

Inheritance diagram for oe::scene::primitive::PlatonicSolid< VertexType >:
Collaboration diagram for oe::scene::primitive::PlatonicSolid< VertexType >:

Public Member Functions

 PlatonicSolid (const PlatonicSolidType solid, const bool smooth_normals=false)
 Generate a Platonic solid mesh.
Public Member Functions inherited from oe::scene::Mesh< Vertex >
constexpr AABB getPrimitiveBoundingBox (size_t primitive) const noexcept
 Generate bounding box for the specified primitive.
constexpr AABB getPrimitiveBoundingBox (size_t primitive, F &&predicate) const noexcept
 Generate bounding box for the specified primitive containing vertices matching a predicate.
constexpr AABB getBoundingBox () const noexcept
 Generate englobing mesh bounding box.
constexpr void flipFaces ()
constexpr const std::vector< glm::uvec3 > getTriangles () const
 Get groups of 3 indices that form triangles.
constexpr void generateNormals ()
 Generate mesh normals from vertices positions.
constexpr void generateTangents ()
 Compute Tangents using mikkTSpace.

Additional Inherited Members

Public Types inherited from oe::scene::Mesh< Vertex >
using vertex_type
using index_type
using VertexContainerType
using IndexContainerType
Static Public Member Functions inherited from oe::scene::Mesh< Vertex >
static Mesh generateFromPrimitives (std::span< const PrimitiveType > primitives)
 Generate a mesh from primitives.
Public Attributes inherited from oe::scene::Mesh< Vertex >
VertexContainerType vertices
IndexContainerType indices
DefaultMeshSettings< Vertex, uint32_t >::PrimitivesContainerType primitives

Detailed Description

template<typename VertexType = Vertex>
struct oe::scene::primitive::PlatonicSolid< VertexType >

Primitive generating a Platonic solid.

Constructor & Destructor Documentation

◆ PlatonicSolid()

template<typename VertexType = Vertex>
oe::scene::primitive::PlatonicSolid< VertexType >::PlatonicSolid ( const PlatonicSolidType solid,
const bool smooth_normals = false )
inline

Generate a Platonic solid mesh.

Todo
Better Textures coordinates (at the moment, brutal approximations used)
Parameters
solidSolid to generate
smooth_normalsdoes the normals need to be flat or smooth (smooth mode requires less vertices but is less realist)

The documentation for this struct was generated from the following file: