Magnum::DartIntegration namespace

Integration with DART Dynamic Animation and Robotics Toolkit.


Conversion of nodes and shapes for visualizing physics simulation.

This library depends on the DART library and is built if WITH_DART is enabled when building Magnum Integration. To use this library with CMake, you need to request the Dart component of the MagnumIntegration package and link to the MagnumIntegration::Dart target:

find_package(MagnumIntegration REQUIRED Dart)

# ...
target_link_libraries(your-app MagnumIntegration::Dart)

See Downloading and building integration libraries and Integration library usage with CMake for more information.


struct DrawData
Shape draw data.
class Object
DART Physics BodyNode or ShapeNode.
struct ShapeData
Shape data.
class World
DART physics world.


enum class ConvertShapeType: UnsignedInt { Material = 1 << 0, Primitive = 1 << 1, Mesh = 1 << 2, All = Material|Primitive|Mesh }
Shape convert type.


using ConvertShapeTypes = Containers::EnumSet<ConvertShapeType>
Shape convert types.


auto convertShapeNode(dart::dynamics::ShapeNode& shapeNode, ConvertShapeTypes convertTypes, Trade::AbstractImporter* importer = nullptr) -> Containers::Optional<ShapeData>
Convert dart::dynamics::ShapeNode to meshes and material data.

Enum documentation

enum class Magnum::DartIntegration::ConvertShapeType: UnsignedInt

Shape convert type.


Load only material information


Load scaling information


Load full meshes


Load everything

Typedef documentation

typedef Containers::EnumSet<ConvertShapeType> Magnum::DartIntegration::ConvertShapeTypes

Shape convert types.

Function documentation

Containers::Optional<ShapeData> Magnum::DartIntegration::convertShapeNode(dart::dynamics::ShapeNode& shapeNode, ConvertShapeTypes convertTypes, Trade::AbstractImporter* importer = nullptr)

Convert dart::dynamics::ShapeNode to meshes and material data.

Returns Corrade::Containers::NullOpt if the shape of given ShapeNode is not supported. The following DART shapes are supported:

  • BoxShape
  • CapsuleShape
  • CylinderShape
  • EllipsoidShape
  • MeshShape
  • SoftMeshShape
  • SphereShape

The following DART shapes are not yet supported:

  • ConeShape
  • LineSegmentShape
  • MultiSphereConvexHullShape
  • PlaneShape (this is an infinite plane with normal)

The importer argument is an optional instance of Trade::AssimpImporter. It is only used when loading dart::dynamics::ShapeNode with a shape of type dart::dynamics::MeshShape. As a consequence, you can omit it you do not want to load such a dart::dynamics::ShapeNode. On the contrary, when you are trying to load a dart::dynamics::MeshShape and the importer is a nullptr, the function will return Corrade::Containers::NullOpt.