org.jbox2d.dynamics.Body.getAngularVelocity()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(120)

本文整理了Java中org.jbox2d.dynamics.Body.getAngularVelocity()方法的一些代码示例,展示了Body.getAngularVelocity()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Body.getAngularVelocity()方法的具体详情如下:
包路径:org.jbox2d.dynamics.Body
类名称:Body
方法名:getAngularVelocity

Body.getAngularVelocity介绍

[英]Get the angular velocity.
[中]得到角速度。

代码示例

代码示例来源:origin: libgdx/libgdx

/** Get the angular velocity. */
public float getAngularVelocity () {
  return body.getAngularVelocity();
}

代码示例来源:origin: jbox2d/jbox2d

@Override
public void step(TestbedSettings settings) {
 super.step(settings);
 if (m_break) {
  Break();
  m_broke = true;
  m_break = false;
 }
 // Cache velocities to improve movement on breakage.
 if (m_broke == false) {
  m_velocity.set(m_body1.getLinearVelocity());
  m_angularVelocity = m_body1.getAngularVelocity();
 }
}

代码示例来源:origin: org.jbox2d/jbox2d-testbed

@Override
public void step(TestbedSettings settings) {
 super.step(settings);
 if (m_break) {
  Break();
  m_broke = true;
  m_break = false;
 }
 // Cache velocities to improve movement on breakage.
 if (m_broke == false) {
  m_velocity.set(m_body1.getLinearVelocity());
  m_angularVelocity = m_body1.getAngularVelocity();
 }
}

代码示例来源:origin: jbox2d/jbox2d

builder.setAngle(argBody.getAngle());
builder.setLinearVelocity(vecToPb(argBody.getLinearVelocity()));
builder.setAngularVelocity(argBody.getAngularVelocity());
builder.setLinearDamping(argBody.getLinearDamping());
builder.setAngularDamping(argBody.getAngularDamping());

相关文章