Skip to content

Commit b09d921

Browse files
Add Quaternion to python factory so we can create data field with this type. (#555)
1 parent a66c054 commit b09d921

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Plugin/src/SofaPython3/PythonFactory.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,11 @@ bool PythonFactory::registerDefaultTypes()
508508
PythonFactory::registerType<sofa::defaulttype::Rigid3fTypes::Coord>("Rigid3f::Coord");
509509
PythonFactory::registerType<sofa::defaulttype::Rigid3Types::Coord>("Rigid3::Coord");
510510

511+
/// Quaternion
512+
PythonFactory::registerType<sofa::type::Quat<double>>("Quatd");
513+
PythonFactory::registerType<sofa::type::Quat<float>>("Quatf");
514+
PythonFactory::registerType<sofa::type::Quat<SReal>>("Quat");
515+
511516
// Rigid3 vectors
512517
PythonFactory::registerType<sofa::defaulttype::Rigid3dTypes::VecCoord>("Rigid3d::VecCoord");
513518
PythonFactory::registerType<sofa::defaulttype::Rigid3fTypes::VecCoord>("Rigid3f::VecCoord");

0 commit comments

Comments
 (0)