C# 클래스 Nez.PhysicsShapes.Circle

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

공개 프로퍼티들

프로퍼티 타입 설명
radius float

공개 메소드들

메소드 설명
Circle ( float radius ) : System
collidesWithLine ( Vector2 start, Vector2 end, RaycastHit &hit ) : bool
collidesWithShape ( Shape other, CollisionResult &result ) : bool
containsPoint ( Vector2 point ) : bool

Gets whether or not the provided point lie within the bounds of this Circle.

containsPoint ( float x, float y ) : bool

Gets whether or not the provided coordinates lie within the bounds of this Circle.

getPointAlongEdge ( float angle ) : Vector2

Gets the point at the edge of this Circle from the provided angle

overlaps ( Shape other ) : bool
pointCollidesWithShape ( Vector2 point, CollisionResult &result ) : bool

비공개 메소드들

메소드 설명
recalculateBounds ( Collider collider ) : void
recalculateBounds ( float radius, Vector2 position ) : void

internal hack used by Particles so they can reuse a Circle for all collision checks

메소드 상세

Circle() 공개 메소드

public Circle ( float radius ) : System
radius float
리턴 System

collidesWithLine() 공개 메소드

public collidesWithLine ( Vector2 start, Vector2 end, RaycastHit &hit ) : bool
start Vector2
end Vector2
hit RaycastHit
리턴 bool

collidesWithShape() 공개 메소드

public collidesWithShape ( Shape other, CollisionResult &result ) : bool
other Shape
result CollisionResult
리턴 bool

containsPoint() 공개 메소드

Gets whether or not the provided point lie within the bounds of this Circle.
public containsPoint ( Vector2 point ) : bool
point Vector2 the point
리턴 bool

containsPoint() 공개 메소드

Gets whether or not the provided coordinates lie within the bounds of this Circle.
public containsPoint ( float x, float y ) : bool
x float The x coordinate of the point to check for containment.
y float The y coordinate of the point to check for containment.
리턴 bool

getPointAlongEdge() 공개 메소드

Gets the point at the edge of this Circle from the provided angle
public getPointAlongEdge ( float angle ) : Vector2
angle float an angle in radians
리턴 Vector2

overlaps() 공개 메소드

public overlaps ( Shape other ) : bool
other Shape
리턴 bool

pointCollidesWithShape() 공개 메소드

public pointCollidesWithShape ( Vector2 point, CollisionResult &result ) : bool
point Vector2
result CollisionResult
리턴 bool

프로퍼티 상세

radius 공개적으로 프로퍼티

public float radius
리턴 float