9#ifndef AVARA3D_MESH_PRIMITIVE_PLANE_H
10#define AVARA3D_MESH_PRIMITIVE_PLANE_H
14#include "a3d/mesh/MeshElement.h"
36 std::shared_ptr<Material> material =
nullptr);
63 static constexpr unsigned DEFAULT_SEGMENTS = 8;
69 unsigned _widthSegements;
70 unsigned _heightSegments;
Owns the vertex and optional index data for one mesh primitive.
Rectangular grid mesh element centered at the origin in the XY plane.
unsigned heightSegments() const
Returns the height subdivision count.
float height() const
Returns the configured plane height along Y.
static std::shared_ptr< Mesh > Mesh(float width, float height, unsigned widthSegements=DEFAULT_SEGMENTS, unsigned heightSegments=DEFAULT_SEGMENTS, std::shared_ptr< Material > material=nullptr)
Creates a Mesh containing a Plane and optional material.
float width() const
Returns the configured plane width along X.
unsigned widthSegements() const
Returns the width subdivision count.
Plane(float width, float height, unsigned widthSegements=DEFAULT_SEGMENTS, unsigned heightSegments=DEFAULT_SEGMENTS)
Generates plane geometry with the supplied dimensions and subdivision counts.