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

Capped hollow tube mesh element centered at the origin and aligned along the Z axis. More...

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

Inheritance diagram for a3d::Tube:
[legend]

Public Member Functions

 Tube (float innerRadius, float outerRadius, float height, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS, unsigned rings=DEFAULT_RINGS)
 Generates capped tube geometry with the supplied dimensions and subdivisions. More...
 
float innerRadius () const
 Returns the configured inner radius. More...
 
float outerRadius () const
 Returns the configured outer radius. More...
 
float height () const
 Returns the configured axial height. More...
 
unsigned slices () const
 Returns the circumferential subdivision count. More...
 
unsigned segments () const
 Returns the axial subdivision count. More...
 
unsigned rings () const
 Returns the radial end-cap 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 innerRadius, float outerRadius, float height, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS, unsigned rings=DEFAULT_RINGS, std::shared_ptr< Material > material=nullptr)
 Creates a Mesh containing a Tube and optional material. More...
 

Detailed Description

Capped hollow tube mesh element centered at the origin and aligned along the Z axis.

Inner and outer radii lie in the XY plane and height is the full axial length. Slices subdivide around the tube, segments subdivide along its axis, and rings subdivide the annular end caps radially.

Definition at line 28 of file Tube.h.

Constructor & Destructor Documentation

◆ Tube()

a3d::Tube::Tube ( float  innerRadius,
float  outerRadius,
float  height,
unsigned  slices = DEFAULT_SLICES,
unsigned  segments = DEFAULT_SEGMENTS,
unsigned  rings = DEFAULT_RINGS 
)

Generates capped tube geometry with the supplied dimensions and subdivisions.

Member Function Documentation

◆ height()

float a3d::Tube::height ( ) const

Returns the configured axial height.

◆ innerRadius()

float a3d::Tube::innerRadius ( ) const

Returns the configured inner radius.

◆ Mesh()

static std::shared_ptr< Mesh > a3d::Tube::Mesh ( float  innerRadius,
float  outerRadius,
float  height,
unsigned  slices = DEFAULT_SLICES,
unsigned  segments = DEFAULT_SEGMENTS,
unsigned  rings = DEFAULT_RINGS,
std::shared_ptr< Material material = nullptr 
)
static

Creates a Mesh containing a Tube and optional material.

◆ outerRadius()

float a3d::Tube::outerRadius ( ) const

Returns the configured outer radius.

◆ rings()

unsigned a3d::Tube::rings ( ) const

Returns the radial end-cap subdivision count.

◆ segments()

unsigned a3d::Tube::segments ( ) const

Returns the axial subdivision count.

◆ slices()

unsigned a3d::Tube::slices ( ) const

Returns the circumferential subdivision count.


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