JoltShapes class final

The native shapes of one world, shared between every body and query that asks for an equal Shape3D and reference-counted: a shape goes when its last body does. A few shapes no body holds — a camera's sweep sphere — are kept for the next query.

Each native shape also carries a NativeFinalizer, so a world dropped without dispose() still lets its shapes go.

Constructors

JoltShapes()
Shapes for one world.

Properties

hashCode → int
The hash code for this object.
no setterinherited
length → int
How many native shapes there are.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

acquire(Shape3D shape) → Pointer<JPH_Shape>?
shape for a new body: made, or shared. Null when Jolt cannot make it.
borrow(Shape3D shape) → Pointer<JPH_Shape>?
shape for a query, kept while no body holds it among the last idleLimit used that way.
clear() → void
Lets every shape go.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
release(Shape3D shape) → void
A body made of shape has gone.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

make(Shape3D shape) → Pointer<JPH_Shape>?
A new native shape for shape that the caller owns (one reference); null when it is not Shape3D.isValid or Jolt refuses it.

Constants

idleLimit → const int
How many unheld shapes are kept for queries.