Click or drag to resize

PolygonShape Class

Represents a simple non-selfintersecting convex polygon. Create a convex hull from the given array of points.
Inheritance Hierarchy
SystemObject
  Internal.tainicom.Aether.Physics2D.Collision.ShapesShape
    Internal.tainicom.Aether.Physics2D.Collision.ShapesPolygonShape

Namespace:  Internal.tainicom.Aether.Physics2D.Collision.Shapes
Assembly:  NeoAxis.Core (in NeoAxis.Core.dll) Version: 2024.1.1.0 (2024.1.1.0)
Syntax
C#
public class PolygonShape : Shape

The PolygonShape type exposes the following members.

Constructors
  NameDescription
Public methodPolygonShape(Single)
Create a new PolygonShape with the specified density.
Public methodPolygonShape(Vertices, Single)
Initializes a new instance of the PolygonShape class.
Top
Properties
  NameDescription
Public propertyChildCount (Overrides ShapeChildCount.)
Public propertyDensity
Gets or sets the density. Changing the density causes a recalculation of shape properties.
(Inherited from Shape.)
Public propertyNormals
Public propertyRadius
Radius of the Shape Changing the radius causes a recalculation of shape properties.
(Inherited from Shape.)
Public propertyShapeType
Get the type of this shape.
(Inherited from Shape.)
Public propertyVertices
Create a convex hull from the given array of local points. The number of vertices must be in the range [3, Settings.MaxPolygonVertices]. Warning: the points may be re-ordered, even if they form a convex polygon Warning: collinear points are handled but not removed. Collinear points may lead to poor stacking behavior.
Top
Methods
  NameDescription
Public methodClone (Overrides ShapeClone.)
Public methodCompareTo
Public methodComputeAABB
Given a transform, compute the associated axis aligned bounding box for a child shape.
(Overrides ShapeComputeAABB(AABB, Transform, Int32).)
Protected methodComputeProperties (Overrides ShapeComputeProperties.)
Public methodComputeSubmergedArea (Overrides ShapeComputeSubmergedArea(Vector2, Single, Transform, Vector2).)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRayCast (Overrides ShapeRayCast(RayCastOutput, RayCastInput, Transform, Int32).)
Public methodTestPoint (Overrides ShapeTestPoint(Transform, Vector2).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldMassData
Contains the properties of the shape such as: - Area of the shape - Centroid - Inertia - Mass
(Inherited from Shape.)
Top
Extension Methods
See Also