Click or drag to resize

ChainShape Class

A chain shape is a free form sequence of line segments. The chain has two-sided collision, so you can use inside and outside collision. Therefore, you may use any winding order. Connectivity information is used to create smooth collisions. WARNING: The chain will not collide properly if there are self-intersections.
Inheritance Hierarchy
SystemObject
  Internal.tainicom.Aether.Physics2D.Collision.ShapesShape
    Internal.tainicom.Aether.Physics2D.Collision.ShapesChainShape

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 ChainShape : Shape

The ChainShape type exposes the following members.

Constructors
  NameDescription
Public methodChainShape
Constructor for ChainShape. By default have 0 in density.
Public methodChainShape(Vertices, Boolean)
Create a new chainshape from the vertices.
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 propertyNextVertex
Establish connectivity to a vertex that follows the last vertex. Don't call this for loops.
Public propertyPrevVertex
Establish connectivity to a vertex that precedes the first vertex. Don't call this for loops.
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.)
Top
Methods
  NameDescription
Public methodClone (Overrides ShapeClone.)
Public methodCompareTo
Compare the chain to another chain
Public methodComputeAABB (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 methodGetChildEdge
Get a child edge.
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.)
Public fieldVertices
The vertices. These are not owned/freed by the chain Shape.
Top
Extension Methods
See Also