Method ToNativePointer
- Namespace
- Box3D.Interop
- Assembly
- Box3D.NET.dll
ToNativePointer(CompoundGeometry)
Gets the native pointer of a baked compound.
public static b3CompoundData* ToNativePointer(this CompoundGeometry compound)Parameters
compoundCompoundGeometry-
The compound.
Returns
- b3CompoundData*
-
The pointer the C API expects, owned by
compound.
Remarks
The one piece of geometry that cannot be reached from the shape that
carries it. Hulls, meshes and height fields all have a
b3Shape_Get... accessor; compounds have none, so anything that
needs to read a compound's children - a debug renderer tessellating them,
a tool serializing them with b3ConvertCompoundToBytes - has to be
handed the pointer by whoever baked it.
Valid only while the compound is alive, and freed by disposing it.
Exceptions
- ArgumentNullException
-
compoundis null. - ObjectDisposedException
-
compoundhas been disposed.