Ejemplo n.º 1
0
        public RayLine2 Reflect(RayLine2 line)
        {
            if (!this.valid)
            {
                return(line);
            }

            return(new RayLine2(Reflect(line.StartPoint), RelativelyReflect(line.Direction)));
        }
Ejemplo n.º 2
0
        public Angle MaximalAngleWith(RayLine2 line)
        {
            if (!this.valid || !line.valid)
            {
                return(Angle.ZERO);
            }

            return(this.direction.MaximalAngleWithAxis(line.direction));
        }
Ejemplo n.º 3
0
        public Angle MaximalAngleWith(RayLine2 line)
        {
            if (!this.valid)
            {
                return(Angle.ZERO);
            }

            return(line.MinimalAngleWith(this.direction));
        }
Ejemplo n.º 4
0
 public static RayLine2 Reflect(RayLine2 line)
 {
     return(new RayLine2(Reflect(line.StartPoint), Reflect(line.Direction)));
 }
Ejemplo n.º 5
0
 public bool IsOrthogonalTo(RayLine2 line)
 {
     return(this.valid && line.IsValid && this.direction.IsOrthogonalTo(line.Direction));
 }
Ejemplo n.º 6
0
 public bool IsParallelTo(RayLine2 line)
 {
     return(this.valid && line.IsValid && this.direction.IsParallelTo(line.Direction));
 }
Ejemplo n.º 7
0
 public bool IsCoDirectionalTo(RayLine2 line)
 {
     return(this.valid && line.valid && this.direction.IsCoDirectionalTo(line.direction));
 }
Ejemplo n.º 8
0
 public RayLine2(RayLine2 line)
 {
     this.StartPoint = line.StartPoint;
     this.direction  = line.direction;
     this.valid      = line.valid;
 }
Ejemplo n.º 9
0
 public Angle AngleWith(RayLine2 line)
 {
     return(this.direction.AngleWith(line.direction));
 }
Ejemplo n.º 10
0
        // ========================================================

        public bool IsEqualTo(RayLine2 line)
        {
            return(this.IsCoDirectionalTo(line) && this.StartPoint.IsEqualTo(line.StartPoint));
        }
Ejemplo n.º 11
0
 public bool IsParallelTo(RayLine2 line)
 {
     return(line.IsValid && line.Direction.IsParallelTo(B - A));
 }
Ejemplo n.º 12
0
 public Angle MaximalAngleWith(RayLine2 line)
 {
     return(line.MaximalAngleWith(this.VectorAB));
 }
Ejemplo n.º 13
0
 public bool IsOrthogonalTo(RayLine2 line)
 {
     return(line.IsValid && line.Direction.IsOrthogonalTo(B - A));
 }