SF Tool Documentation
Search Results for

    Show / Hide Table of Contents

    Struct RectangleGeometry

    The geometry of a closed rectangle. When this is used in the low level phyiscs 2D API calls it is converted to a polygon geometry This allows it to use the same exact API already built in. See LowLevelPhysics2D.PhysicsBody.CreateShape.

    Namespace: SF.PhysicsLowLevel
    Assembly: cs.temp.dll.dll
    Syntax
    public struct RectangleGeometry

    Constructors

    RectangleGeometry(Vector2, Single, Boolean)

    Declaration
    public RectangleGeometry(Vector2 size, float cornerRadius = 0.5F, bool inscribeRadius = false)
    Parameters
    Type Name Description
    Vector2 size
    System.Single cornerRadius
    System.Boolean inscribeRadius

    Fields

    Centroid

    Declaration
    public Vector2 Centroid
    Field Value
    Type Description
    Vector2

    CornerRadius

    The radius of the SFRectangleShape box corner radius.

    Declaration
    public float CornerRadius
    Field Value
    Type Description
    System.Single

    DefaultGeometry

    Get the default Rectangle.

    Declaration
    public static readonly RectangleGeometry DefaultGeometry
    Field Value
    Type Description
    RectangleGeometry

    InscribeRadius

    When creating the physics shape should the corner radius be inscribed during the method call.

    Declaration
    public bool InscribeRadius
    Field Value
    Type Description
    System.Boolean

    Normals

    The geometry normal stored in a LowLevelPhysics2D.PhysicsShape.ShapeArray.

    Declaration
    public PhysicsShape.ShapeArray Normals
    Field Value
    Type Description
    PhysicsShape.ShapeArray

    Polygon

    The backing that supports the RectangleGeometry.

    Declaration
    public PolygonGeometry Polygon
    Field Value
    Type Description
    PolygonGeometry

    Size

    Declaration
    public Vector2 Size
    Field Value
    Type Description
    Vector2

    Vertices

    The geometry vertices stored in a LowLevelPhysics2D.PhysicsShape.ShapeArray.

    Declaration
    public PhysicsShape.ShapeArray Vertices
    Field Value
    Type Description
    PhysicsShape.ShapeArray

    Properties

    IsValid

    Declaration
    public readonly bool IsValid { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    Deconstruct(out Vector2, out Single)

    Deconstructs the properties of the RectangleGeometry and passes them out of the method call.

    Declaration
    public void Deconstruct(out Vector2 size, out float cornerRadius)
    Parameters
    Type Name Description
    Vector2 size
    System.Single cornerRadius

    Operators

    Implicit(RectangleGeometry to PolygonGeometry)

    Declaration
    public static implicit operator PolygonGeometry(RectangleGeometry rectangleGeometry)
    Parameters
    Type Name Description
    RectangleGeometry rectangleGeometry
    Returns
    Type Description
    PolygonGeometry
    In This Article
    Back to top Generated by DocFX