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

Generates a bounded angular patch of a sphere centered at the origin. More...

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

Inheritance diagram for a3d::Dome:
[legend]

Public Member Functions

 Dome (float radius, float azimuthStart, float azimuthSweep, float elevationStart, float elevationSweep, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS)
 Generates a spherical patch with the supplied angular ranges and subdivisions. More...
 
float radius () const
 Returns the source sphere radius. More...
 
float azimuthStart () const
 Returns the azimuth start angle in radians. More...
 
float azimuthSweep () const
 Returns the azimuth sweep angle in radians. More...
 
float elevationStart () const
 Returns the elevation start angle in radians. More...
 
float elevationSweep () const
 Returns the elevation sweep angle in radians. More...
 
unsigned slices () const
 Returns the azimuth subdivision count. More...
 
unsigned segments () const
 Returns the elevation 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 radius, float azimuthStart, float azimuthSweep, float elevationStart, float elevationSweep, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS, std::shared_ptr< Material > material=nullptr)
 Creates a Mesh containing a Dome and optional material. More...
 

Detailed Description

Generates a bounded angular patch of a sphere centered at the origin.

Azimuth angles are measured counterclockwise around the Z axis from +X; elevation angles are measured from the +Z axis. All angles are in radians. The resulting patch remains positioned on the source sphere and is not recentered around the patch's own bounds.

Definition at line 29 of file Dome.h.

Constructor & Destructor Documentation

◆ Dome()

a3d::Dome::Dome ( float  radius,
float  azimuthStart,
float  azimuthSweep,
float  elevationStart,
float  elevationSweep,
unsigned  slices = DEFAULT_SLICES,
unsigned  segments = DEFAULT_SEGMENTS 
)

Generates a spherical patch with the supplied angular ranges and subdivisions.

Member Function Documentation

◆ azimuthStart()

float a3d::Dome::azimuthStart ( ) const

Returns the azimuth start angle in radians.

◆ azimuthSweep()

float a3d::Dome::azimuthSweep ( ) const

Returns the azimuth sweep angle in radians.

◆ elevationStart()

float a3d::Dome::elevationStart ( ) const

Returns the elevation start angle in radians.

◆ elevationSweep()

float a3d::Dome::elevationSweep ( ) const

Returns the elevation sweep angle in radians.

◆ Mesh()

static std::shared_ptr< Mesh > a3d::Dome::Mesh ( float  radius,
float  azimuthStart,
float  azimuthSweep,
float  elevationStart,
float  elevationSweep,
unsigned  slices = DEFAULT_SLICES,
unsigned  segments = DEFAULT_SEGMENTS,
std::shared_ptr< Material material = nullptr 
)
static

Creates a Mesh containing a Dome and optional material.

◆ radius()

float a3d::Dome::radius ( ) const

Returns the source sphere radius.

◆ segments()

unsigned a3d::Dome::segments ( ) const

Returns the elevation subdivision count.

◆ slices()

unsigned a3d::Dome::slices ( ) const

Returns the azimuth subdivision count.


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