9#ifndef AVARA3D_MESH_PRIMITIVE_DOME_H
10#define AVARA3D_MESH_PRIMITIVE_DOME_H
14#include "a3d/mesh/MeshElement.h"
41 unsigned slices = DEFAULT_SLICES,
42 unsigned segments = DEFAULT_SEGMENTS,
43 std::shared_ptr<Material> material =
nullptr);
54 unsigned slices = DEFAULT_SLICES,
55 unsigned segments = DEFAULT_SEGMENTS);
83 static constexpr int DEFAULT_SLICES = 32;
84 static constexpr int DEFAULT_SEGMENTS = 8;
91 float _elevationStart;
92 float _elevationSweep;
Generates a bounded angular patch of a sphere centered at the origin.
Dome(float radius, float azimuthStart, float azimuthSweep, float elevationStart, float elevationSweep, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS)
Generates a spherical patch with the supplied angular ranges and subdivisions.
float radius() const
Returns the source sphere radius.
unsigned segments() const
Returns the elevation subdivision count.
float azimuthStart() const
Returns the azimuth start angle in radians.
unsigned slices() const
Returns the azimuth subdivision count.
float elevationSweep() const
Returns the elevation sweep angle in radians.
float elevationStart() const
Returns the elevation start angle in radians.
float azimuthSweep() const
Returns the azimuth sweep angle in radians.
static std::shared_ptr< Mesh > Mesh(float radius, float azimuthStart, float azimuthSweep, float elevationStart, float elevationSweep, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS, std::shared_ptr< Material > material=nullptr)
Creates a Mesh containing a Dome and optional material.
Owns the vertex and optional index data for one mesh primitive.