本文整理汇总了C++中opensim::Body::getWrapObjectSet方法的典型用法代码示例。如果您正苦于以下问题:C++ Body::getWrapObjectSet方法的具体用法?C++ Body::getWrapObjectSet怎么用?C++ Body::getWrapObjectSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类opensim::Body
的用法示例。
在下文中一共展示了Body::getWrapObjectSet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeWrapObjects
/**
* Write a body's wrap objects to a SIMM joint file.
*
* @param aBody reference to the body to write.
* @param aStream the stream (file) to write to.
*/
void SimbodySimmModel::writeWrapObjects(OpenSim::Body& aBody, ofstream& aStream) const
{
int i;
const WrapObjectSet& wrapObjects = aBody.getWrapObjectSet();
for (i = 0; i < wrapObjects.getSize(); i++) {
WrapObject& wo = wrapObjects.get(i);
aStream << "beginwrapobject " << wo.getName() << endl;
aStream << "wraptype " << wo.getWrapTypeName() << endl;
aStream << "segment " << aBody.getName() << endl;
aStream << wo.getDimensionsString() << endl;
if (!wo.getQuadrantNameUseDefault())
aStream << "quadrant " << wo.get_quadrant() << endl;
if (!wo.getActiveUseDefault())
aStream << "active " << (wo.get_active() ? "yes" : "no") << endl;
aStream << "translation " << wo.get_translation()[0] << " " <<
wo.get_translation()[1] << " " << wo.get_translation()[2] << endl;
aStream << "xyz_body_rotation " << wo.get_xyz_body_rotation()[0] * SimTK_RADIAN_TO_DEGREE <<
" " << wo.get_xyz_body_rotation()[1] * SimTK_RADIAN_TO_DEGREE <<
" " << wo.get_xyz_body_rotation()[2] * SimTK_RADIAN_TO_DEGREE << endl;
aStream << "endwrapobject" << endl << endl;
}
}