Exemplo n.º 1
0
        public void ToLocal()
        {
            Vector3F point0 = new Vector3F(10, 20, -40);
              Vector3F point1 = new Vector3F(-22, 34, 45);
              Line line = new Line(point0, (point1 - point0).Normalized);

              Pose pose = new Pose(new Vector3F(-5, 100, -20), Matrix33F.CreateRotation(new Vector3F(1, 2, 3), 0.123f));
              point0 = pose.ToLocalPosition(point0);
              point1 = pose.ToLocalPosition(point1);
              line.ToLocal(ref pose);

              Vector3F dummy;
              Assert.IsTrue(GeometryHelper.GetClosestPoint(line, point0, out dummy));
              Assert.IsTrue(GeometryHelper.GetClosestPoint(line, point1, out dummy));
        }