本文整理了Java中org.jbox2d.dynamics.Body.getLinearVelocityFromWorldPoint()
方法的一些代码示例,展示了Body.getLinearVelocityFromWorldPoint()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Body.getLinearVelocityFromWorldPoint()
方法的具体详情如下:
包路径:org.jbox2d.dynamics.Body
类名称:Body
方法名:getLinearVelocityFromWorldPoint
[英]Get the world linear velocity of a world point attached to this body.
[中]获取附着到此实体的世界点的世界线速度。
代码示例来源:origin: libgdx/libgdx
/** Get the world linear velocity of a world point attached to this body.
* @param worldPoint a point in world coordinates.
* @return the world velocity of a point. */
public Vector2 getLinearVelocityFromWorldPoint (Vector2 worldPoint) {
tmp.set(worldPoint.x, worldPoint.y);
Vec2 lv = body.getLinearVelocityFromWorldPoint(tmp);
return linVelWorld.set(lv.x, lv.y);
}
代码示例来源:origin: stackoverflow.com
int numPoints = contact.getWorldManifold().getNumberOfContactPoints();
for(int i = 0; i < numPoints; i++){
Vector2 vector2 = ballBody.getLinearVelocityFromWorldPoint(worldManiFold.getPoints()[i]);
if(vector2.y < 0) {
contact.setEnabled(false);
内容来源于网络,如有侵权,请联系作者删除!