Table of Contents

Class CompoundGeometry

Namespace
Box3D
Assembly
Box3D.NET.dll

Many child shapes baked into one, used for static geometry.

public sealed class CompoundGeometry : IDisposable

Inheritance

Implements

Inherited Members

Extension Methods

Remarks

Built by a Box3D.CompoundBuilder and attached with Box3D.Body.AddCompound(Box3D.CompoundGeometry,System.Nullable{Box3D.ShapeDefinition}). The whole compound is one shape as far as the broad phase is concerned, which is the point: it is how a piece of static scenery made of a thousand rocks costs one proxy instead of a thousand.

Lifetime. Attaching a compound does not copy it. The shape points at this object's memory, so it must outlive every shape built from it. The safe order is: dispose the world, then dispose the compound.

Static bodies only. Box3D restricts baked compounds to static bodies. For a moving object made of several shapes, attach the shapes to the body one at a time instead - that is what a run-time compound is, and it works on any body type.

Properties

Bounds

Gets the bounding box enclosing every child, in compound-local space.

ByteCount

Gets the memory the compound occupies, in bytes.

CapsuleCount

Gets the number of capsule children.

ChildCount

Gets the total number of children.

HullCount

Gets the number of hull children.

IsDisposed

Gets a value indicating whether this compound has been disposed.

MeshCount

Gets the number of mesh children.

SphereCount

Gets the number of sphere children.

Methods

Dispose()

Releases the compound.