本文整理了Java中us.ihmc.yoVariables.variable.YoFrameVector3D.normalize()
方法的一些代码示例,展示了YoFrameVector3D.normalize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoFrameVector3D.normalize()
方法的具体详情如下:
包路径:us.ihmc.yoVariables.variable.YoFrameVector3D
类名称:YoFrameVector3D
方法名:normalize
暂无
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
public void computeCurrentDisturbanceForce()
{
currentDisturbanceForce.setX(random.nextDouble());
currentDisturbanceForce.setY(random.nextDouble());
currentDisturbanceForce.setZ(random.nextDouble());
currentDisturbanceForce.normalize();
currentDisturbanceForce.scale(maximalDisturbanceMagnitude.getDoubleValue());
}
代码示例来源:origin: us.ihmc/ihmc-simulation-toolkit
private void applyForce()
{
double length = pushDirection.length();
if (length > 1e-5)
{
pushForce.set(pushDirection);
pushForce.normalize();
pushForce.scale(pushForceMagnitude.getDoubleValue());
if (pushCondition == null)
{
pushTimeSwitch.set(yoTime.getDoubleValue());
}
}
else
{
pushForce.setToZero();
pushTimeSwitch.set(Double.NEGATIVE_INFINITY);
}
pushNumber.increment();
}
代码示例来源:origin: us.ihmc/ihmc-common-walking-control-modules-test
public void applyForce(Vector3D direction, double magnitude, double duration)
{
PrintTools.info("\nPushing " + jointName + " direction: " + direction + " magnitude: " + magnitude + "(N) for " + duration + "(s)");
pushDuration.set(duration);
pushDelay.set(0.0);
pushDirection.set(direction);
pushMagnitude.set(magnitude);
if (pushDirection.length() > 1e-5)
{
pushForce.set(pushDirection);
pushForce.normalize();
pushForce.scale(pushMagnitude.getDoubleValue());
pushTimeSwitch.set(yoTime.getDoubleValue());
}
else
{
pushForce.setToZero();
pushTimeSwitch.set(Double.NEGATIVE_INFINITY);
}
pushNumber.increment();
}
}
内容来源于网络,如有侵权,请联系作者删除!