Example #1
0
        public Tuple3 Velocity(ReferenceFrame referenceFrame)
        {
            if (ReferenceEquals(referenceFrame, null))
            {
                throw new ArgumentNullException("referenceFrame");
            }
            var part = InternalPart;

            return(referenceFrame.VelocityFromWorldSpace(part.transform.position, part.orbit.GetVel()).ToTuple());
        }
Example #2
0
 public static Tuple3 TransformVelocity (Tuple3 position, Tuple3 velocity, ReferenceFrame from, ReferenceFrame to)
 {
     CheckReferenceFrames (from, to);
     var worldPosition = from.PositionToWorldSpace (position.ToVector ());
     var worldVelocity = from.VelocityToWorldSpace (position.ToVector (), velocity.ToVector ());
     return to.VelocityFromWorldSpace (worldPosition, worldVelocity).ToTuple ();
 }
Example #3
0
 public Tuple3 Velocity(ReferenceFrame referenceFrame)
 {
     return(referenceFrame.VelocityFromWorldSpace(InternalPart.transform.position, InternalPart.orbit.GetVel()).ToTuple());
 }