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

A triangular mesh on the xy -plane. More...

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

Classes

class  Triangles
 
class  Vertices
 

Public Member Functions

 TriangleMesh (double radius=1.0, int segments=4)
 Makes a regular triangle centered at origin.
 
 TriangleMesh (const Vector3 &v0, const Vector3 &v1, const Vector3 &v2, int segments=4)
 
Triangles triangles () const noexcept
 
Vertices vertices () const noexcept
 

Private Attributes

Vector3 v0_
 
Vector3 v1_
 
Vector3 v2_
 
Vector3 normal_
 
int mSegments
 

Detailed Description

A triangular mesh on the xy -plane.

Constructor & Destructor Documentation

◆ TriangleMesh() [1/2]

CeresEngine::MeshGenerator::TriangleMesh::TriangleMesh ( double  radius = 1.0,
int  segments = 4 
)
explicit

Makes a regular triangle centered at origin.

Parameters
radiusThe radius of the containing circle.
segmentsThe number of segments along each edge. Must be >= 1.

◆ TriangleMesh() [2/2]

CeresEngine::MeshGenerator::TriangleMesh::TriangleMesh ( const Vector3 v0,
const Vector3 v1,
const Vector3 v2,
int  segments = 4 
)
Parameters
v0,v1,v2The vertex positions of the triangle.
segmentsThe number of segments along each edge. Must be >= 1.

Member Function Documentation

◆ triangles()

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

◆ vertices()

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

Member Data Documentation

◆ mSegments

int CeresEngine::MeshGenerator::TriangleMesh::mSegments
private

◆ normal_

Vector3 CeresEngine::MeshGenerator::TriangleMesh::normal_
private

◆ v0_

Vector3 CeresEngine::MeshGenerator::TriangleMesh::v0_
private

◆ v1_

Vector3 CeresEngine::MeshGenerator::TriangleMesh::v1_
private

◆ v2_

Vector3 CeresEngine::MeshGenerator::TriangleMesh::v2_
private

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