Ctrl+K

CircleShape

Declaration

public class tainicom.Aether.Physics2D.Collision.Shapes.CircleShape

A circle shape.

Inherits: tainicom.Aether.Physics2D.Collision.Shapes.Shape

Constructors

CircleShape

Create a new circle with the desired radius and density.

void CircleShape(float radius, float density)

Parameters:

Name Type Description
radius System.Single The radius of the circle.
density System.Single The density of the circle.

Properties

ChildCount override

int ChildCount { get }

Position

Get or set the position of the circle

Vector2 Position { get set }

Methods

TestPoint override

bool TestPoint(ref Transform transform, ref Vector2 point)

Parameters:

Name Type Description
transform ref tainicom.Aether.Physics2D.Common.Transform
point ref Strawberry.Math.Vector2

RayCast override

bool RayCast(out RayCastOutput output, ref RayCastInput input, ref Transform transform, int childIndex)

Parameters:

Name Type Description
output out tainicom.Aether.Physics2D.Collision.RayCastOutput
input ref tainicom.Aether.Physics2D.Collision.RayCastInput
transform ref tainicom.Aether.Physics2D.Common.Transform
childIndex System.Int32

ComputeAABB override

void ComputeAABB(out AABB aabb, ref Transform transform, int childIndex)

Parameters:

Name Type Description
aabb out tainicom.Aether.Physics2D.Collision.AABB
transform ref tainicom.Aether.Physics2D.Common.Transform
childIndex System.Int32

ComputeProperties protected override sealed

void ComputeProperties()

ComputeSubmergedArea override

float ComputeSubmergedArea(ref Vector2 normal, float offset, ref Transform xf, out Vector2 sc)

Parameters:

Name Type Description
normal ref Strawberry.Math.Vector2
offset System.Single
xf ref tainicom.Aether.Physics2D.Common.Transform
sc out Strawberry.Math.Vector2

CompareTo

Compare the circle to another circle

bool CompareTo(CircleShape shape)

Parameters:

Name Type Description
shape tainicom.Aether.Physics2D.Collision.Shapes.CircleShape The other circle

Returns: True if the two circles are the same size and have the same position

Clone override

Shape Clone()