Quantum 3
3.0.9
A 3D shape type that can reference a group of other 3D shapes (including other compounds, but not Mesh and Terrain shapes). Compound shape overlaps and physics colliders with compound shapes are supported. More...
Public Member Functions | |
| void | AddShape (FrameBase f, ref Shape3D shape, bool updateCompoundMeta=true) |
| Adds the shape to the compound buffer. More... | |
| void | CopyFrom (FrameBase f, ref Shape3D shape) |
| Creates a copy of another compound shape 's and any nested compound's buffers. The resultant shapes will not share data. More... | |
| void | FreePersistent (FrameBase f, Boolean freeNestedPersistent=true) |
| Dispose any persistently allocated memory for this compound shape. More... | |
| readonly override int | GetHashCode () |
| Overrides the hash code generation of this type. More... | |
| bool | GetShapes (FrameBase f, out Shape3D *shapesBuffer, out Int32 count) |
| Gets a pointer to the buffer of shapes added to this compound. More... | |
| bool | RemoveShapes (FrameBase f, Int32? userTag=null, bool resetCompoundMeta=true, Boolean removeFromNested=true) |
| Removes all shapes in a compound that have a Shape3D.UserTag field matching the specified userTag . More... | |
| void | ReserveCapacity (FrameBase f, Int32 capacity) |
| Ensures that this compound shape capacity can hold at least capacity shapes. More... | |
| void | ResetCompoundMeta (FrameBase f) |
| Recomputes the compound shape broad radius, centroid and volume sum (the later is used internally). More... | |
Static Public Member Functions | |
| static void | Serialize (void *ptr, FrameSerializer serializer) |
| Serializes a CompoundShape3D into a FrameSerializer. More... | |
Static Public Attributes | |
| const int | SIZE = Transform3D.SIZE + BoxShape.SIZE |
| The size of the struct in bytes. More... | |
Properties | |
| readonly Int32 | Capacity [get] |
| The current number of shapes that can be held by the compound buffer. More... | |
| readonly Int32 | Count [get] |
| The number of shapes in the compound buffer. More... | |
| readonly Boolean | IsPersistent [get] |
| If the buffer of shapes is persistently allocated. More... | |
A 3D shape type that can reference a group of other 3D shapes (including other compounds, but not Mesh and Terrain shapes). Compound shape overlaps and physics colliders with compound shapes are supported.
Creates a copy of another compound shape 's and any nested compound's buffers. The resultant shapes will not share data.
Any existing persistent compounds in this shape's hierarchy are disposed before copying.
| f | The current frame being simulated. |
| shape | The compound shape that will be copied from. |
|
inline |
Adds the shape to the compound buffer.
Trying to add a compound shape that holds a buffer already reference in this shape's hierarchy will throw an error in debug mode.
Mesh and Terrain shapes cannot be added to a compound shape.
| f | The frame currently being simulated. |
| shape | The shape being added to the compound. |
| updateCompoundMeta | If the compound meta data (e.g. broad radius and centroid) should be automatically updated. |
|
inline |
Removes all shapes in a compound that have a Shape3D.UserTag field matching the specified userTag .
| f | The frame currently being simulated. |
| userTag | A tag that specifies a shape or group of shapes. Any shape in a compound that has a matching Shape3D.UserTag field will be removed. If none is specified, all shapes are removed. |
| resetCompoundMeta | If the compound meta data (e.g. broad radius, centroid) should be automatically reset if any shapes are removed. |
| removeFromNested | If shapes should also be removed from any compound shape nested inside this. |
true if at least one shape has been removed by this method.
|
inline |
Gets a pointer to the buffer of shapes added to this compound.
| f | The frame currently being simulated. |
| shapesBuffer | A pointer to the buffer of shapes added to this compound. null if the compound doesn't have shapes. |
| count | The number of shapes in the shapesBuffer . |
true if the buffer has at least one shape
|
inline |
Recomputes the compound shape broad radius, centroid and volume sum (the later is used internally).
| f | The frame currently being simulated. |
|
inline |
Dispose any persistently allocated memory for this compound shape.
| f | The frame currently being simulated. |
| freeNestedPersistent | If nested compound shapes should also have persistent buffers disposed. |
|
inline |
Ensures that this compound shape capacity can hold at least capacity shapes.
| f | The current Frame instance |
| capacity | The desired capacity. The resultant capacity can be greater than or equal this value. |
|
inlinestatic |
Serializes a CompoundShape3D into a FrameSerializer.
| ptr | The pointer to the CompoundShape3D. |
| serializer | The FrameSerializer instance into which the struct will be serialized. |
|
inline |
Overrides the hash code generation of this type.
|
static |
The size of the struct in bytes.
|
get |
If the buffer of shapes is persistently allocated.
Persistently allocated memory is not disposed automatically. Call FreePersistent when done using a persistent compound.
|
get |
The number of shapes in the compound buffer.
|
get |
The current number of shapes that can be held by the compound buffer.