22 static std::shared_ptr<Mesh>
CreateCube(
float size = 1.0f);
32 static std::shared_ptr<Mesh>
CreatePlane(
float width = 1.0f,
float height = 1.0f,
33 int widthSegments = 1,
int heightSegments = 1);
42 static std::shared_ptr<Mesh>
CreateSphere(
float radius = 0.5f,
int widthSegments = 32,
int heightSegments = 16);
53 static std::shared_ptr<Mesh>
CreateCylinder(
float radiusTop = 0.5f,
float radiusBottom = 0.5f,
54 float height = 1.0f,
int radialSegments = 32,
int heightSegments = 1);
65 static void AddVertex(std::vector<float> &vertices,
float x,
float y,
float z,
float nx,
float ny,
float nz,
float u,
float v);
66 static void AddTriangle(std::vector<unsigned int> &indices,
unsigned int a,
unsigned int b,
unsigned int c);
Static utility class for generating primitive mesh shapes.
Definition PrimitiveGenerator.h:15
static std::shared_ptr< Mesh > CreateTriangle(float size=1.0f)
Creates a triangle mesh.
Definition PrimitiveGenerator.cpp:215
static std::shared_ptr< Mesh > CreateCylinder(float radiusTop=0.5f, float radiusBottom=0.5f, float height=1.0f, int radialSegments=32, int heightSegments=1)
Creates a cylinder mesh.
Definition PrimitiveGenerator.cpp:162
static std::shared_ptr< Mesh > CreateCube(float size=1.0f)
Creates a cube mesh.
Definition PrimitiveGenerator.cpp:8
static std::shared_ptr< Mesh > CreateSphere(float radius=0.5f, int widthSegments=32, int heightSegments=16)
Creates a sphere mesh.
Definition PrimitiveGenerator.cpp:108
static std::shared_ptr< Mesh > CreatePlane(float width=1.0f, float height=1.0f, int widthSegments=1, int heightSegments=1)
Creates a plane mesh.
Definition PrimitiveGenerator.cpp:67