|
Avara3D 0.2.0
C++ API reference
|
Helical spring mesh element aligned along the Z axis. More...
#include <a3d/mesh/primitive/Spring.h>
Public Member Functions | |
| Spring (float minorRadius, float majorRadius, float length, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS) | |
| Generates spring geometry with the supplied dimensions and subdivisions. More... | |
| float | minorRadius () const |
| Returns the configured spring-tube radius. More... | |
| float | majorRadius () const |
| Returns the configured radius from the Z axis to the tube centerline. More... | |
| float | length () const |
| Returns the configured axial length. More... | |
| unsigned | slices () const |
| Returns the tube cross-section subdivision count. More... | |
| unsigned | segments () const |
| Returns the helical-path 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< Mesh > | Mesh (float minorRadius, float majorRadius, float length, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS, std::shared_ptr< Material > material=nullptr) |
Creates a Mesh containing a Spring and optional material. More... | |
Helical spring mesh element aligned along the Z axis.
Minor radius is the radius of the spring tube itself; major radius is the distance from the Z axis to the tube centerline. Length is the full axial length. Slices subdivide the tube cross-section and segments subdivide the helical path.
| a3d::Spring::Spring | ( | float | minorRadius, |
| float | majorRadius, | ||
| float | length, | ||
| unsigned | slices = DEFAULT_SLICES, |
||
| unsigned | segments = DEFAULT_SEGMENTS |
||
| ) |
Generates spring geometry with the supplied dimensions and subdivisions.
| float a3d::Spring::length | ( | ) | const |
Returns the configured axial length.
| float a3d::Spring::majorRadius | ( | ) | const |
Returns the configured radius from the Z axis to the tube centerline.
| float a3d::Spring::minorRadius | ( | ) | const |
Returns the configured spring-tube radius.
| unsigned a3d::Spring::segments | ( | ) | const |
Returns the helical-path subdivision count.
| unsigned a3d::Spring::slices | ( | ) | const |
Returns the tube cross-section subdivision count.