|
Avara3D 0.2.0
C++ API reference
|
Capped cylinder mesh element centered at the origin and aligned along the Y axis. More...
#include <a3d/mesh/primitive/Cylinder.h>
Public Member Functions | |
| Cylinder (float radius, float height, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS, unsigned rings=DEFAULT_RINGS) | |
| Generates capped cylinder geometry with the supplied dimensions and subdivisions. More... | |
| float | radius () const |
| Returns the configured cylinder radius. More... | |
| float | height () const |
| Returns the configured axial height. More... | |
| unsigned | slices () const |
| Returns the circumferential subdivision count. More... | |
| unsigned | segments () const |
| Returns the axial subdivision count. More... | |
| unsigned | rings () const |
| Returns the radial cap subdivision count. More... | |
Public Member Functions inherited from a3d::MeshElement | |
| MeshElement (VertexLayout layout, std::span< const std::byte > vertexBytes, uint32_t vertexCount, uint16_t vertexStride, PrimitiveTopology topology, IndexFormat indexFormat, std::span< const std::byte > indexBytes, uint32_t indexCount) | |
| Creates a MeshElement by copying the supplied vertex and index data. More... | |
Static Public Member Functions | |
| 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 Cylinder and optional material. More... | |
Capped cylinder mesh element centered at the origin and aligned along the Y axis.
Height is the full axial length. Slices subdivide around the cylinder, segments subdivide along its axis, and rings subdivide the caps radially.
Definition at line 27 of file Cylinder.h.
| a3d::Cylinder::Cylinder | ( | float | radius, |
| float | height, | ||
| unsigned | slices = DEFAULT_SLICES, |
||
| unsigned | segments = DEFAULT_SEGMENTS, |
||
| unsigned | rings = DEFAULT_RINGS |
||
| ) |
Generates capped cylinder geometry with the supplied dimensions and subdivisions.
| float a3d::Cylinder::height | ( | ) | const |
Returns the configured axial height.
| float a3d::Cylinder::radius | ( | ) | const |
Returns the configured cylinder radius.
| unsigned a3d::Cylinder::rings | ( | ) | const |
Returns the radial cap subdivision count.
| unsigned a3d::Cylinder::segments | ( | ) | const |
Returns the axial subdivision count.
| unsigned a3d::Cylinder::slices | ( | ) | const |
Returns the circumferential subdivision count.