Table of Contents

Class CircleShape

Namespace
Alis.Core.Physic.Collision.Shapes
Assembly
Alis.dll

A circle shape.

public class CircleShape : Shape

Inheritance

Inherited Members

Constructors

CircleShape(float, float)

Create a new circle with the desired radius and density.

public CircleShape(float radius, float density)

Parameters

radius float

The radius of the circle.

density float

The density of the circle.

CircleShape()

Initializes a new instance of the Alis.Core.Physic.Collision.Shapes.CircleShape class

internal CircleShape()

Fields

_position

The position

internal Vector2 _position

Field Value

Vector2

Properties

ChildCount

Gets the value of the child count

public override int ChildCount { get; }

Property Value

int

Position

Get or set the position of the circle

public Vector2 Position { get; set; }

Property Value

Vector2

Methods

Clone()

Clones this instance

public override Shape Clone()

Returns

Shape

The clone

CompareTo(CircleShape)

Compare the circle to another circle

public bool CompareTo(CircleShape shape)

Parameters

shape CircleShape

The other circle

Returns

bool

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

ComputeAABB(out AABB, ref Transform, int)

Computes the aabb using the specified aabb

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

Parameters

aabb AABB

The aabb

transform Transform

The transform

childIndex int

The child index

ComputeProperties()

Computes the properties

protected override sealed void ComputeProperties()

ComputeSubmergedArea(ref Vector2, float, ref Transform, out Vector2)

Computes the submerged area using the specified normal

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

Parameters

normal Vector2

The normal

offset float

The offset

xf Transform

The xf

sc Vector2

The sc

Returns

float

The area

RayCast(out RayCastOutput, ref RayCastInput, ref Transform, int)

Describes whether this instance ray cast

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

Parameters

output RayCastOutput

The output

input RayCastInput

The input

transform Transform

The transform

childIndex int

The child index

Returns

bool

The bool

TestPoint(ref Transform, ref Vector2)

Describes whether this instance test point

public override bool TestPoint(ref Transform transform, ref Vector2 point)

Parameters

transform Transform

The transform

point Vector2

The point

Returns

bool

The bool