Struct BodySet
- Namespace
- BepuPhysics
- Assembly
- BepuPhysics.dll
Stores a group of bodies- either the set of active bodies, or the bodies involved in an inactive simulation island.
public struct BodySet
- Inherited Members
Constructors
BodySet(int, BufferPool)
public BodySet(int initialCapacity, BufferPool pool)
Parameters
initialCapacity
intpool
BufferPool
Fields
Activity
Activity states of bodies in the set.
public Buffer<BodyActivity> Activity
Field Value
- Buffer<BodyActivity>
Collidables
The collidables owned by each body in the set. Speculative margins, continuity settings, and shape indices can be changed directly. Shape indices cannot transition between pointing at a shape and pointing at nothing or vice versa without notifying the broad phase of the collidable addition or removal.
public Buffer<Collidable> Collidables
Field Value
- Buffer<Collidable>
Constraints
List of constraints associated with each body in the set.
public Buffer<QuickList<BodyConstraintReference>> Constraints
Field Value
- Buffer<QuickList<BodyConstraintReference>>
Count
public int Count
Field Value
DynamicsState
Stores all data involved in solving constraints for a body, including pose, velocity, and inertia.
public Buffer<BodyDynamics> DynamicsState
Field Value
- Buffer<BodyDynamics>
IndexToHandle
Remaps a body index to its handle.
public Buffer<BodyHandle> IndexToHandle
Field Value
- Buffer<BodyHandle>
Properties
Allocated
Gets whether this instance is backed by allocated memory.
public bool Allocated { get; }
Property Value
Methods
BodyIsConstrainedBy(int, ConstraintHandle)
public bool BodyIsConstrainedBy(int bodyIndex, ConstraintHandle constraintHandle)
Parameters
bodyIndex
intconstraintHandle
ConstraintHandle
Returns
Clear(BufferPool)
public void Clear(BufferPool pool)
Parameters
pool
BufferPool
Dispose(BufferPool)
Disposes the body set's buffers and any resources within them.
public void Dispose(BufferPool pool)
Parameters
pool
BufferPoolPool to return resources to.
DisposeBuffers(BufferPool)
Disposes the buffers, but nothing inside of the buffers. Per-body constraint lists stored in the set will not be returned.
public void DisposeBuffers(BufferPool pool)
Parameters
pool
BufferPoolPool to return the set's top level buffers to.
GetDescription(int, out BodyDescription)
public void GetDescription(int index, out BodyDescription description)
Parameters
index
intdescription
BodyDescription