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.
Classes
Enums
- enum class ConvertShapeType: UnsignedInt { Material = 1 << 0, Primitive = 1 << 1, Mesh = 1 << 2, All = Material|Primitive|Mesh }
- Shape convert type.
Typedefs
-
using ConvertShapeTypes = Containers::
EnumSet<ConvertShapeType> - Shape convert types.
Functions
-
auto convertShapeNode(dart::dynamics::ShapeNode& shapeNode,
ConvertShapeTypes convertTypes,
Trade::
AbstractImporter* importer = nullptr) -> Containers:: Optional<ShapeData> - Convert
dart::dynamics::ShapeNodeto meshes and material data.
Enum documentation
enum class Magnum:: DartIntegration:: ConvertShapeType: UnsignedInt
Shape convert type.
| Enumerators | |
|---|---|
| Material |
Load only material information |
| Primitive |
Load scaling information |
| Mesh |
Load full meshes |
| All |
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::ShapeNode is not supported. The following DART shapes are supported:
BoxShapeCapsuleShapeCylinderShapeEllipsoidShapeMeshShapeSoftMeshShapeSphereShape
The following DART shapes are not yet supported:
ConeShapeLineSegmentShapeMultiSphereConvexHullShapePlaneShape(this is an infinite plane with normal)
The importer argument is an optional instance of Trade::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::