本文整理汇总了C++中point::addIntF方法的典型用法代码示例。如果您正苦于以下问题:C++ point::addIntF方法的具体用法?C++ point::addIntF怎么用?C++ point::addIntF使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类point
的用法示例。
在下文中一共展示了point::addIntF方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addDamping
void addDamping()
{
XMVECTOR dampPoint1 = XMVectorScale(point1->curr_v, -g_fDamping);
XMVECTOR dampPoint2 = XMVectorScale(point2->curr_v, -g_fDamping);
point1->addIntF(dampPoint1);
point2->addIntF(dampPoint2);
}
示例2: addDampingTMP
// same with vtmp
void addDampingTMP()
{
XMVECTOR dampPoint1 = XMVectorScale(point1->vtmp, -g_fDamping);
XMVECTOR dampPoint2 = XMVectorScale(point2->vtmp, -g_fDamping);
point1->addIntF(dampPoint1);
point2->addIntF(dampPoint2);
}
示例3: computeSpringForcesTMP
// same only with xtmp
void computeSpringForcesTMP()
{
float curr_length = getDistance(&point1->xtmp, &point2->xtmp);
float springForce = (-1 * stiffness) * (curr_length - org_length);
forces = XMVectorSubtract(point1->xtmp, point2->xtmp);
forces = XMVectorScale(forces, 1.f / curr_length);
forces = XMVectorScale(forces, springForce);
point1->addIntF(forces);
point2->addIntF(XMVectorScale(forces, -1.f));
}