9#ifndef AVARA3D_MESH_PRIMITIVE_BOX_H
10#define AVARA3D_MESH_PRIMITIVE_BOX_H
14#include "a3d/mesh/MeshElement.h"
47 std::shared_ptr<Material> material =
nullptr);
82 static constexpr int DEFAULT_SEGMENTS = 1;
89 unsigned _lengthSegments;
90 unsigned _widthSegments;
91 unsigned _heightSegments;
Box mesh element centered at the origin.
unsigned lengthSegments() const
Returns the stored length subdivision count.
float width() const
Returns the configured box width along X.
float height() const
Returns the configured box height along Y.
Box(float width, float height, float length, unsigned widthSegments=DEFAULT_SEGMENTS, unsigned heightSegments=DEFAULT_SEGMENTS, unsigned lengthSegments=DEFAULT_SEGMENTS)
Generates box geometry with the supplied dimensions and subdivision counts.
static std::shared_ptr< Mesh > Mesh(float width, float height, float length, unsigned widthSegments=DEFAULT_SEGMENTS, unsigned heightSegments=DEFAULT_SEGMENTS, unsigned lengthSegments=DEFAULT_SEGMENTS, std::shared_ptr< Material > material=nullptr)
Creates a Mesh containing a Box and optional material.
unsigned heightSegments() const
Returns the stored height subdivision count.
unsigned widthSegments() const
Returns the stored width subdivision count.
float length() const
Returns the configured box length along Z.
Owns the vertex and optional index data for one mesh primitive.