|
Avara3D 0.2.0
C++ API reference
|
Rounded box mesh element centered at the origin. More...
#include <a3d/mesh/primitive/RoundedBox.h>
Public Member Functions | |
| RoundedBox (float radius, float length, float width, float height, unsigned slices=DEFAULT_SLICES, unsigned lengthSegments=DEFAULT_SEGMENTS, unsigned widthSegments=DEFAULT_SEGMENTS, unsigned heightSegments=DEFAULT_SEGMENTS) | |
| Generates rounded-box geometry with the supplied dimensions and subdivisions. More... | |
| float | radius () const |
| Returns the configured edge radius. More... | |
| float | length () const |
| Returns the configured box length along Z. More... | |
| float | width () const |
| Returns the configured box width along X. More... | |
| float | height () const |
| Returns the configured box height along Y. More... | |
| unsigned | slices () const |
| Returns the rounded-edge subdivision count. More... | |
| unsigned | lengthSegments () const |
| Returns the length subdivision count. More... | |
| unsigned | widthSegments () const |
| Returns the width subdivision count. More... | |
| unsigned | heightSegments () const |
| Returns the height 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 length, float width, float height, unsigned slices=DEFAULT_SLICES, unsigned lengthSegments=DEFAULT_SEGMENTS, unsigned widthSegments=DEFAULT_SEGMENTS, unsigned heightSegments=DEFAULT_SEGMENTS, std::shared_ptr< Material > material=nullptr) |
Creates a Mesh containing a RoundedBox and optional material. More... | |
Rounded box mesh element centered at the origin.
Width spans X, height spans Y, and length spans Z. Radius controls the rounded edges, slices subdivide the rounded portions, and the segment counts subdivide the corresponding flat-face dimensions.
Definition at line 28 of file RoundedBox.h.
| a3d::RoundedBox::RoundedBox | ( | float | radius, |
| float | length, | ||
| float | width, | ||
| float | height, | ||
| unsigned | slices = DEFAULT_SLICES, |
||
| unsigned | lengthSegments = DEFAULT_SEGMENTS, |
||
| unsigned | widthSegments = DEFAULT_SEGMENTS, |
||
| unsigned | heightSegments = DEFAULT_SEGMENTS |
||
| ) |
Generates rounded-box geometry with the supplied dimensions and subdivisions.
| float a3d::RoundedBox::height | ( | ) | const |
Returns the configured box height along Y.
| unsigned a3d::RoundedBox::heightSegments | ( | ) | const |
Returns the height subdivision count.
| float a3d::RoundedBox::length | ( | ) | const |
Returns the configured box length along Z.
| unsigned a3d::RoundedBox::lengthSegments | ( | ) | const |
Returns the length subdivision count.
|
static |
Creates a Mesh containing a RoundedBox and optional material.
| float a3d::RoundedBox::radius | ( | ) | const |
Returns the configured edge radius.
| unsigned a3d::RoundedBox::slices | ( | ) | const |
Returns the rounded-edge subdivision count.
| float a3d::RoundedBox::width | ( | ) | const |
Returns the configured box width along X.
| unsigned a3d::RoundedBox::widthSegments | ( | ) | const |
Returns the width subdivision count.