INNER CODE UNIT · C++
size
mosra/magnum-integration · src/Magnum/DartIntegration/ConvertShapeNode.cpp:126
Eigen::Vector3d size = boxShape->getSize();
/* Multiplying by 0.5f because the Primitives::Cube is 2x2x2 */
shapeData.scaling = Vector3(size(0), size(1), size(2))*0.5f;
}
if(convertTypes & ConvertShapeType::Mesh) {
shapeData.meshes = Containers::Array<Trade::MeshData>(NoInit, 1);
new(&shapeData.meshes[0]) Trade::MeshData{Primitives::cubeSolid()};
}
/* Capsule */
} else if(shape->getType() == dart::dynamics::CapsuleShape::getStaticType()) {
auto capsuleShape = std::static_pointer_cast<dart::dynamics::CapsuleShape>(shape);
Float r = Float(capsuleShape->getRadius());
if(convertTypes & ConvertShapeType::Primitive)