C# Class Pathfinding.Polygon

Mostrar archivo Open project: henryj41043/TheUnseen Class Usage Examples

Public Properties

Property Type Description
hullCache List

Public Methods

Method Description
ClosestPointOnTriangle ( Vector3 triangle, Vector3 point ) : Vector3
ClosestPointOnTriangle ( Vector3 tr0, Vector3 tr1, Vector3 tr2, Vector3 point ) : Vector3
ContainsPoint ( Int2 a, Int2 b, Int2 c, Int2 p ) : bool
ContainsPoint ( Int3 a, Int3 b, Int3 c, Int3 p ) : bool
ContainsPoint ( Vector2 polyPoints, Vector2 p ) : bool
ContainsPoint ( Vector3 polyPoints, Vector3 p ) : bool
ContainsPoint ( Vector3 a, Vector3 b, Vector3 c, Vector3 p ) : bool
ConvexHull ( Vector3 points ) : Vector3[]
DistanceSegmentSegment3D ( Vector3 s1, Vector3 e1, Vector3 s2, Vector3 e2 ) : float
IntersectionFactor ( Int3 start1, Int3 end1, Int3 start2, Int3 end2, float &factor1, float &factor2 ) : bool
IntersectionFactor ( Vector3 start1, Vector3 end1, Vector3 start2, Vector3 end2, float &factor1, float &factor2 ) : bool
IntersectionFactor ( Vector3 start1, Vector3 end1, Vector3 start2, Vector3 end2 ) : float
IntersectionFactorRay ( Int3 start1, Int3 end1, Int3 start2, Int3 end2 ) : float
IntersectionFactorRaySegment ( Int3 start1, Int3 end1, Int3 start2, Int3 end2 ) : bool
IntersectionPoint ( Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2 ) : Vector2
IntersectionPoint ( Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2, bool &intersects ) : Vector2
IntersectionPoint ( Vector3 start1, Vector3 end1, Vector3 start2, Vector3 end2 ) : Vector3
IntersectionPoint ( Vector3 start1, Vector3 end1, Vector3 start2, Vector3 end2, bool &intersects ) : Vector3
IntersectionPointOptimized ( Vector3 start1, Vector3 dir1, Vector3 start2, Vector3 dir2 ) : Vector3
IntersectionPointOptimized ( Vector3 start1, Vector3 dir1, Vector3 start2, Vector3 dir2, bool &intersects ) : Vector3
Intersects ( Int2 a, Int2 b, Int2 a2, Int2 b2 ) : bool
Intersects ( Int3 a, Int3 b, Int3 a2, Int3 b2 ) : bool
Intersects ( Vector3 start1, Vector3 end1, Vector3 start2, Vector3 end2 ) : bool
IntersectsUnclamped ( Vector3 a, Vector3 b, Vector3 a2, Vector3 b2 ) : bool
IsClockwise ( Int3 a, Int3 b, Int3 c ) : bool
IsClockwise ( Vector3 a, Vector3 b, Vector3 c ) : bool
IsClockwiseMargin ( Int2 a, Int2 b, Int2 c ) : bool
IsClockwiseMargin ( Int3 a, Int3 b, Int3 c ) : bool
IsClockwiseMargin ( Vector3 a, Vector3 b, Vector3 c ) : bool
IsColinear ( Int3 a, Int3 b, Int3 c ) : bool
IsColinear ( Vector3 a, Vector3 b, Vector3 c ) : bool
IsColinearAlmost ( Int3 a, Int3 b, Int3 c ) : bool
Left ( Int2 a, Int2 b, Int2 c ) : bool
Left ( Int3 a, Int3 b, Int3 c ) : bool
Left ( Vector3 a, Vector3 b, Vector3 p ) : bool
LeftNotColinear ( Int3 a, Int3 b, Int3 c ) : bool
LeftNotColinear ( Vector3 a, Vector3 b, Vector3 p ) : bool
LineIntersectsBounds ( Bounds bounds, Vector3 a, Vector3 b ) : bool
SegmentIntersectionPoint ( Vector3 start1, Vector3 end1, Vector3 start2, Vector3 end2, bool &intersects ) : Vector3
Subdivide ( Vector3 path, int subdivisions ) : Vector3[]
TriangleArea ( Vector3 a, Vector3 b, Vector3 c ) : float
TriangleArea ( Int3 a, Int3 b, Int3 c ) : long
TriangleArea2 ( Vector3 a, Vector3 b, Vector3 c ) : float
TriangleArea2 ( Int3 a, Int3 b, Int3 c ) : long

Method Details

ClosestPointOnTriangle() public static method

public static ClosestPointOnTriangle ( Vector3 triangle, Vector3 point ) : Vector3
triangle Vector3
point Vector3
return Vector3

ClosestPointOnTriangle() public static method

public static ClosestPointOnTriangle ( Vector3 tr0, Vector3 tr1, Vector3 tr2, Vector3 point ) : Vector3
tr0 Vector3
tr1 Vector3
tr2 Vector3
point Vector3
return Vector3

ContainsPoint() public static method

public static ContainsPoint ( Int2 a, Int2 b, Int2 c, Int2 p ) : bool
a Int2
b Int2
c Int2
p Int2
return bool

ContainsPoint() public static method

public static ContainsPoint ( Int3 a, Int3 b, Int3 c, Int3 p ) : bool
a Int3
b Int3
c Int3
p Int3
return bool

ContainsPoint() public static method

public static ContainsPoint ( Vector2 polyPoints, Vector2 p ) : bool
polyPoints Vector2
p Vector2
return bool

ContainsPoint() public static method

public static ContainsPoint ( Vector3 polyPoints, Vector3 p ) : bool
polyPoints Vector3
p Vector3
return bool

ContainsPoint() public static method

public static ContainsPoint ( Vector3 a, Vector3 b, Vector3 c, Vector3 p ) : bool
a Vector3
b Vector3
c Vector3
p Vector3
return bool

ConvexHull() public static method

public static ConvexHull ( Vector3 points ) : Vector3[]
points Vector3
return Vector3[]

DistanceSegmentSegment3D() public static method

public static DistanceSegmentSegment3D ( Vector3 s1, Vector3 e1, Vector3 s2, Vector3 e2 ) : float
s1 Vector3
e1 Vector3
s2 Vector3
e2 Vector3
return float

IntersectionFactor() public static method

public static IntersectionFactor ( Int3 start1, Int3 end1, Int3 start2, Int3 end2, float &factor1, float &factor2 ) : bool
start1 Int3
end1 Int3
start2 Int3
end2 Int3
factor1 float
factor2 float
return bool

IntersectionFactor() public static method

public static IntersectionFactor ( Vector3 start1, Vector3 end1, Vector3 start2, Vector3 end2, float &factor1, float &factor2 ) : bool
start1 Vector3
end1 Vector3
start2 Vector3
end2 Vector3
factor1 float
factor2 float
return bool

IntersectionFactor() public static method

public static IntersectionFactor ( Vector3 start1, Vector3 end1, Vector3 start2, Vector3 end2 ) : float
start1 Vector3
end1 Vector3
start2 Vector3
end2 Vector3
return float

IntersectionFactorRay() public static method

public static IntersectionFactorRay ( Int3 start1, Int3 end1, Int3 start2, Int3 end2 ) : float
start1 Int3
end1 Int3
start2 Int3
end2 Int3
return float

IntersectionFactorRaySegment() public static method

public static IntersectionFactorRaySegment ( Int3 start1, Int3 end1, Int3 start2, Int3 end2 ) : bool
start1 Int3
end1 Int3
start2 Int3
end2 Int3
return bool

IntersectionPoint() public static method

public static IntersectionPoint ( Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2 ) : Vector2
start1 Vector2
end1 Vector2
start2 Vector2
end2 Vector2
return Vector2

IntersectionPoint() public static method

public static IntersectionPoint ( Vector2 start1, Vector2 end1, Vector2 start2, Vector2 end2, bool &intersects ) : Vector2
start1 Vector2
end1 Vector2
start2 Vector2
end2 Vector2
intersects bool
return Vector2

IntersectionPoint() public static method

public static IntersectionPoint ( Vector3 start1, Vector3 end1, Vector3 start2, Vector3 end2 ) : Vector3
start1 Vector3
end1 Vector3
start2 Vector3
end2 Vector3
return Vector3

IntersectionPoint() public static method

public static IntersectionPoint ( Vector3 start1, Vector3 end1, Vector3 start2, Vector3 end2, bool &intersects ) : Vector3
start1 Vector3
end1 Vector3
start2 Vector3
end2 Vector3
intersects bool
return Vector3

IntersectionPointOptimized() public static method

public static IntersectionPointOptimized ( Vector3 start1, Vector3 dir1, Vector3 start2, Vector3 dir2 ) : Vector3
start1 Vector3
dir1 Vector3
start2 Vector3
dir2 Vector3
return Vector3

IntersectionPointOptimized() public static method

public static IntersectionPointOptimized ( Vector3 start1, Vector3 dir1, Vector3 start2, Vector3 dir2, bool &intersects ) : Vector3
start1 Vector3
dir1 Vector3
start2 Vector3
dir2 Vector3
intersects bool
return Vector3

Intersects() public static method

public static Intersects ( Int2 a, Int2 b, Int2 a2, Int2 b2 ) : bool
a Int2
b Int2
a2 Int2
b2 Int2
return bool

Intersects() public static method

public static Intersects ( Int3 a, Int3 b, Int3 a2, Int3 b2 ) : bool
a Int3
b Int3
a2 Int3
b2 Int3
return bool

Intersects() public static method

public static Intersects ( Vector3 start1, Vector3 end1, Vector3 start2, Vector3 end2 ) : bool
start1 Vector3
end1 Vector3
start2 Vector3
end2 Vector3
return bool

IntersectsUnclamped() public static method

public static IntersectsUnclamped ( Vector3 a, Vector3 b, Vector3 a2, Vector3 b2 ) : bool
a Vector3
b Vector3
a2 Vector3
b2 Vector3
return bool

IsClockwise() public static method

public static IsClockwise ( Int3 a, Int3 b, Int3 c ) : bool
a Int3
b Int3
c Int3
return bool

IsClockwise() public static method

public static IsClockwise ( Vector3 a, Vector3 b, Vector3 c ) : bool
a Vector3
b Vector3
c Vector3
return bool

IsClockwiseMargin() public static method

public static IsClockwiseMargin ( Int2 a, Int2 b, Int2 c ) : bool
a Int2
b Int2
c Int2
return bool

IsClockwiseMargin() public static method

public static IsClockwiseMargin ( Int3 a, Int3 b, Int3 c ) : bool
a Int3
b Int3
c Int3
return bool

IsClockwiseMargin() public static method

public static IsClockwiseMargin ( Vector3 a, Vector3 b, Vector3 c ) : bool
a Vector3
b Vector3
c Vector3
return bool

IsColinear() public static method

public static IsColinear ( Int3 a, Int3 b, Int3 c ) : bool
a Int3
b Int3
c Int3
return bool

IsColinear() public static method

public static IsColinear ( Vector3 a, Vector3 b, Vector3 c ) : bool
a Vector3
b Vector3
c Vector3
return bool

IsColinearAlmost() public static method

public static IsColinearAlmost ( Int3 a, Int3 b, Int3 c ) : bool
a Int3
b Int3
c Int3
return bool

Left() public static method

public static Left ( Int2 a, Int2 b, Int2 c ) : bool
a Int2
b Int2
c Int2
return bool

Left() public static method

public static Left ( Int3 a, Int3 b, Int3 c ) : bool
a Int3
b Int3
c Int3
return bool

Left() public static method

public static Left ( Vector3 a, Vector3 b, Vector3 p ) : bool
a Vector3
b Vector3
p Vector3
return bool

LeftNotColinear() public static method

public static LeftNotColinear ( Int3 a, Int3 b, Int3 c ) : bool
a Int3
b Int3
c Int3
return bool

LeftNotColinear() public static method

public static LeftNotColinear ( Vector3 a, Vector3 b, Vector3 p ) : bool
a Vector3
b Vector3
p Vector3
return bool

LineIntersectsBounds() public static method

public static LineIntersectsBounds ( Bounds bounds, Vector3 a, Vector3 b ) : bool
bounds UnityEngine.Bounds
a Vector3
b Vector3
return bool

SegmentIntersectionPoint() public static method

public static SegmentIntersectionPoint ( Vector3 start1, Vector3 end1, Vector3 start2, Vector3 end2, bool &intersects ) : Vector3
start1 Vector3
end1 Vector3
start2 Vector3
end2 Vector3
intersects bool
return Vector3

Subdivide() public static method

public static Subdivide ( Vector3 path, int subdivisions ) : Vector3[]
path Vector3
subdivisions int
return Vector3[]

TriangleArea() public static method

public static TriangleArea ( Vector3 a, Vector3 b, Vector3 c ) : float
a Vector3
b Vector3
c Vector3
return float

TriangleArea() public static method

public static TriangleArea ( Int3 a, Int3 b, Int3 c ) : long
a Int3
b Int3
c Int3
return long

TriangleArea2() public static method

public static TriangleArea2 ( Vector3 a, Vector3 b, Vector3 c ) : float
a Vector3
b Vector3
c Vector3
return float

TriangleArea2() public static method

public static TriangleArea2 ( Int3 a, Int3 b, Int3 c ) : long
a Int3
b Int3
c Int3
return long

Property Details

hullCache public_oe static_oe property

public static List hullCache
return List