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
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
Properties
ChildCount
Gets the value of the child count
public override int ChildCount { get; }
Property Value
Position
Get or set the position of the circle
public Vector2 Position { get; set; }
Property Value
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
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
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
Returns
- bool
-
The bool