C# Класс Nez.PhysicsShapes.Circle

Наследование: Shape
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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