C# Class Nez.PhysicsShapes.Circle

Inheritance: Shape
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Свойство Type Description
radius float

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

Circle() public méthode

public Circle ( float radius ) : System
radius float
Résultat System

collidesWithLine() public méthode

public collidesWithLine ( Vector2 start, Vector2 end, RaycastHit &hit ) : bool
start Vector2
end Vector2
hit RaycastHit
Résultat bool

collidesWithShape() public méthode

public collidesWithShape ( Shape other, CollisionResult &result ) : bool
other Shape
result CollisionResult
Résultat bool

containsPoint() public méthode

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

containsPoint() public méthode

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.
Résultat bool

getPointAlongEdge() public méthode

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

overlaps() public méthode

public overlaps ( Shape other ) : bool
other Shape
Résultat bool

pointCollidesWithShape() public méthode

public pointCollidesWithShape ( Vector2 point, CollisionResult &result ) : bool
point Vector2
result CollisionResult
Résultat bool

Property Details

radius public_oe property

public float radius
Résultat float