9#ifndef AVARA3D_MESH_PRIMITIVE_ROUNDEDBOX_H
10#define AVARA3D_MESH_PRIMITIVE_ROUNDEDBOX_H
14#include "a3d/mesh/MeshElement.h"
38 unsigned slices = DEFAULT_SLICES,
42 std::shared_ptr<Material> material =
nullptr);
51 unsigned slices = DEFAULT_SLICES,
85 static constexpr unsigned DEFAULT_SLICES = 8;
86 static constexpr unsigned DEFAULT_SEGMENTS = 8;
95 unsigned _lengthSegments;
96 unsigned _widthSegments;
97 unsigned _heightSegments;
Owns the vertex and optional index data for one mesh primitive.
Rounded box mesh element centered at the origin.
float radius() const
Returns the configured edge radius.
unsigned heightSegments() const
Returns the height subdivision count.
float width() const
Returns the configured box width along X.
unsigned lengthSegments() const
Returns the length subdivision count.
float height() const
Returns the configured box height along Y.
unsigned widthSegments() const
Returns the width subdivision count.
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.
float length() const
Returns the configured box length along Z.
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.
unsigned slices() const
Returns the rounded-edge subdivision count.