9#ifndef AVARA3D_MESH_PRIMITIVE_CONE_H
10#define AVARA3D_MESH_PRIMITIVE_CONE_H
14#include "a3d/mesh/MeshElement.h"
36 unsigned slices = DEFAULT_SLICES,
37 unsigned segments = DEFAULT_SEGMENTS,
38 unsigned rings = DEFAULT_RINGS,
39 std::shared_ptr<Material> material =
nullptr);
46 unsigned slices = DEFAULT_SLICES,
47 unsigned segments = DEFAULT_SEGMENTS,
48 unsigned rings = DEFAULT_RINGS);
70 static constexpr unsigned DEFAULT_SLICES = 32;
71 static constexpr unsigned DEFAULT_SEGMENTS = 8;
72 static constexpr unsigned DEFAULT_RINGS = 4;
Capped cone mesh element centered at the origin and aligned along the Y axis.
static std::shared_ptr< Mesh > Mesh(float radius, float height, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS, unsigned rings=DEFAULT_RINGS, std::shared_ptr< Material > material=nullptr)
Creates a Mesh containing a Cone and optional material.
unsigned rings() const
Returns the radial cap subdivision count.
unsigned segments() const
Returns the axial subdivision count.
float radius() const
Returns the configured base radius.
unsigned slices() const
Returns the circumferential subdivision count.
float height() const
Returns the configured axial height.
Cone(float radius, float height, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS, unsigned rings=DEFAULT_RINGS)
Generates capped cone geometry with the supplied dimensions and subdivisions.
Owns the vertex and optional index data for one mesh primitive.