Avara3D 0.2.0
C++ API reference
a3d::Plane Class Reference

Rectangular grid mesh element centered at the origin in the XY plane. More...

#include <a3d/mesh/primitive/Plane.h>

Inheritance diagram for a3d::Plane:
[legend]

Public Member Functions

 Plane (float width, float height, unsigned widthSegements=DEFAULT_SEGMENTS, unsigned heightSegments=DEFAULT_SEGMENTS)
 Generates plane geometry with the supplied dimensions and subdivision counts. More...
 
float width () const
 Returns the configured plane width along X. More...
 
float height () const
 Returns the configured plane height along Y. More...
 
unsigned widthSegements () 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< MeshMesh (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. More...
 

Detailed Description

Rectangular grid mesh element centered at the origin in the XY plane.

Width spans X, height spans Y, and generated normals point along +Z.

Definition at line 26 of file Plane.h.

Constructor & Destructor Documentation

◆ Plane()

a3d::Plane::Plane ( float  width,
float  height,
unsigned  widthSegements = DEFAULT_SEGMENTS,
unsigned  heightSegments = DEFAULT_SEGMENTS 
)

Generates plane geometry with the supplied dimensions and subdivision counts.

Member Function Documentation

◆ height()

float a3d::Plane::height ( ) const

Returns the configured plane height along Y.

◆ heightSegments()

unsigned a3d::Plane::heightSegments ( ) const

Returns the height subdivision count.

◆ Mesh()

static std::shared_ptr< Mesh > a3d::Plane::Mesh ( float  width,
float  height,
unsigned  widthSegements = DEFAULT_SEGMENTS,
unsigned  heightSegments = DEFAULT_SEGMENTS,
std::shared_ptr< Material material = nullptr 
)
static

Creates a Mesh containing a Plane and optional material.

◆ width()

float a3d::Plane::width ( ) const

Returns the configured plane width along X.

◆ widthSegements()

unsigned a3d::Plane::widthSegements ( ) const

Returns the width subdivision count.


The documentation for this class was generated from the following file: