Esempio n. 1
0
        public StraightLine2 Reflect(StraightLine2 line)
        {
            if (!this.valid)
            {
                return(line);
            }

            return(new StraightLine2(Reflect(line.BasicPoint), RelativelyReflect(line.Direction)));
        }
Esempio n. 2
0
        public Angle MinimalAngleWith(StraightLine2 line)
        {
            if (!this.valid)
            {
                return(Angle.ZERO);
            }

            return(line.MinimalAngleWith(this.direction));
        }
Esempio n. 3
0
        public Angle MaximalAngleWith(StraightLine2 line)
        {
            if (!this.valid || !line.valid)
            {
                return(Angle.ZERO);
            }

            return(this.direction.MaximalAngleWithAxis(line.direction));
        }
Esempio n. 4
0
 public static StraightLine2 Reflect(StraightLine2 line)
 {
     return(new StraightLine2(Reflect(line.BasicPoint), Reflect(line.Direction)));
 }
Esempio n. 5
0
 public StraightLine2(StraightLine2 line)
 {
     this.BasicPoint = line.BasicPoint;
     this.direction  = line.direction;
     this.valid      = line.valid;
 }
Esempio n. 6
0
        // ========================================================

        public bool IsEqualTo(StraightLine2 line)
        {
            return(this.IsParallelTo(line) && this.direction.IsParallelTo(line.BasicPoint - this.BasicPoint));
        }
Esempio n. 7
0
 public bool IsOrthogonalTo(StraightLine2 line)
 {
     return(this.valid && line.valid && this.direction.IsOrthogonalTo(line.direction));
 }
Esempio n. 8
0
 public bool IsParallelTo(StraightLine2 line)
 {
     return(this.valid && line.valid && this.direction.IsParallelTo(line.direction));
 }
Esempio n. 9
0
 public bool IsParallelTo(StraightLine2 line)
 {
     return(line.IsValid && line.Direction.IsParallelTo(B - A));
 }
Esempio n. 10
0
 public Angle MaximalAngleWith(StraightLine2 line)
 {
     return(line.MaximalAngleWith(this.VectorAB));
 }
Esempio n. 11
0
 public bool IsOrthogonalTo(StraightLine2 line)
 {
     return(line.IsValid && line.Direction.IsOrthogonalTo(B - A));
 }