本文整理汇总了C++中Pose3D::rotate方法的典型用法代码示例。如果您正苦于以下问题:C++ Pose3D::rotate方法的具体用法?C++ Pose3D::rotate怎么用?C++ Pose3D::rotate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Pose3D
的用法示例。
在下文中一共展示了Pose3D::rotate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateModelRec
void RobotModelBase::updateModelRec(Bodypart *part, Pose3D t)
{
//transform to body part position
t.translate(part->translation);
//if there is a joint on this body part (only not on root)
if (part->jointIndex >= 0)
{
t.translate(part->anchor); //go to joint position
jointPositions[part->jointIndex] = t; //set joint position
t.rotate(RotationMatrix(part->axis, jointAngles[part->jointIndex]));
t.translate(part->anchor * -1.0); //rotate part and go back to center
}
if (partOriginsAtJoint)
(partPositions[part->jointIndex + 1] = t).translate(part->anchor);
else
partPositions[part->jointIndex + 1] = t;
com += t.translation * part->mass; //calculate center of mass
mass += part->mass;
//continue with body parts mounted on this part
for (unsigned int i = 0; i < part->children.size(); i++)
updateModelRec(part->children[i], t);
}