9#ifndef AVARA3D_MESH_PRIMITIVE_SPHERE_H
10#define AVARA3D_MESH_PRIMITIVE_SPHERE_H
14#include "a3d/mesh/MeshElement.h"
33 unsigned segments = DEFAULT_SEGMENTS,
34 std::shared_ptr<Material> material =
nullptr);
52 static constexpr unsigned DEFAULT_SEGMENTS = 4;
Owns the vertex and optional index data for one mesh primitive.
Icosphere mesh element centered at the origin.
float radius() const
Returns the configured sphere radius.
static std::shared_ptr< Mesh > Mesh(float radius, unsigned segments=DEFAULT_SEGMENTS, std::shared_ptr< Material > material=nullptr)
Creates a Mesh containing a Sphere and optional material.
Sphere(float radius, unsigned segments=DEFAULT_SEGMENTS)
Generates icosphere geometry with radius and segments subdivisions per edge.
unsigned segments() const
Returns the number of subdivisions per icosahedron edge.