bodyTypeList = new List<BodyType>(skin); bodyTypeList.setItems(BodyType.values()); bodyTypeList.setSelectedIndex(manifestation.getType().getValue()); Table positionTable = new Table(), velocityTable = new Table(), angleTable = new Table(); hasPositionCheckbox = new CheckBox("Has Position", skin);
/** Create a rigid body given a definition. No reference to the definition is retained. * Bodies created by this method are pooled internally by the World object. * They will be freed upon calling {@link World#destroyBody(Body)} * @see Pool * @warning This function is locked during callbacks. */ public Body createBody (BodyDef def) { long bodyAddr = jniCreateBody(addr, def.type.getValue(), def.position.x, def.position.y, def.angle, def.linearVelocity.x, def.linearVelocity.y, def.angularVelocity, def.linearDamping, def.angularDamping, def.allowSleep, def.awake, def.fixedRotation, def.bullet, def.active, def.gravityScale); Body body = freeBodies.obtain(); body.reset(bodyAddr); this.bodies.put(body.addr, body); return body; }
/** Set the type of this body. This may alter the mass and velocity. */ public void setType (BodyType type) { jniSetType(addr, type.getValue()); }
/** Create a rigid body given a definition. No reference to the definition is retained. * Bodies created by this method are pooled internally by the World object. * They will be freed upon calling {@link World#destroyBody(Body)} * @see Pool * @warning This function is locked during callbacks. */ public Body createBody (BodyDef def) { long bodyAddr = jniCreateBody(addr, def.type.getValue(), def.position.x, def.position.y, def.angle, def.linearVelocity.x, def.linearVelocity.y, def.angularVelocity, def.linearDamping, def.angularDamping, def.allowSleep, def.awake, def.fixedRotation, def.bullet, def.active, def.gravityScale); Body body = freeBodies.obtain(); body.reset(bodyAddr); this.bodies.put(body.addr, body); return body; }
/** Set the type of this body. This may alter the mass and velocity. */ public void setType (BodyType type) { jniSetType(addr, type.getValue()); }