示例#1
0
 public void Rotate(_Point axis, double angle)
 {
     foreach (Plane plane in Planes)
     {
         for (int i = 0; i < plane.Points.Count; i++)
         {
             _Point p = plane.Points[i];
             //IO.Point(p);
             plane.Points[i] = VectMath.Add(VectMath.RotateByAngle(VectMath.Subtract(p, this.Position), axis, angle), this.Position);
             //IO.Point(plane.Points[i]);
         }
         plane.Position = VectMath.CenterofPoints(plane.Points);
         plane.Normal   = plane.CalculateNormal();
     }
 }
示例#2
0
 public Plane(List <_Point> Points)
 {
     this.Points = Points;
     Position    = VectMath.CenterofPoints(Points);
     Normal      = CalculateNormal();
 }