CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::MeshGenerator::BoxMesh Class Reference

Rectangular box centered at origin aligned along the x, y and z axis. More...

#include <CeresEngine/Mesh/Generator/BoxMesh.hpp>

Public Types

using Triangles = typename Impl::Triangles
 
using Vertices = typename Impl::Vertices
 

Public Member Functions

 BoxMesh (const Vector3 &size={1.0, 1.0, 1.0}, const Vector3i &segments={8, 8, 8}) noexcept
 
Triangles triangles () const noexcept
 
Vertices vertices () const noexcept
 

Private Types

using Impl = MergeMesh< AxisSwapMesh< detail::BoxFaces >, UvFlipMesh< AxisSwapMesh< detail::BoxFaces > >, detail::BoxFaces >
 

Private Attributes

Impl mMergeMesh
 

Detailed Description

Rectangular box centered at origin aligned along the x, y and z axis.

Member Typedef Documentation

◆ Impl

◆ Triangles

◆ Vertices

Constructor & Destructor Documentation

◆ BoxMesh()

CeresEngine::MeshGenerator::BoxMesh::BoxMesh ( const Vector3 size = {1.0, 1.0, 1.0},
const Vector3i &  segments = {8, 8, 8} 
)
explicitnoexcept
Parameters
sizeHalf of the side length in x (0), y (1) and z (2) direction.
segmentsThe number of segments in x (0), y (1) and z (2) directions. All should be >= 1. If any one is zero faces in that direction are not genereted. If more than one is zero the mesh is empty.

Member Function Documentation

◆ triangles()

Triangles CeresEngine::MeshGenerator::BoxMesh::triangles ( ) const
inlinenoexcept

◆ vertices()

Vertices CeresEngine::MeshGenerator::BoxMesh::vertices ( ) const
inlinenoexcept

Member Data Documentation

◆ mMergeMesh

Impl CeresEngine::MeshGenerator::BoxMesh::mMergeMesh
private

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