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

Wedge mesh element extending along X, Y, and Z. More...

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

Inheritance diagram for a3d::Wedge:
[legend]

Public Member Functions

 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. More...
 
float length () const
 Returns the configured wedge length along X. More...
 
float width () const
 Returns the configured wedge width along Z. More...
 
float height () const
 Returns the configured wedge height along Y. More...
 
unsigned runSegments () const
 Returns the subdivision count along the wedge run in X. More...
 
unsigned widthSegments () const
 Returns the subdivision count across the wedge width in Z. More...
 
unsigned riseSegments () const
 Returns the subdivision count along the vertical rise in Y. 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 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. More...
 

Detailed Description

Wedge mesh element extending along X, Y, and Z.

Length spans X from the point at -X to the tall face at +X, width spans Z, and height rises along +Y. The base lies at Y = 0, so the geometry is not vertically centered about the origin. Subdivision counts are clamped to at least one.

Definition at line 29 of file Wedge.h.

Constructor & Destructor Documentation

◆ Wedge()

a3d::Wedge::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.

Member Function Documentation

◆ height()

float a3d::Wedge::height ( ) const

Returns the configured wedge height along Y.

◆ length()

float a3d::Wedge::length ( ) const

Returns the configured wedge length along X.

◆ Mesh()

static std::shared_ptr< Mesh > a3d::Wedge::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 
)
static

Creates a Mesh containing a Wedge and optional material.

◆ riseSegments()

unsigned a3d::Wedge::riseSegments ( ) const

Returns the subdivision count along the vertical rise in Y.

◆ runSegments()

unsigned a3d::Wedge::runSegments ( ) const

Returns the subdivision count along the wedge run in X.

◆ width()

float a3d::Wedge::width ( ) const

Returns the configured wedge width along Z.

◆ widthSegments()

unsigned a3d::Wedge::widthSegments ( ) const

Returns the subdivision count across the wedge width in Z.


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