C# Class TerrainDisplay.Collision.Intersection

Afficher le fichier Open project: WCell/WCell-Terrain

Méthodes publiques

Méthode Description
Barycentric ( System.Vector3 a, System.Vector3 b, System.Vector3 c, System.Vector3 p, System.Vector3 &uvw ) : void
Barycentric2 ( System.Vector3 a, System.Vector3 b, System.Vector3 c, System.Vector3 p, System.Vector2 &uv ) : void
Clamp ( float n, float min, float max ) : float
ClosestPointOnPlane ( System.Vector3 point, Plane plane ) : System.Vector3
ClosestPointOnSegment ( System.Vector3 c, System.Vector3 a, System.Vector3 b, float &t, System.Vector3 &d ) : void
ClosestPtPointAABB ( System.Vector4 p, BoundingBox b, System.Vector3 &q ) : void
ClosestPtPointRect ( System.Vector3 p, System.Vector3 a, System.Vector3 b, System.Vector3 c, System.Vector3 &q ) : void
ClosestPtPointSegment2D ( System.Vector2 c, System.Vector2 a, System.Vector2 b, float &t, System.Vector2 &d ) : void
ClosestPtPointTriangle ( System.Vector3 p, System.Vector3 a, System.Vector3 b, System.Vector3 c ) : System.Vector3
ClosestPtPointTriangleNew ( System.Vector3 p, System.Vector3 a, System.Vector3 b, System.Vector3 c ) : System.Vector3
Corner ( BoundingBox b, int n ) : System.Vector3
DistPointPlane ( System.Vector3 q, Plane p ) : float
IntersectMovingSpherePlane ( BoundingSphere s, System.Vector3 v, Plane p, float &t, System.Vector3 &q ) : bool
IntersectPlanes ( Plane p1, Plane p2, Plane p3, System.Vector3 &p ) : bool
IntersectPlanes ( Plane p1, Plane p2, System.Vector3 &p, System.Vector3 &d ) : bool
IntersectRaySphere ( System.Vector3 p, System.Vector3 d, BoundingSphere s, float &t, System.Vector3 &q ) : bool
IntersectSegmentCylinder ( System.Vector3 sa, System.Vector3 sb, System.Vector3 p, System.Vector3 q, float r, float &t ) : bool
IntersectSegmentPlane ( System.Vector3 a, System.Vector3 b, Plane p, float &t, System.Vector3 &q ) : bool
IntersectSegmentPolyhedron ( System.Vector3 a, System.Vector3 b, Plane p, int n, float &tfirst, float &tlast ) : bool
IntersectSegmentRectangle2D ( System.Vector2 rectMin, System.Vector2 rectMax, System.Vector2 point1, System.Vector2 point2 ) : bool
IntersectSegmentRectangle2DXY ( WCell.Util.Graphics.Rect rect, System.Vector3 point1, System.Vector3 point2 ) : bool
IntersectSegmentTriangle ( System.Vector3 p, System.Vector3 q, System.Vector3 a, System.Vector3 b, System.Vector3 c, float &u, float &v, float &w, float &t ) : bool
IntersectionOfTwoLines ( System.Vector3 a, System.Vector3 b, System.Vector3 c, System.Vector3 d, System.Vector3 &result ) : bool
IsConvexQuad ( System.Vector3 a, System.Vector3 b, System.Vector3 c, System.Vector3 d ) : bool
LineSegmentIntersectsPlane ( System.Vector3 v1, System.Vector3 v2, Plane plane, System.Vector3 &pos ) : bool
PointInTriangle ( System.Vector2 &p, System.Vector2 &a, System.Vector2 &b, System.Vector2 &c ) : bool
PointInTriangle ( System.Vector3 p, System.Vector3 a, System.Vector3 b, System.Vector3 c ) : bool
PointInTriangle2D ( System.Vector2 &p, System.Vector2 &a, System.Vector2 &b, System.Vector2 &c ) : bool
PointInTriangle2DXY ( Point p, System.Vector3 a, System.Vector3 b, System.Vector3 c ) : bool
PointInTriangle2DXY ( System.Vector3 p, System.Vector3 a, System.Vector3 b, System.Vector3 c ) : bool

Checks if point P is inside Triangle ABC using only the X and Y coordinates of the Vector3.

PointInTriangleBarycentric ( System.Vector3 a, System.Vector3 b, System.Vector3 c, System.Vector3 p ) : bool
PointInsideEdge ( System.Vector3 &edgeA, System.Vector3 &edgeB, System.Vector3 &point ) : bool
PointInsidePoly ( System.Vector3 &vA, System.Vector3 &vB, System.Vector3 &vC, System.Vector3 &p ) : bool
RayTriangleIntersect ( Ray r, System.Vector3 vert0, System.Vector3 vert1, System.Vector3 vert2, float &distance ) : bool
RayTriangleIntersect ( System.Vector3 ray_origin, System.Vector3 ray_direction, System.Vector3 vert0, System.Vector3 vert1, System.Vector3 vert2, float &t, float &u, float &v ) : bool
Signed2DTriArea ( System.Vector2 a, System.Vector2 b, System.Vector2 c ) : float
SqDistPointAABB ( System.Vector3 p, BoundingBox b ) : float
SqDistPointSegment ( System.Vector3 a, System.Vector3 b, System.Vector3 c ) : float
Test2DSegmentSegment ( System.Vector2 a, System.Vector2 b, System.Vector2 c, System.Vector2 d, float &t, System.Vector2 &p ) : bool
TestMovingSpherePlane ( System.Vector3 a, System.Vector3 b, float r, Plane p ) : bool
TestMovingSphereSphere ( BoundingSphere s0, BoundingSphere s1, System.Vector3 v0, System.Vector3 v1, float &t ) : bool
TestPointPolyhedron ( System.Vector3 p, Plane planes ) : bool
TestRaySphere ( System.Vector3 p, System.Vector3 d, BoundingSphere s ) : bool
TriArea2D ( System.Vector2 p1, System.Vector2 p2, System.Vector2 p3 ) : float
TriArea2D ( float x1, float y1, float x2, float y2, float x3, float y3 ) : float
Vector3FarthestFromEdge ( System.Vector2 a, System.Vector2 b, System.Vector2 p, int n ) : int

Method Details

Barycentric() public static méthode

public static Barycentric ( System.Vector3 a, System.Vector3 b, System.Vector3 c, System.Vector3 p, System.Vector3 &uvw ) : void
a System.Vector3
b System.Vector3
c System.Vector3
p System.Vector3
uvw System.Vector3
Résultat void

Barycentric2() public static méthode

public static Barycentric2 ( System.Vector3 a, System.Vector3 b, System.Vector3 c, System.Vector3 p, System.Vector2 &uv ) : void
a System.Vector3
b System.Vector3
c System.Vector3
p System.Vector3
uv System.Vector2
Résultat void

Clamp() public static méthode

public static Clamp ( float n, float min, float max ) : float
n float
min float
max float
Résultat float

ClosestPointOnPlane() public static méthode

public static ClosestPointOnPlane ( System.Vector3 point, Plane plane ) : System.Vector3
point System.Vector3
plane Plane
Résultat System.Vector3

ClosestPointOnSegment() public static méthode

public static ClosestPointOnSegment ( System.Vector3 c, System.Vector3 a, System.Vector3 b, float &t, System.Vector3 &d ) : void
c System.Vector3
a System.Vector3
b System.Vector3
t float
d System.Vector3
Résultat void

ClosestPtPointAABB() public static méthode

public static ClosestPtPointAABB ( System.Vector4 p, BoundingBox b, System.Vector3 &q ) : void
p System.Vector4
b BoundingBox
q System.Vector3
Résultat void

ClosestPtPointRect() public static méthode

public static ClosestPtPointRect ( System.Vector3 p, System.Vector3 a, System.Vector3 b, System.Vector3 c, System.Vector3 &q ) : void
p System.Vector3
a System.Vector3
b System.Vector3
c System.Vector3
q System.Vector3
Résultat void

ClosestPtPointSegment2D() public static méthode

public static ClosestPtPointSegment2D ( System.Vector2 c, System.Vector2 a, System.Vector2 b, float &t, System.Vector2 &d ) : void
c System.Vector2
a System.Vector2
b System.Vector2
t float
d System.Vector2
Résultat void

ClosestPtPointTriangle() public static méthode

public static ClosestPtPointTriangle ( System.Vector3 p, System.Vector3 a, System.Vector3 b, System.Vector3 c ) : System.Vector3
p System.Vector3
a System.Vector3
b System.Vector3
c System.Vector3
Résultat System.Vector3

ClosestPtPointTriangleNew() public static méthode

public static ClosestPtPointTriangleNew ( System.Vector3 p, System.Vector3 a, System.Vector3 b, System.Vector3 c ) : System.Vector3
p System.Vector3
a System.Vector3
b System.Vector3
c System.Vector3
Résultat System.Vector3

Corner() public static méthode

public static Corner ( BoundingBox b, int n ) : System.Vector3
b BoundingBox
n int
Résultat System.Vector3

DistPointPlane() public static méthode

public static DistPointPlane ( System.Vector3 q, Plane p ) : float
q System.Vector3
p Plane
Résultat float

IntersectMovingSpherePlane() public static méthode

public static IntersectMovingSpherePlane ( BoundingSphere s, System.Vector3 v, Plane p, float &t, System.Vector3 &q ) : bool
s BoundingSphere
v System.Vector3
p Plane
t float
q System.Vector3
Résultat bool

IntersectPlanes() public static méthode

public static IntersectPlanes ( Plane p1, Plane p2, Plane p3, System.Vector3 &p ) : bool
p1 Plane
p2 Plane
p3 Plane
p System.Vector3
Résultat bool

IntersectPlanes() public static méthode

public static IntersectPlanes ( Plane p1, Plane p2, System.Vector3 &p, System.Vector3 &d ) : bool
p1 Plane
p2 Plane
p System.Vector3
d System.Vector3
Résultat bool

IntersectRaySphere() public static méthode

public static IntersectRaySphere ( System.Vector3 p, System.Vector3 d, BoundingSphere s, float &t, System.Vector3 &q ) : bool
p System.Vector3
d System.Vector3
s BoundingSphere
t float
q System.Vector3
Résultat bool

IntersectSegmentCylinder() public static méthode

public static IntersectSegmentCylinder ( System.Vector3 sa, System.Vector3 sb, System.Vector3 p, System.Vector3 q, float r, float &t ) : bool
sa System.Vector3
sb System.Vector3
p System.Vector3
q System.Vector3
r float
t float
Résultat bool

IntersectSegmentPlane() public static méthode

public static IntersectSegmentPlane ( System.Vector3 a, System.Vector3 b, Plane p, float &t, System.Vector3 &q ) : bool
a System.Vector3
b System.Vector3
p Plane
t float
q System.Vector3
Résultat bool

IntersectSegmentPolyhedron() public static méthode

public static IntersectSegmentPolyhedron ( System.Vector3 a, System.Vector3 b, Plane p, int n, float &tfirst, float &tlast ) : bool
a System.Vector3
b System.Vector3
p Plane
n int
tfirst float
tlast float
Résultat bool

IntersectSegmentRectangle2D() public static méthode

public static IntersectSegmentRectangle2D ( System.Vector2 rectMin, System.Vector2 rectMax, System.Vector2 point1, System.Vector2 point2 ) : bool
rectMin System.Vector2
rectMax System.Vector2
point1 System.Vector2
point2 System.Vector2
Résultat bool

IntersectSegmentRectangle2DXY() public static méthode

public static IntersectSegmentRectangle2DXY ( WCell.Util.Graphics.Rect rect, System.Vector3 point1, System.Vector3 point2 ) : bool
rect WCell.Util.Graphics.Rect
point1 System.Vector3
point2 System.Vector3
Résultat bool

IntersectSegmentTriangle() public static méthode

public static IntersectSegmentTriangle ( System.Vector3 p, System.Vector3 q, System.Vector3 a, System.Vector3 b, System.Vector3 c, float &u, float &v, float &w, float &t ) : bool
p System.Vector3
q System.Vector3
a System.Vector3
b System.Vector3
c System.Vector3
u float
v float
w float
t float
Résultat bool

IntersectionOfTwoLines() public static méthode

public static IntersectionOfTwoLines ( System.Vector3 a, System.Vector3 b, System.Vector3 c, System.Vector3 d, System.Vector3 &result ) : bool
a System.Vector3
b System.Vector3
c System.Vector3
d System.Vector3
result System.Vector3
Résultat bool

IsConvexQuad() public static méthode

public static IsConvexQuad ( System.Vector3 a, System.Vector3 b, System.Vector3 c, System.Vector3 d ) : bool
a System.Vector3
b System.Vector3
c System.Vector3
d System.Vector3
Résultat bool

LineSegmentIntersectsPlane() public static méthode

public static LineSegmentIntersectsPlane ( System.Vector3 v1, System.Vector3 v2, Plane plane, System.Vector3 &pos ) : bool
v1 System.Vector3
v2 System.Vector3
plane Plane
pos System.Vector3
Résultat bool

PointInTriangle() public static méthode

public static PointInTriangle ( System.Vector2 &p, System.Vector2 &a, System.Vector2 &b, System.Vector2 &c ) : bool
p System.Vector2
a System.Vector2
b System.Vector2
c System.Vector2
Résultat bool

PointInTriangle() public static méthode

public static PointInTriangle ( System.Vector3 p, System.Vector3 a, System.Vector3 b, System.Vector3 c ) : bool
p System.Vector3
a System.Vector3
b System.Vector3
c System.Vector3
Résultat bool

PointInTriangle2D() public static méthode

public static PointInTriangle2D ( System.Vector2 &p, System.Vector2 &a, System.Vector2 &b, System.Vector2 &c ) : bool
p System.Vector2
a System.Vector2
b System.Vector2
c System.Vector2
Résultat bool

PointInTriangle2DXY() public static méthode

public static PointInTriangle2DXY ( Point p, System.Vector3 a, System.Vector3 b, System.Vector3 c ) : bool
p Point
a System.Vector3
b System.Vector3
c System.Vector3
Résultat bool

PointInTriangle2DXY() public static méthode

Checks if point P is inside Triangle ABC using only the X and Y coordinates of the Vector3.
public static PointInTriangle2DXY ( System.Vector3 p, System.Vector3 a, System.Vector3 b, System.Vector3 c ) : bool
p System.Vector3
a System.Vector3
b System.Vector3
c System.Vector3
Résultat bool

PointInTriangleBarycentric() public static méthode

public static PointInTriangleBarycentric ( System.Vector3 a, System.Vector3 b, System.Vector3 c, System.Vector3 p ) : bool
a System.Vector3
b System.Vector3
c System.Vector3
p System.Vector3
Résultat bool

PointInsideEdge() public static méthode

public static PointInsideEdge ( System.Vector3 &edgeA, System.Vector3 &edgeB, System.Vector3 &point ) : bool
edgeA System.Vector3
edgeB System.Vector3
point System.Vector3
Résultat bool

PointInsidePoly() public static méthode

public static PointInsidePoly ( System.Vector3 &vA, System.Vector3 &vB, System.Vector3 &vC, System.Vector3 &p ) : bool
vA System.Vector3
vB System.Vector3
vC System.Vector3
p System.Vector3
Résultat bool

RayTriangleIntersect() public static méthode

public static RayTriangleIntersect ( Ray r, System.Vector3 vert0, System.Vector3 vert1, System.Vector3 vert2, float &distance ) : bool
r Ray
vert0 System.Vector3
vert1 System.Vector3
vert2 System.Vector3
distance float
Résultat bool

RayTriangleIntersect() public static méthode

public static RayTriangleIntersect ( System.Vector3 ray_origin, System.Vector3 ray_direction, System.Vector3 vert0, System.Vector3 vert1, System.Vector3 vert2, float &t, float &u, float &v ) : bool
ray_origin System.Vector3
ray_direction System.Vector3
vert0 System.Vector3
vert1 System.Vector3
vert2 System.Vector3
t float
u float
v float
Résultat bool

Signed2DTriArea() public static méthode

public static Signed2DTriArea ( System.Vector2 a, System.Vector2 b, System.Vector2 c ) : float
a System.Vector2
b System.Vector2
c System.Vector2
Résultat float

SqDistPointAABB() public static méthode

public static SqDistPointAABB ( System.Vector3 p, BoundingBox b ) : float
p System.Vector3
b BoundingBox
Résultat float

SqDistPointSegment() public static méthode

public static SqDistPointSegment ( System.Vector3 a, System.Vector3 b, System.Vector3 c ) : float
a System.Vector3
b System.Vector3
c System.Vector3
Résultat float

Test2DSegmentSegment() public static méthode

public static Test2DSegmentSegment ( System.Vector2 a, System.Vector2 b, System.Vector2 c, System.Vector2 d, float &t, System.Vector2 &p ) : bool
a System.Vector2
b System.Vector2
c System.Vector2
d System.Vector2
t float
p System.Vector2
Résultat bool

TestMovingSpherePlane() public static méthode

public static TestMovingSpherePlane ( System.Vector3 a, System.Vector3 b, float r, Plane p ) : bool
a System.Vector3
b System.Vector3
r float
p Plane
Résultat bool

TestMovingSphereSphere() public static méthode

public static TestMovingSphereSphere ( BoundingSphere s0, BoundingSphere s1, System.Vector3 v0, System.Vector3 v1, float &t ) : bool
s0 BoundingSphere
s1 BoundingSphere
v0 System.Vector3
v1 System.Vector3
t float
Résultat bool

TestPointPolyhedron() public static méthode

public static TestPointPolyhedron ( System.Vector3 p, Plane planes ) : bool
p System.Vector3
planes Plane
Résultat bool

TestRaySphere() public static méthode

public static TestRaySphere ( System.Vector3 p, System.Vector3 d, BoundingSphere s ) : bool
p System.Vector3
d System.Vector3
s BoundingSphere
Résultat bool

TriArea2D() public static méthode

public static TriArea2D ( System.Vector2 p1, System.Vector2 p2, System.Vector2 p3 ) : float
p1 System.Vector2
p2 System.Vector2
p3 System.Vector2
Résultat float

TriArea2D() public static méthode

public static TriArea2D ( float x1, float y1, float x2, float y2, float x3, float y3 ) : float
x1 float
y1 float
x2 float
y2 float
x3 float
y3 float
Résultat float

Vector3FarthestFromEdge() public static méthode

public static Vector3FarthestFromEdge ( System.Vector2 a, System.Vector2 b, System.Vector2 p, int n ) : int
a System.Vector2
b System.Vector2
p System.Vector2
n int
Résultat int