Name | Description |
ClearShards | Destroy all existing Shard connected to the FracturedMesh. |
Declaration Return Value
true if all Shard have been cleared; else false if there was nothing to do.
|
SetFracture | Assign an existing Fracture to the active FracturedMesh. |
Declaration void SetFracture( Fracture *fracture ) Parameters
fracture : Reference to an existing Fracture asset.
|
SetMaterial | Assign a Material to a specific LOD primitive. |
Declaration bool SetMaterial( unsigned short lod_index, int renderlayer_cap, unsigned short primitive_index, Material *material ) Parameters
lod_index : The LOD index.
renderlayer_cap : The RenderLayer cap where Material should appear on.
primitive_index : Index of the Geometry primitive to apply the Material to.
material : Reference to an existing Material; or nil to reset the slot.
Return Value
true if the lod_index and primitive_index are valid; else return false .
|
CopyMaterials | Helper function that allows you to copy the current Material settings for a RenderLayer to another. |
Declaration bool CopyMaterials( unsigned short lod_index, int from_renderlayer_cap, int to_renderlayer_cap ) Parameters
lod_index : Level of detail index.
from_renderlayer_cap : RenderLayer cap of the Material slot setting to copy.
to_renderlayer_cap : RenderLayer cap of the new or existing Material slot to copy to.
Return Value
true if the data have been copied successfully; false if the lod_index or from_renderlayer_cap cannot be found.
|
GetMaterial | Retrieve which Material is currently assigned to a specific slot. |
Declaration Material *GetMaterial( unsigned short lod_index, int renderlayer_cap, unsigned short primitive_index ) Parameters
lod_index : The LOD index of the slot.
renderlayer_cap : The RenderLayer cap of the slot.
primitive_index : The primitive index of the slot.
Return Value
nil if the slot do not have any Material assigned, or if the slot is not found; else return the Material reference assigned to the slot.
|
SetCoreMaterial | Specify the shell core Material to use for a specific RenderLayer. |
Declaration void SetCoreMaterial( int renderlayer_cap, unsigned int material ) Parameters
|
GetCoreMaterial | Retrieve the Asset uid of the Material connected to the core. |
Declaration unsigned int GetCoreMaterial( int renderlayer_cap ) Parameters
Return Value
The uid of the Material Asset to connect to the core for the RenderLayer specified in parameter; else return 0 .
|
GetShardIndex | Retrieve the internal index of a specific Shard. |
Declaration int GetShardIndex( const Shard *shard ) Parameters
Return Value
The index of the Shard; -1 if the reference is invalid.
|
GetShardAt | Retrieve the reference of a Shard using its index as key. |
Declaration Shard *GetShardAt( unsigned short index ) Parameters
index : Index of the Shard reference to retrieve.
Return Value
A valid Shard reference pointer; nil if the index specified is incorrect.
|
DetachAllShards | Force the system to activate all shards and remove all RigidConstraint attach to them forcing the Mesh to fracture. |
Declaration void DetachAllShards( void )
|
ActivateAllShards | Force all Shard to be activated causing the structure to crack (constraints are still attached). |
Declaration void ActivateAllShards( void ) Parameters
index : Index of the Shard reference to retrieve.
Return Value
A valid Shard reference pointer; nil if the index specified is incorrect.
|
UpdateBounds | Manually force an update of the FracturedMesh Bounds. |
Declaration void UpdateBounds( void )
|
A data structure that contains the configuration parameters to convert the chunks (Geometry generated from the fracture slices) contained in a Fracture an asset to Shard (PhysicObject that will interact with your World when the object gets fractured).
Name | Description |
core_object | Unique id of the Object to use as core. |
Declaration
|
shell_mass | Total mass of the shell; based on their volume ratio each Shard mass will be set using a percentage of it. |
Declaration Range 0.01 to inf. - Warning
- Specifying a very low shell mass might lead to a "jittery" physics simulation. Set this value considering the total mass of the shell that will be divided into the number of chunks generated in the Fracture.
|
shard_margin | Collision margin to apply on the Shard to avoid penetration. |
Declaration Range 0.0 to 1.0
|
shard_default_state | Specify the default ActivationState of the shards. |
Declaration ActivationState shard_default_state
|
shard_collision_bounds | Set the type of CollisionBounds the shards will be using. |
Declaration CollisionBounds shard_collision_bounds - Warning
- Only
kConvexHull (default) and kTriangleMesh are accepted.
|
shard_collider_optimization | Enable optimization of the Shard Collider. |
Declaration bool shard_collider_optimization
|
shard_remove_broken_constraints | Tell the system to remove the Shard constraints as soon as they are broken. |
Declaration bool shard_remove_broken_constraints
|
shard_sleeping_multiplier | Stabilize the physics simulation by increasing (or decreasing) the sleeping threshold for each Shard. |
Declaration float shard_sleeping_multiplier Range 0.0 to 8.0
|
shard_to_shard_constraint_type | Set the RigidConstraintType to use to link each Shard PhysicObject together. |
Declaration RigidConstraintType shard_to_shard_constraint_type - Warning
- Only
kNone , kFixed (default) or kGeneric rigid constraint types are allowed.
|
shard_to_shard_breaking_threshold | Specify how much impulse or pressure a Shard can handle before it breaks. |
Declaration float shard_to_shard_breaking_threshold Range 0.0 to inf. - Note
- This value will be averaged based on the volume of the Shard; so small shards will break more easily than big ones.
|
shard_to_core_breaking_threshold | Specify how much impulse or pressure a Shard connected to the core can handle before it breaks. |
Declaration float shard_to_core_breaking_threshold Range 0.0 to inf.
|
shard_physicmaterial | A PhysicMaterial Asset unique id to apply on each Shard. |
Declaration unsigned int shard_physicmaterial
|
shard_collisionlayer_mask | Bit mask of CollisionLayer cap that tells the system where to place the shards collision objects. |
Declaration int shard_collisionlayer_mask
|
shard_collisionlayer_filter | Bit mask of CollisionLayer cap that filter with which collision layer the shards can collide with. |
Declaration int shard_collisionlayer_filter
|