This is a snapshot of a work-in-progress documentation theme. If you feel lost, miss something, or want to see the original Doxygen docs instead, head over to the archived version of this documentation page.

Magnum::Primitives namespace

Primitive library.


Basic primitives for testing purposes.

This library is built if WITH_PRIMITIVES is enabled when building Magnum. To use this library with CMake, you need to request the Primitives component of the Magnum package and link to the Magnum::Primitives target:

find_package(Magnum REQUIRED Primitives)

# ...
target_link_libraries(your-app Magnum::Primitives)

See Downloading and building and Usage with CMake for more information.


class Capsule2D
2D capsule primitive
class Capsule3D
3D capsule primitive
class Circle
2D circle primitive
class Crosshair2D
2D crosshair primitive
class Crosshair3D
3D crosshair primitive
class Cube
3D cube primitive
class Cylinder
3D cylinder primitive
class Icosphere
3D icosphere primitive
class Line2D
2D line primitive
class Line3D
3D line primitive
class Plane
3D plane primitive
class Square
2D square primitive
class UVSphere
3D UV sphere primitive


auto axis2D() -> Trade::MeshData2D
2D axis
auto axis3D() -> Trade::MeshData3D
3D axis

Function documentation

Trade::MeshData2D Magnum::Primitives::axis2D()

2D axis

Two color-coded arrows for visualizing orientation (XY is RG). Indexed MeshPrimitive::Lines with vertex colors.

Trade::MeshData3D Magnum::Primitives::axis3D()

3D axis

Three color-coded arrows for visualizing orientation (XYZ is RGB). Indexed MeshPrimitive::Lines with vertex colors.