9#ifndef AVARA3D_MESH_PRIMITIVE_WEDGE_H
10#define AVARA3D_MESH_PRIMITIVE_WEDGE_H
14#include "a3d/mesh/MeshElement.h"
43 std::shared_ptr<Material> material =
nullptr);
79 static constexpr int DEFAULT_RUN_SEGMENTS = 1;
80 static constexpr int DEFAULT_WIDTH_SEGMENTS = 1;
81 static constexpr int DEFAULT_RISE_SEGMENTS = 1;
88 unsigned _runSegments;
89 unsigned _widthSegments;
90 unsigned _riseSegments;
Owns the vertex and optional index data for one mesh primitive.
Wedge mesh element extending along X, Y, and Z.
Wedge(float length, float width, float height, unsigned runSegments=DEFAULT_RUN_SEGMENTS, unsigned widthSegments=DEFAULT_WIDTH_SEGMENTS, unsigned riseSegments=DEFAULT_RISE_SEGMENTS)
Generates wedge geometry with the supplied dimensions and subdivision counts.
float width() const
Returns the configured wedge width along Z.
float height() const
Returns the configured wedge height along Y.
float length() const
Returns the configured wedge length along X.
unsigned widthSegments() const
Returns the subdivision count across the wedge width in Z.
unsigned runSegments() const
Returns the subdivision count along the wedge run in X.
unsigned riseSegments() const
Returns the subdivision count along the vertical rise in Y.
static std::shared_ptr< Mesh > Mesh(float length, float width, float height, unsigned runSegments=DEFAULT_RUN_SEGMENTS, unsigned widthSegments=DEFAULT_WIDTH_SEGMENTS, unsigned riseSegments=DEFAULT_RISE_SEGMENTS, std::shared_ptr< Material > material=nullptr)
Creates a Mesh containing a Wedge and optional material.