Base class for all 2D Shapes.
    public class Shape2D : Resource

Base class for all 2D Shapes. All 2D shape types inherit from this.

Inheritance Chain

Derived Classes

Properties

    public float CustomSolverBias { get; set; }

Methods

    public bool Collide(Transform2D localXform, Shape2D withShape, Transform2D shapeXform)

Return whether this shape is colliding with another.

This method needs the transformation matrix for this shape (localXform), the shape to check collisions with (withShape), and the transformation matrix of that shape (shapeXform).

    public object CollideAndGetContacts(Transform2D localXform, Shape2D withShape, Transform2D shapeXform)

Return a list of the points where this shape touches another. If there are no collisions, the list is empty.

This method needs the transformation matrix for this shape (localXform), the shape to check collisions with (withShape), and the transformation matrix of that shape (shapeXform).

    public bool CollideWithMotion(Transform2D localXform, Vector2 localMotion, Shape2D withShape, Transform2D shapeXform, Vector2 shapeMotion)

Return whether this shape would collide with another, if a given movement was applied.

This method needs the transformation matrix for this shape (localXform), the movement to test on this shape (localMotion), the shape to check collisions with (withShape), the transformation matrix of that shape (shapeXform), and the movement to test onto the other object (shapeMotion).

    public object CollideWithMotionAndGetContacts(Transform2D localXform, Vector2 localMotion, Shape2D withShape, Transform2D shapeXform, Vector2 shapeMotion)

Return a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions, the list is empty.

This method needs the transformation matrix for this shape (localXform), the movement to test on this shape (localMotion), the shape to check collisions with (withShape), the transformation matrix of that shape (shapeXform), and the movement to test onto the other object (shapeMotion).

    public float GetCustomSolverBias()

Getter for CustomSolverBias

    public void SetCustomSolverBias(float bias)

Setter for CustomSolverBias

Tags: