|
Avara3D 0.2.0
C++ API reference
|
Torus mesh element centered at the origin in the XY plane. More...
#include <a3d/mesh/primitive/Torus.h>
Public Member Functions | |
| Torus (float minorRadius, float majorRadius, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS) | |
| Generates torus geometry with the supplied radii and subdivision counts. More... | |
| float | minorRadius () const |
| Returns the configured minor-radius parameter. More... | |
| float | majorRadius () const |
| Returns the configured major-radius parameter. More... | |
| unsigned | slices () const |
| Returns the minor-ring subdivision count. More... | |
| unsigned | segments () const |
| Returns the major-ring 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 minorRadius, float majorRadius, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS, std::shared_ptr< Material > material=nullptr) |
Creates a Mesh containing a Torus and optional material. More... | |
Torus mesh element centered at the origin in the XY plane.
Slices subdivide the minor ring and segments subdivide the major ring.
| a3d::Torus::Torus | ( | float | minorRadius, |
| float | majorRadius, | ||
| unsigned | slices = DEFAULT_SLICES, |
||
| unsigned | segments = DEFAULT_SEGMENTS |
||
| ) |
Generates torus geometry with the supplied radii and subdivision counts.
| float a3d::Torus::majorRadius | ( | ) | const |
Returns the configured major-radius parameter.
| float a3d::Torus::minorRadius | ( | ) | const |
Returns the configured minor-radius parameter.
| unsigned a3d::Torus::segments | ( | ) | const |
Returns the major-ring subdivision count.
| unsigned a3d::Torus::slices | ( | ) | const |
Returns the minor-ring subdivision count.