C# 클래스 Nez.PhysicsShapes.ShapeCollisions

파일 보기 프로젝트 열기: prime31/Nez 1 사용 예제들

공개 메소드들

메소드 설명
boxToBox ( Box first, Box second, CollisionResult &result ) : bool
boxToBoxCast ( Box first, Box second, Vector2 movement, RaycastHit &hit ) : bool

checks the result of a box being moved by deltaMovement with second

circleToBox ( Circle circle, Box box, CollisionResult &result ) : bool

works for circles whos center is in the box as well as just overlapping with the center out of the box.

circleToCircle ( Circle first, Circle second, CollisionResult &result ) : bool
circleToCircleCast ( Circle first, Circle second, Vector2 deltaMovement, RaycastHit &hit ) : bool
circleToPolygon ( Circle circle, Polygon polygon, CollisionResult &result ) : bool
collide ( Shape first, Shape second, Vector2 deltaMovement, RaycastHit &hit ) : bool

swept collision check

lineToCircle ( Vector2 start, Vector2 end, Circle s, RaycastHit &hit ) : bool
lineToLine ( Vector2 a1, Vector2 a2, Vector2 b1, Vector2 b2, Vector2 &intersection ) : bool
lineToPoly ( Vector2 start, Vector2 end, Polygon polygon, RaycastHit &hit ) : bool
pointToBox ( Vector2 point, Box box, CollisionResult &result ) : bool
pointToCircle ( Vector2 point, Circle circle, CollisionResult &result ) : bool
pointToPoly ( Vector2 point, Polygon poly, CollisionResult &result ) : bool
polygonToPolygon ( Polygon first, Polygon second, CollisionResult &result ) : bool

checks for a collision between two Polygons

비공개 메소드들

메소드 설명
circleToPolygon2 ( Circle circle, Polygon polygon, CollisionResult &result ) : bool
closestPointOnLine ( Vector2 lineA, Vector2 lineB, Vector2 closestTo ) : Vector2
findMinimumTranslationDistance ( int iNumAxes, Vector2 &normal, float &timeOfIntersection ) : bool
getInterval ( Polygon polygon, int numVertices, Vector2 axis, float &min, float &max ) : void
getInterval ( Vector2 axis, Polygon polygon, float &min, float &max ) : void
intervalDistance ( float minA, float maxA, float minB, float maxB ) : float
intervalIntersect ( Polygon first, Polygon second, Vector2 &axis, Vector2 &shapeOffset, Vector2 &deltaMovement, float &taxis ) : bool
minkowskiDifference ( Box first, Box second ) : RectangleF
polygonToPolygon ( Polygon first, Polygon second, Vector2 deltaMovement, Vector2 &responseNormal, float &timeOfCollision ) : bool
polygonToPolygonCast ( Polygon first, Polygon second, Vector2 deltaMovement, RaycastHit &hit ) : bool
polygonToPolygonOLD ( Polygon first, Polygon second, CollisionResult &result ) : bool

메소드 상세

boxToBox() 공개 정적인 메소드

public static boxToBox ( Box first, Box second, CollisionResult &result ) : bool
first Box
second Box
result CollisionResult
리턴 bool

boxToBoxCast() 공개 정적인 메소드

checks the result of a box being moved by deltaMovement with second
public static boxToBoxCast ( Box first, Box second, Vector2 movement, RaycastHit &hit ) : bool
first Box First.
second Box Second.
movement Microsoft.Xna.Framework.Vector2
hit RaycastHit Hit.
리턴 bool

circleToBox() 공개 정적인 메소드

works for circles whos center is in the box as well as just overlapping with the center out of the box.
public static circleToBox ( Circle circle, Box box, CollisionResult &result ) : bool
circle Circle First.
box Box Second.
result CollisionResult Result.
리턴 bool

circleToCircle() 공개 정적인 메소드

public static circleToCircle ( Circle first, Circle second, CollisionResult &result ) : bool
first Circle
second Circle
result CollisionResult
리턴 bool

circleToCircleCast() 공개 정적인 메소드

public static circleToCircleCast ( Circle first, Circle second, Vector2 deltaMovement, RaycastHit &hit ) : bool
first Circle
second Circle
deltaMovement Microsoft.Xna.Framework.Vector2
hit RaycastHit
리턴 bool

circleToPolygon() 공개 정적인 메소드

public static circleToPolygon ( Circle circle, Polygon polygon, CollisionResult &result ) : bool
circle Circle
polygon Polygon
result CollisionResult
리턴 bool

collide() 공개 정적인 메소드

swept collision check
public static collide ( Shape first, Shape second, Vector2 deltaMovement, RaycastHit &hit ) : bool
first Shape First.
second Shape Second.
deltaMovement Microsoft.Xna.Framework.Vector2 Delta movement.
hit RaycastHit Hit.
리턴 bool

lineToCircle() 공개 정적인 메소드

public static lineToCircle ( Vector2 start, Vector2 end, Circle s, RaycastHit &hit ) : bool
start Microsoft.Xna.Framework.Vector2
end Microsoft.Xna.Framework.Vector2
s Circle
hit RaycastHit
리턴 bool

lineToLine() 공개 정적인 메소드

public static lineToLine ( Vector2 a1, Vector2 a2, Vector2 b1, Vector2 b2, Vector2 &intersection ) : bool
a1 Microsoft.Xna.Framework.Vector2
a2 Microsoft.Xna.Framework.Vector2
b1 Microsoft.Xna.Framework.Vector2
b2 Microsoft.Xna.Framework.Vector2
intersection Microsoft.Xna.Framework.Vector2
리턴 bool

lineToPoly() 공개 정적인 메소드

public static lineToPoly ( Vector2 start, Vector2 end, Polygon polygon, RaycastHit &hit ) : bool
start Microsoft.Xna.Framework.Vector2
end Microsoft.Xna.Framework.Vector2
polygon Polygon
hit RaycastHit
리턴 bool

pointToBox() 공개 정적인 메소드

public static pointToBox ( Vector2 point, Box box, CollisionResult &result ) : bool
point Microsoft.Xna.Framework.Vector2
box Box
result CollisionResult
리턴 bool

pointToCircle() 공개 정적인 메소드

public static pointToCircle ( Vector2 point, Circle circle, CollisionResult &result ) : bool
point Microsoft.Xna.Framework.Vector2
circle Circle
result CollisionResult
리턴 bool

pointToPoly() 공개 정적인 메소드

public static pointToPoly ( Vector2 point, Polygon poly, CollisionResult &result ) : bool
point Microsoft.Xna.Framework.Vector2
poly Polygon
result CollisionResult
리턴 bool

polygonToPolygon() 공개 정적인 메소드

checks for a collision between two Polygons
public static polygonToPolygon ( Polygon first, Polygon second, CollisionResult &result ) : bool
first Polygon Polygon a.
second Polygon Polygon b.
result CollisionResult
리턴 bool