public Vector3 GetVelocity(Vector3 position, CoordinateSpace positionSpace = CoordinateSpace.Global, CoordinateSpace velocitySpace = CoordinateSpace.Global)
 {
     Vector3 globalResult = positionSpace == CoordinateSpace.Global
                          ? _rigidBody.WrappedRigidBody.GetVelocityOfWorldPoint(position.ToDigitalRune()).ToStandard()
                          : _rigidBody.WrappedRigidBody.GetVelocityOfLocalPoint(position.ToDigitalRune()).ToStandard();
     return FromGlobalToCorrectSpace(velocitySpace, globalResult);
 }
 public Vector3 GetVelocity(Vector3 position, CoordinateSpace positionSpace = CoordinateSpace.Global, CoordinateSpace velocitySpace = CoordinateSpace.Global)
 {
     Vector3 result = positionSpace == CoordinateSpace.Global
                          ? _rigidBody.WrappedRigidBody.GetVelocityOfWorldPoint(position.ToDigitalRune()).ToStandard()
                          : _rigidBody.WrappedRigidBody.GetVelocityOfLocalPoint(position.ToDigitalRune()).ToStandard();
     return velocitySpace == CoordinateSpace.Global
                ?  result
                : _rigidBody.Pose.ToLocalPosition(result);
 }
 public void SetLinearVelocity(Vector3 velocity, CoordinateSpace velocitySpace = CoordinateSpace.Global)
 {
     if (velocitySpace == CoordinateSpace.Local) velocity = _rigidBody.Pose.ToGlobalDirection(velocity);
     _rigidBody.WrappedRigidBody.LinearVelocity = velocity.ToDigitalRune();
 }
 public void ApplyImpulse(Vector3 impulse, Vector3 position, CoordinateSpace impulseSpace = CoordinateSpace.Global, CoordinateSpace positionSpace = CoordinateSpace.Global)
 {
     if (impulseSpace == CoordinateSpace.Local) impulse = _rigidBody.Pose.ToGlobalDirection(impulse);
     if (positionSpace == CoordinateSpace.Local) position = _rigidBody.Pose.ToGlobalPosition(position);
     _rigidBody.WrappedRigidBody.ApplyImpulse(impulse.ToDigitalRune(), position.ToDigitalRune());
 }
 public void ApplyLinearImpulse(Vector3 impulse, CoordinateSpace impulseSpace = CoordinateSpace.Global)
 {
     if (impulseSpace == CoordinateSpace.Local) impulse = _rigidBody.Pose.ToGlobalDirection(impulse);
     _rigidBody.WrappedRigidBody.ApplyLinearImpulse(impulse.ToDigitalRune());
 }
 public void AddTorque(Vector3 torque, CoordinateSpace torqueSpace = CoordinateSpace.Global)
 {
     if (torqueSpace == CoordinateSpace.Local) torque = _rigidBody.Pose.ToGlobalDirection(torque);
     _rigidBody.WrappedRigidBody.AddTorque(torque.ToDigitalRune());
 }
 public void AddForce(Vector3 force, Vector3 position, CoordinateSpace forceSpace = CoordinateSpace.Global, CoordinateSpace positionSpace = CoordinateSpace.Global)
 {
     if (forceSpace == CoordinateSpace.Local) force = _rigidBody.Pose.ToGlobalDirection(force);
     if (positionSpace == CoordinateSpace.Local) position = _rigidBody.Pose.ToGlobalPosition(position);
     _rigidBody.WrappedRigidBody.AddForce(force.ToDigitalRune(),position.ToDigitalRune());
 }
 public void AddForce(Vector3 force, CoordinateSpace forceSpace = CoordinateSpace.Global)
 {
     if (forceSpace == CoordinateSpace.Local) force = _rigidBody.Pose.ToGlobalDirection(force);
     _rigidBody.WrappedRigidBody.AddForce(force.ToDigitalRune());
 }