C# Class Phosphaze.Framework.Maths.Geometry.LinearUtils

Datei anzeigen Open project: ArtemisEngine/Artemis-Engine

Public Methods

Method Description
IsPointInSegmentRange ( Vector2 point, Vector2 start, Vector2 end ) : bool

Check if a point is in the "range" of a segment. This essentially checks if the point is within the segment's bounding box.

IsPointInSegmentRange ( double px, double py, double x1, double y1, double x2, double y2 ) : bool

Check if a point is in the "range" of a segment. This essentially checks if the point is within the segment's bounding box.

LineIntersectionPoint ( Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2 ) : Vector2?

Calculate the intersection point between two lines (or null if they are parallel).

LineIntersectionPoint ( double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4 ) : Vector2?

Calculate the intersection point between two lines (or null if they are parallel).

LineToSegmentIntersectionPoint ( Vector2 lineStart, Vector2 lineEnd, Vector2 segStart, Vector2 segEnd ) : Vector2?

Calculate the intersection point between a line and a line segment (or null if they do not intersect).

LineToSegmentIntersectionPoint ( double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4 ) : Vector2?

Calculate the intersection point between a line and a line segment (or null if they do not intersect).

PointOnLine ( Vector2 point, Vector2 start, Vector2 end ) : bool

Check if a point lies on a given line.

PointOnLine ( double px, double py, double x1, double y1, double x2, double y2 ) : bool

Check if a point lies on a given line.

PointOnSegment ( Vector2 point, Vector2 start, Vector2 end ) : bool

Check if a point lies on a given line segment.

PointOnSegment ( double px, double py, double x1, double y1, double x2, double y2 ) : bool

Check if a point lies on a given line segment.

SegmentIntersectionPoint ( Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2 ) : Vector2?

Calculate the intersection point between two line segments (or null if they do not intersect).

SegmentIntersectionPoint ( double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4 ) : Vector2?

Calculate the intersection point between two line segments (or null if they do not intersect).

Method Details

IsPointInSegmentRange() public static method

Check if a point is in the "range" of a segment. This essentially checks if the point is within the segment's bounding box.
public static IsPointInSegmentRange ( Vector2 point, Vector2 start, Vector2 end ) : bool
point Microsoft.Xna.Framework.Vector2
start Microsoft.Xna.Framework.Vector2
end Microsoft.Xna.Framework.Vector2
return bool

IsPointInSegmentRange() public static method

Check if a point is in the "range" of a segment. This essentially checks if the point is within the segment's bounding box.
public static IsPointInSegmentRange ( double px, double py, double x1, double y1, double x2, double y2 ) : bool
px double
py double
x1 double
y1 double
x2 double
y2 double
return bool

LineIntersectionPoint() public static method

Calculate the intersection point between two lines (or null if they are parallel).
public static LineIntersectionPoint ( Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2 ) : Vector2?
start1 Microsoft.Xna.Framework.Vector2
end1 Microsoft.Xna.Framework.Vector2
start2 Microsoft.Xna.Framework.Vector2
end2 Microsoft.Xna.Framework.Vector2
return Vector2?

LineIntersectionPoint() public static method

Calculate the intersection point between two lines (or null if they are parallel).
public static LineIntersectionPoint ( double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4 ) : Vector2?
x1 double
y1 double
x2 double
y2 double
x3 double
y3 double
x4 double
y4 double
return Vector2?

LineToSegmentIntersectionPoint() public static method

Calculate the intersection point between a line and a line segment (or null if they do not intersect).
public static LineToSegmentIntersectionPoint ( Vector2 lineStart, Vector2 lineEnd, Vector2 segStart, Vector2 segEnd ) : Vector2?
lineStart Microsoft.Xna.Framework.Vector2
lineEnd Microsoft.Xna.Framework.Vector2
segStart Microsoft.Xna.Framework.Vector2
segEnd Microsoft.Xna.Framework.Vector2
return Vector2?

LineToSegmentIntersectionPoint() public static method

Calculate the intersection point between a line and a line segment (or null if they do not intersect).
public static LineToSegmentIntersectionPoint ( double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4 ) : Vector2?
x1 double
y1 double
x2 double
y2 double
x3 double
y3 double
x4 double
y4 double
return Vector2?

PointOnLine() public static method

Check if a point lies on a given line.
public static PointOnLine ( Vector2 point, Vector2 start, Vector2 end ) : bool
point Microsoft.Xna.Framework.Vector2
start Microsoft.Xna.Framework.Vector2
end Microsoft.Xna.Framework.Vector2
return bool

PointOnLine() public static method

Check if a point lies on a given line.
public static PointOnLine ( double px, double py, double x1, double y1, double x2, double y2 ) : bool
px double
py double
x1 double
y1 double
x2 double
y2 double
return bool

PointOnSegment() public static method

Check if a point lies on a given line segment.
public static PointOnSegment ( Vector2 point, Vector2 start, Vector2 end ) : bool
point Microsoft.Xna.Framework.Vector2
start Microsoft.Xna.Framework.Vector2
end Microsoft.Xna.Framework.Vector2
return bool

PointOnSegment() public static method

Check if a point lies on a given line segment.
public static PointOnSegment ( double px, double py, double x1, double y1, double x2, double y2 ) : bool
px double
py double
x1 double
y1 double
x2 double
y2 double
return bool

SegmentIntersectionPoint() public static method

Calculate the intersection point between two line segments (or null if they do not intersect).
public static SegmentIntersectionPoint ( Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2 ) : Vector2?
start1 Microsoft.Xna.Framework.Vector2
end1 Microsoft.Xna.Framework.Vector2
start2 Microsoft.Xna.Framework.Vector2
end2 Microsoft.Xna.Framework.Vector2
return Vector2?

SegmentIntersectionPoint() public static method

Calculate the intersection point between two line segments (or null if they do not intersect).
public static SegmentIntersectionPoint ( double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4 ) : Vector2?
x1 double
y1 double
x2 double
y2 double
x3 double
y3 double
x4 double
y4 double
return Vector2?