Impact Interaction System API
|
Singleton class for managing Impact configuration, material mapping, and handling interaction processing. More...
Public Member Functions | |
void | Initialize () |
Set up all needed manager data including the buffer arrays and material mapping data. | |
bool | HasReachedPhysicsInteractionsLimit () |
Checks if the current physics interaction count has been reached. More... | |
void | IncrementPhysicsInteractionsLimit () |
Increments the physics interaction count. | |
bool | HasReachedContinuousInteractionLimit () |
Has the maximum number of active continuous interactions been reached? More... | |
bool | TryGetImpactMaterialFromMapping (Collider collider, out IImpactMaterial impactMaterial) |
Try to get an Impact Material from the Material Mapping using the given Collider. More... | |
bool | TryGetImpactMaterialFromMapping (Collider2D collider2d, out IImpactMaterial impactMaterial) |
Try to get an Impact Material from the Material Mapping using the given Collider2D. More... | |
bool | TryGetImpactMaterialFromMapping (int physicsMaterialInstanceId, out IImpactMaterial impactMaterial) |
Try to get an Impact Material from the Material Mapping using the given Physics Material instance ID. More... | |
void | ProcessInteraction< T > (T interactionData, IImpactMaterial impactMaterial, IImpactObject impactObject) |
Process interaction data using the Impact Material and an optional Impact Object that the interaction originated from. More... | |
void | ProcessContinuousInteraction< T > (T interactionData, IImpactObject impactObject) |
Process a continuous interaction using the interaction data and the given Impact Object. The primary material at the interaction point will be used. More... | |
void | ProcessContinuousInteraction< T > (T interactionData, IImpactMaterial material, IImpactObject impactObject) |
Process a continuous interaction using the interaction data, an Impact Material, and an optional Impact Object that the interaction originated from. More... | |
void | AddOrUpdateContinuousInteractionResult (IImpactObject impactObject, IContinuousInteractionResult result) |
Adds or updates the given continuous interaction result to the active continuous interaction results, if able. More... | |
bool | HasActiveContinuousInteractionWithKey (long key) |
ClassPool | CreateInteractionResultPool< T > (string key) |
Creates a new Interaction Result pool with the given key and size. More... | |
bool | TryGetInteractionResultFromPool< T > (string key, out T obj) |
Attempts to get an available empty interaction result from the pool with the specified key. More... | |
Properties | |
IInteractionResult[] | InteractionResultBuffer [get] |
Shared buffer for retrieving interaction results from Impact Materials. | |
ImpactMaterialComposition[] | MaterialCompositionBuffer [get] |
Shared buffer for retrieving material composition. | |
bool | UseMaterialMapping [get, set] |
Is the material mapping feature enabled in the configuration? | |
Singleton class for managing Impact configuration, material mapping, and handling interaction processing.
void Impact.ImpactManager.AddOrUpdateContinuousInteractionResult | ( | IImpactObject | impactObject, |
IContinuousInteractionResult | result | ||
) |
Adds or updates the given continuous interaction result to the active continuous interaction results, if able.
impactObject | The impact object the result is being sent from. |
result | The new continuous interaction result. |
ClassPool Impact.ImpactManager.CreateInteractionResultPool< T > | ( | string | key | ) |
Creates a new Interaction Result pool with the given key and size.
T | The IPoolable type to use. |
key | The name of the pool, used to retrieve objects. |
T | : | class | |
T | : | IPoolable | |
T | : | new() |
bool Impact.ImpactManager.HasReachedContinuousInteractionLimit | ( | ) |
Has the maximum number of active continuous interactions been reached?
bool Impact.ImpactManager.HasReachedPhysicsInteractionsLimit | ( | ) |
Checks if the current physics interaction count has been reached.
void Impact.ImpactManager.ProcessContinuousInteraction< T > | ( | T | interactionData, |
IImpactMaterial | material, | ||
IImpactObject | impactObject | ||
) |
Process a continuous interaction using the interaction data, an Impact Material, and an optional Impact Object that the interaction originated from.
interactionData | The interaction data to process. |
impactMaterial | The Impact Material to get interaction results from. |
impactObject | An optional Impact Object that the interaction originated from. |
T | : | IInteractionData |
void Impact.ImpactManager.ProcessContinuousInteraction< T > | ( | T | interactionData, |
IImpactObject | impactObject | ||
) |
Process a continuous interaction using the interaction data and the given Impact Object. The primary material at the interaction point will be used.
interactionData | The interaction data to process. |
impactObject | The Impact Object that an Impact Material will be retrieved from. |
T | : | IInteractionData |
void Impact.ImpactManager.ProcessInteraction< T > | ( | T | interactionData, |
IImpactMaterial | impactMaterial, | ||
IImpactObject | impactObject | ||
) |
Process interaction data using the Impact Material and an optional Impact Object that the interaction originated from.
interactionData | The interaction data to process. |
impactMaterial | The Impact Material to get interaction results from. |
impactObject | An optional Impact Object that the interaction originated from. |
T | : | IInteractionData |
bool Impact.ImpactManager.TryGetImpactMaterialFromMapping | ( | Collider | collider, |
out IImpactMaterial | impactMaterial | ||
) |
Try to get an Impact Material from the Material Mapping using the given Collider.
collider | The collider that has the Physic Material to get a mapping for. |
impactMaterial | The material that was found in the mapping, if one was found. Null otherwise. |
bool Impact.ImpactManager.TryGetImpactMaterialFromMapping | ( | Collider2D | collider2d, |
out IImpactMaterial | impactMaterial | ||
) |
Try to get an Impact Material from the Material Mapping using the given Collider2D.
collider2d | The collider that has the Physics Material 2D to get a mapping for. |
impactMaterial | The material that was found in the mapping, if one was found. Null otherwise. |
bool Impact.ImpactManager.TryGetImpactMaterialFromMapping | ( | int | physicsMaterialInstanceId, |
out IImpactMaterial | impactMaterial | ||
) |
Try to get an Impact Material from the Material Mapping using the given Physics Material instance ID.
physicsMaterialInstanceId | The instance ID of the physics material (3D or 2D). |
impactMaterial | The material that was found in the mapping, if one was found. Null otherwise. |
bool Impact.ImpactManager.TryGetInteractionResultFromPool< T > | ( | string | key, |
out T | obj | ||
) |
Attempts to get an available empty interaction result from the pool with the specified key.
T | The IPoolable type to get. |
key | The name of the pool. |
obj | The returned result, if one was found. |
T | : | class | |
T | : | IPoolable | |
T | : | new() |