Click or drag to resize

Fixture Class

A fixture is used to attach a Shape to a body for collision detection. A fixture inherits its transform from its parent. Fixtures hold additional non-geometric data such as friction, collision filters, etc.
Inheritance Hierarchy
SystemObject
  Internal.tainicom.Aether.Physics2D.DynamicsFixture

Namespace:  Internal.tainicom.Aether.Physics2D.Dynamics
Assembly:  NeoAxis.Core (in NeoAxis.Core.dll) Version: 2023.1.2.0 (2023.1.2.0)
Syntax
C#
public class Fixture

The Fixture type exposes the following members.

Constructors
  NameDescription
Public methodFixture
Initializes a new instance of the Fixture class
Top
Properties
  NameDescription
Public propertyBody
Get the parent body of this fixture. This is null if the fixture is not attached.
Public propertyCollidesWith
Defaults to Category.All The collision mask bits. This states the categories that this fixture would accept for collision.
Public propertyCollisionCategories
The collision categories this fixture is a part of. Defaults to Category.Cat1
Public propertyCollisionGroup
Defaults to 0 Collision groups allow a certain group of objects to never collide (negative) or always collide (positive). Zero means no collision group. Non-zero group filtering always wins against the mask bits.
Public propertyFriction
Set the coefficient of friction. This will _not_ change the friction of existing contacts.
Public propertyIsSensor
Gets or sets a value indicating whether this fixture is a sensor.
Public propertyProxies
Public propertyProxyCount
Public propertyRestitution
Set the coefficient of restitution. This will not change the restitution of existing contacts.
Public propertyShape
Get the child Shape.
Top
Methods
  NameDescription
Public methodCloneOnto
Clones the fixture onto the specified body.
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 methodGetAABB
Get the fixture's AABB. This AABB may be enlarge and/or stale. If you need a more accurate AABB, compute it using the Shape and the body transform.
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
Cast a ray against this Shape.
Public methodTestPoint
Test a point for containment in this fixture.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldAfterCollision
Fires after two shapes has collided and are solved. This gives you a chance to get the impact force.
Public fieldBeforeCollision
Fires when two fixtures are close to each other. Due to how the broadphase works, this can be quite inaccurate as shapes are approximated using AABBs.
Public fieldOnCollision
Fires when two shapes collide and a contact is created between them. Note that the first fixture argument is always the fixture that the delegate is subscribed to.
Public fieldOnSeparation
Fires when two shapes separate and a contact is removed between them. Note: This can in some cases be called multiple times, as a fixture can have multiple contacts. Note The first fixture argument is always the fixture that the delegate is subscribed to.
Public fieldTag
Set the user data. Use this to store your application specific data.
Top
Extension Methods
See Also