[This is preliminary documentation and is subject to change.]

Provides 2D line and line segment utility methods.

Namespace: org.critterai.geom
Assembly: cai-util (in cai-util.dll) Version: 0.5.0.0 (0.5.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public static class Line2
Public NotInheritable Class Line2
public ref class Line2 abstract sealed

Members

      
 All Members  Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
GetNormalAB(Vector2, Vector2)
Returns the normalized vector that is perpendicular to line AB. (Costly method!)
GetPointLineDistanceSq(Vector2, Vector2, Vector2)
Returns the distance squared from point P to the nearest point on line AB.
GetPointSegmentDistanceSq(Vector2, Vector2, Vector2)
Returns the distance squared from point P to the nearest point on line segment AB.
GetRelationship(Vector2, Vector2, Vector2, Vector2, Vector2%)
Determines the relationship between lines AB and CD.
LinesIntersect(Vector2, Vector2, Vector2, Vector2)
Indicates whether or not line AB intersects line BC.
LinesIntersect(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32)
Indicates whether or not line AB intersects line BC. (Integer version.)

Remarks

Static methods are thread safe.

Inheritance Hierarchy

System..::..Object
  org.critterai.geom..::..Line2

See Also