Пример #1
0
        public XeroPose RotateRadians(double radians)
        {
            XeroVector vector  = m_vector.RotateRadians(radians);
            double     heading = XeroUtils.BoundRadians(m_heading + radians);

            return(new XeroPose(vector, heading));
        }
Пример #2
0
        public XeroVector Interpolate(XeroVector other, double percent)
        {
            if (percent < 0.0)
            {
                percent = 0.0;
            }
            else if (percent > 1.0)
            {
                percent = 1.0;
            }

            double x = X + (other.X - X) * percent;
            double y = Y + (other.Y - Y) * percent;

            return(new XeroVector(x, y));
        }
Пример #3
0
        public XeroPose Interpolate(XeroPose other, double percent)
        {
            if (percent < 0.0)
            {
                percent = 0.0;
            }
            else if (percent > 1.0)
            {
                percent = 1.0;
            }

            XeroVector v       = m_vector.Interpolate(other.Position, percent);
            double     heading = m_heading + (other.m_heading - m_heading) * percent;

            return(new XeroPose(v, heading));
        }
Пример #4
0
 public static double Distance(XeroVector p1, XeroVector p2)
 {
     return((p1 - p2).Length);
 }
Пример #5
0
 public XeroPose(double x, double y, double heading)
 {
     m_vector  = new XeroVector(x, y);
     m_heading = heading;
 }
Пример #6
0
 public XeroPose(XeroVector v, double heading)
 {
     m_vector  = new XeroVector(v.X, v.Y);
     m_heading = heading;
 }
Пример #7
0
 public XeroPose(XeroVector v)
 {
     m_vector  = new XeroVector(v.X, v.Y);
     m_heading = 0.0;
 }
Пример #8
0
 public XeroPose(double x, double y)
 {
     m_vector  = new XeroVector(x, y);
     m_heading = 0.0;
 }
Пример #9
0
 public XeroPose()
 {
     m_vector  = new XeroVector();
     m_heading = 0.0;
 }
Пример #10
0
 public XeroPose Translate(XeroVector v)
 {
     return(Translate(v.X, v.Y));
 }