34using System.Runtime.InteropServices;
38 [StructLayout(LayoutKind.Sequential, Size = Ray.Size)]
39#if !CompactFramework && !WindowsCE && !PocketPC && !XBOX360 && !SILVERLIGHT && !WINDOWS_PHONE && !NETFX_CORE
43 [AdvBrowsableOrder(
"Origin,Direction")]
44 public struct Ray : IEquatable<Ray>
53 [InstanceConstructor(
"Origin,Direction")]
57 this.Direction = direction;
86 if (polygon ==
null) {
throw new ArgumentNullException(
"polygon"); }
94 rect.Intersects(ref
this, out result);
98 line.Intersects(ref
this, out result);
102 line.Intersects(ref
this, out result);
106 circle.Intersects(ref
this, out result);
110 if (polygon ==
null) {
throw new ArgumentNullException(
"polygon"); }
111 polygon.Intersects(ref
this, out result);
128 return Equals(ref
this, ref other);
132 return Equals(ref ray1, ref ray2);
141 return Equals(ref ray1, ref ray2);
145 return !
Equals(ref ray1, ref ray2);
static bool Intersects(Vector2D[] vertexes1, Vector2D[] vertexes2)
Scalar Intersects(Ray ray)
Scalar Intersects(Ray ray)
Scalar Intersects(Ray ray)
static void Intersects(ref Vector2D v1, ref Vector2D v2, ref Vector2D v3, ref Vector2D v4, out bool result)
void Intersects(ref Line line, out Scalar result)
static bool Equals(Ray ray1, Ray ray2)
void Intersects(ref BoundingCircle circle, out Scalar result)
static bool operator!=(Ray ray1, Ray ray2)
Ray(Vector2D origin, Vector2D direction)
Scalar Intersects(LineSegment line)
override bool Equals(object obj)
void Intersects(ref BoundingRectangle rect, out Scalar result)
void Intersects(ref LineSegment line, out Scalar result)
static bool Equals(ref Ray ray1, ref Ray ray2)
void Intersects(ref BoundingPolygon polygon, out Scalar result)
Scalar Intersects(BoundingPolygon polygon)
static bool operator==(Ray ray1, Ray ray2)
Scalar Intersects(BoundingCircle circle)
Scalar Intersects(BoundingRectangle rect)
override string ToString()
override int GetHashCode()
Scalar Intersects(Line line)
This is the Vector Class.
const int Size
The Size of the class in bytes;
override int GetHashCode()
Provides a unique hash code based on the member variables of this class. This should be done because ...
override bool Equals(object obj)
Compares this Vector to another object. This should be done because the equality operators (==,...