|
Avara3D 0.2.0
C++ API reference
|
Tubular torus-knot mesh element controlled by the knot parameters p and q. More...
#include <a3d/mesh/primitive/TorusKnot.h>
Public Member Functions | |
| TorusKnot (unsigned p, unsigned q, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS) | |
| Generates torus-knot geometry with the supplied knot parameters and subdivisions. More... | |
| unsigned | p () const |
| Returns the configured p knot parameter. More... | |
| unsigned | q () const |
| Returns the configured q knot parameter. More... | |
| unsigned | slices () const |
| Returns the tube cross-section subdivision count. More... | |
| unsigned | segments () const |
| Returns the knot-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 (unsigned p, unsigned q, unsigned slices=DEFAULT_SLICES, unsigned segments=DEFAULT_SEGMENTS, std::shared_ptr< Material > material=nullptr) |
Creates a Mesh containing a TorusKnot and optional material. More... | |
Tubular torus-knot mesh element controlled by the knot parameters p and q.
Slices subdivide the tube cross-section and segments subdivide the knot path.
Definition at line 26 of file TorusKnot.h.
| a3d::TorusKnot::TorusKnot | ( | unsigned | p, |
| unsigned | q, | ||
| unsigned | slices = DEFAULT_SLICES, |
||
| unsigned | segments = DEFAULT_SEGMENTS |
||
| ) |
Generates torus-knot geometry with the supplied knot parameters and subdivisions.
| unsigned a3d::TorusKnot::p | ( | ) | const |
Returns the configured p knot parameter.
| unsigned a3d::TorusKnot::q | ( | ) | const |
Returns the configured q knot parameter.
| unsigned a3d::TorusKnot::segments | ( | ) | const |
Returns the knot-path subdivision count.
| unsigned a3d::TorusKnot::slices | ( | ) | const |
Returns the tube cross-section subdivision count.