LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
LibCarna::base::MeshFactory< VertexType > Class Template Reference

Creates simple predefined ManagedMesh instances. More...

#include <MeshFactory.hpp>

Static Public Member Functions

static ManagedMesh< VertexType, uint8_t > & createBox (float width, float height, float depth)
 Creates box with width, height and depth. The box is centered in \(\left(0, 0, 0\right)^\mathrm T\).
 
static ManagedMesh< VertexType, uint8_t > & createBox (const math::Vector3f &size)
 
static ManagedMesh< VertexType, uint16_t > & createBall (float radius, unsigned int degree=3)
 Creates sphere with radius and a vertices number determined by degree. The ball is centered in \(\left(0, 0, 0\right)^\mathrm T\).
 
static ManagedMesh< VertexType, uint8_t > & createPoint ()
 Creates mesh that consists of a single point.
 
static ManagedMesh< VertexType, uint16_t > & createLineStrip (const std::vector< math::Vector3f > &points)
 Creates a line strip.
 
static ManagedMesh< VertexType, uint32_t > & createFromSTL (const std::string &path)
 Creates mesh from an STL file.
 
static ManagedMesh< VertexType, uint32_t > & createFromSTL (std::istream &stlStream)
 

Detailed Description

template<typename VertexType>
class LibCarna::base::MeshFactory< VertexType >

Creates simple predefined ManagedMesh instances.

Parameters
VertexTypespecifies the vertex type that is to be used to build the vertex buffers.
Author
Leonid Kostrykin

Definition at line 60 of file MeshFactory.hpp.

Member Function Documentation

◆ createBall()

template<typename VertexType >
ManagedMesh< VertexType, uint16_t > & LibCarna::base::MeshFactory< VertexType >::createBall ( float  radius,
unsigned int  degree = 3 
)
static

Creates sphere with radius and a vertices number determined by degree. The ball is centered in \(\left(0, 0, 0\right)^\mathrm T\).

Definition at line 186 of file MeshFactory.hpp.

◆ createBox() [1/2]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 123 of file MeshFactory.hpp.

◆ createBox() [2/2]

template<typename VertexType >
ManagedMesh< VertexType, uint8_t > & LibCarna::base::MeshFactory< VertexType >::createBox ( float  width,
float  height,
float  depth 
)
static

Creates box with width, height and depth. The box is centered in \(\left(0, 0, 0\right)^\mathrm T\).

Definition at line 130 of file MeshFactory.hpp.

◆ createFromSTL() [1/2]

template<typename VertexType >
ManagedMesh< VertexType, uint32_t > & LibCarna::base::MeshFactory< VertexType >::createFromSTL ( const std::string &  path)
inlinestatic

Creates mesh from an STL file.

Author
Tim Schroeder

Definition at line 276 of file MeshFactory.hpp.

◆ createFromSTL() [2/2]

template<typename VertexType >
ManagedMesh< VertexType, uint32_t > & LibCarna::base::MeshFactory< VertexType >::createFromSTL ( std::istream &  stlStream)
static

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 282 of file MeshFactory.hpp.

◆ createLineStrip()

template<typename VertexType >
ManagedMesh< VertexType, uint16_t > & LibCarna::base::MeshFactory< VertexType >::createLineStrip ( const std::vector< math::Vector3f > &  points)
static

Creates a line strip.

Definition at line 372 of file MeshFactory.hpp.

◆ createPoint()

Creates mesh that consists of a single point.

Definition at line 262 of file MeshFactory.hpp.


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