Example #1
0
        public static float GetDistance(pVector a, pVector b)
        {
            float num1 = a.X - b.X;
            float num2 = a.Y - b.Y;
            float num3 = a.Z - b.Z;

            return((float)Math.Sqrt(num1 * num1 + num2 * num2 + num3 * num3));
        }
Example #2
0
        /// <summary>
        /// Converts an string to a pVector
        /// </summary>
        /// <param name="text">example: "X,Y,Z"</param>
        /// <returns>A new pVector</returns>
        public static pVector StringToPVector(string text)
        {
            pVector output = Zero();

            string[] values = text.Split(',');

            float.TryParse(values[0], out output.X);
            float.TryParse(values[1], out output.Y);
            float.TryParse(values[2], out output.Z);

            return(output);
        }
Example #3
0
 public void UpdateEuler(pVector euler)
 {
     Base.EulerAngle = euler;
 }
Example #4
0
 public void UpdatePosition(pVector pos)
 {
     Base.Position = pos;
 }
Example #5
0
 internal void UpdateEuler(pVector euler)
 {
     m_Euler = euler;
     OnEulerUpdated?.Invoke(euler);
 }
Example #6
0
 internal void UpdatePosition(pVector pos)
 {
     m_Position = pos;
     OnPositionUpdated?.Invoke(pos);
 }
Example #7
0
 public User()
 {
     m_Position = pVector.Zero();
     m_Euler    = pVector.Zero();
 }
Example #8
0
 public bool Equals(pVector obj)
 {
     return(obj.X.Equals(X) && obj.Y.Equals(Y) && obj.Z.Equals(Z));
 }