9#ifndef AVARA3D_MESH_PRIMITIVE_TUBE_H
10#define AVARA3D_MESH_PRIMITIVE_TUBE_H
14#include "a3d/mesh/MeshElement.h"
37 unsigned slices = DEFAULT_SLICES,
38 unsigned segments = DEFAULT_SEGMENTS,
39 unsigned rings = DEFAULT_RINGS,
40 std::shared_ptr<Material> material =
nullptr);
48 unsigned slices = DEFAULT_SLICES,
49 unsigned segments = DEFAULT_SEGMENTS,
50 unsigned rings = DEFAULT_RINGS);
75 static constexpr unsigned DEFAULT_SLICES = 32;
76 static constexpr unsigned DEFAULT_SEGMENTS = 8;
77 static constexpr unsigned DEFAULT_RINGS = 1;
Owns the vertex and optional index data for one mesh primitive.
Capped hollow tube mesh element centered at the origin and aligned along the Z axis.
unsigned slices() const
Returns the circumferential subdivision count.
float height() const
Returns the configured axial height.
float outerRadius() const
Returns the configured outer radius.
unsigned segments() const
Returns the axial subdivision count.
static std::shared_ptr< Mesh > Mesh(float innerRadius, float outerRadius, 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 Tube and optional material.
float innerRadius() const
Returns the configured inner radius.
Tube(float innerRadius, float outerRadius, float height, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS, unsigned rings=DEFAULT_RINGS)
Generates capped tube geometry with the supplied dimensions and subdivisions.
unsigned rings() const
Returns the radial end-cap subdivision count.