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

A mesh with values evaluated using a callback function. More...

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

Classes

class  Triangles
 
class  Vertices
 

Public Member Functions

 ParametricMesh (Function< MeshVertex(const Vector2 &t) const > eval, const Vector2i &segments={16, 16}) noexcept
 
Triangles triangles () const noexcept
 
Vertices vertices () const noexcept
 

Private Attributes

Function< MeshVertex(const Vector2 &t) constmEval
 
Vector2i mSegments
 
Vector2 mDelta
 

Detailed Description

A mesh with values evaluated using a callback function.

Constructor & Destructor Documentation

◆ ParametricMesh()

CeresEngine::MeshGenerator::ParametricMesh::ParametricMesh ( Function< MeshVertex(const Vector2 &t) const eval,
const Vector2i &  segments = {16, 16} 
)
explicitnoexcept
Parameters
evalA callback that returns a MeshVertex for a given value.
segmentsThe number of segments along the surface. Both should be >= 1. If either is zero an empty mesh is generated.

Member Function Documentation

◆ triangles()

Triangles CeresEngine::MeshGenerator::ParametricMesh::triangles ( ) const
noexcept

◆ vertices()

Vertices CeresEngine::MeshGenerator::ParametricMesh::vertices ( ) const
noexcept

Member Data Documentation

◆ mDelta

Vector2 CeresEngine::MeshGenerator::ParametricMesh::mDelta
private

◆ mEval

Function<MeshVertex(const Vector2& t) const> CeresEngine::MeshGenerator::ParametricMesh::mEval
private

◆ mSegments

Vector2i CeresEngine::MeshGenerator::ParametricMesh::mSegments
private

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