![]() |
Conversions to and from OSG quaternion types. More...
Go to the source code of this file.
Namespaces | |
SurgSim | |
SurgSim::Graphics | |
Functions | |
osg::Quat | SurgSim::Graphics::toOsg (const SurgSim::Math::Quaternionf &quaternion) |
Convert quaternion of floats to OSG. More... | |
osg::Quat | SurgSim::Graphics::toOsg (const SurgSim::Math::Quaterniond &quaternion) |
Convert quaternion of doubles to OSG. More... | |
template<typename T > | |
Eigen::Quaternion< T > | SurgSim::Graphics::fromOsg (const osg::Quat &quaternion) |
Convert from OSG to either quaternion of floats or doubles. More... | |
Conversions to and from OSG quaternion types.
Note that the Eigen quaternion constructor takes the W component first, while OSG stores it last.
Also note that OSG only has one Quat type, which uses double for the value type. Conversions are provided to and from this type for both SurgSim::Math::Quaternionf and SurgSim::Math::Quaterniond.