control.setAngularSleepingThreshold(getAngularSleepingThreshold()); control.setCcdMotionThreshold(getCcdMotionThreshold()); control.setCcdSweptSphereRadius(getCcdSweptSphereRadius()); control.setCollideWithGroups(getCollideWithGroups()); control.setCollisionGroup(getCollisionGroup());
control.setAngularSleepingThreshold(getAngularSleepingThreshold()); control.setCcdMotionThreshold(getCcdMotionThreshold()); control.setCcdSweptSphereRadius(getCcdSweptSphereRadius()); control.setCollideWithGroups(getCollideWithGroups()); control.setCollisionGroup(getCollisionGroup());
@Override public void visit(Spatial spat) { RigidBodyControl rbc = spat.getControl(RigidBodyControl.class); if (rbc != null) { rbc.setSleepingThresholds(linear, angular); rbc.setCcdMotionThreshold(threshold); rbc.setCcdSweptSphereRadius(radius); } } };
@Override public Control cloneForSpatial(Spatial spatial) { RigidBodyControl control = new RigidBodyControl(collisionShape, mass); control.setAngularFactor(getAngularFactor()); control.setAngularSleepingThreshold(getAngularSleepingThreshold()); control.setCcdMotionThreshold(getCcdMotionThreshold()); control.setCcdSweptSphereRadius(getCcdSweptSphereRadius()); control.setCollideWithGroups(getCollideWithGroups()); control.setCollisionGroup(getCollisionGroup()); control.setDamping(getLinearDamping(), getAngularDamping()); control.setFriction(getFriction()); control.setGravity(getGravity()); control.setKinematic(isKinematic()); control.setKinematicSpatial(isKinematicSpatial()); control.setLinearSleepingThreshold(getLinearSleepingThreshold()); control.setPhysicsLocation(getPhysicsLocation(null)); control.setPhysicsRotation(getPhysicsRotationMatrix(null)); control.setRestitution(getRestitution()); if (mass > 0) { control.setAngularVelocity(getAngularVelocity()); control.setLinearVelocity(getLinearVelocity()); } control.setApplyPhysicsLocal(isApplyPhysicsLocal()); return control; }
control.setAngularSleepingThreshold(getAngularSleepingThreshold()); control.setCcdMotionThreshold(getCcdMotionThreshold()); control.setCcdSweptSphereRadius(getCcdSweptSphereRadius()); control.setCollideWithGroups(getCollideWithGroups()); control.setCollisionGroup(getCollisionGroup());
public Control cloneForSpatial(Spatial spatial) { RigidBodyControl control = new RigidBodyControl(collisionShape, mass); control.setAngularFactor(getAngularFactor()); control.setAngularSleepingThreshold(getAngularSleepingThreshold()); control.setCcdMotionThreshold(getCcdMotionThreshold()); control.setCcdSweptSphereRadius(getCcdSweptSphereRadius()); control.setCollideWithGroups(getCollideWithGroups()); control.setCollisionGroup(getCollisionGroup()); control.setDamping(getLinearDamping(), getAngularDamping()); control.setFriction(getFriction()); control.setGravity(getGravity()); control.setKinematic(isKinematic()); control.setKinematicSpatial(isKinematicSpatial()); control.setLinearSleepingThreshold(getLinearSleepingThreshold()); control.setPhysicsLocation(getPhysicsLocation(null)); control.setPhysicsRotation(getPhysicsRotationMatrix(null)); control.setRestitution(getRestitution()); if (mass > 0) { control.setAngularVelocity(getAngularVelocity()); control.setLinearVelocity(getLinearVelocity()); } control.setApplyPhysicsLocal(isApplyPhysicsLocal()); control.setSpatial(spatial); return control; }
@Override public Object jmeClone() { RigidBodyControl control = new RigidBodyControl(collisionShape, mass); control.setAngularFactor(getAngularFactor()); control.setAngularSleepingThreshold(getAngularSleepingThreshold()); control.setCcdMotionThreshold(getCcdMotionThreshold()); control.setCcdSweptSphereRadius(getCcdSweptSphereRadius()); control.setCollideWithGroups(getCollideWithGroups()); control.setCollisionGroup(getCollisionGroup()); control.setDamping(getLinearDamping(), getAngularDamping()); control.setFriction(getFriction()); control.setGravity(getGravity()); control.setKinematic(isKinematic()); control.setKinematicSpatial(isKinematicSpatial()); control.setLinearSleepingThreshold(getLinearSleepingThreshold()); control.setPhysicsLocation(getPhysicsLocation(null)); control.setPhysicsRotation(getPhysicsRotationMatrix(null)); control.setRestitution(getRestitution()); if (mass > 0) { control.setAngularVelocity(getAngularVelocity()); control.setLinearVelocity(getLinearVelocity()); } control.setApplyPhysicsLocal(isApplyPhysicsLocal()); control.spatial = this.spatial; control.setEnabled(isEnabled()); return control; }
control.setAngularSleepingThreshold(getAngularSleepingThreshold()); control.setCcdMotionThreshold(getCcdMotionThreshold()); control.setCcdSweptSphereRadius(getCcdSweptSphereRadius()); control.setCollideWithGroups(getCollideWithGroups()); control.setCollisionGroup(getCollisionGroup());