Impact Interaction System API
Impact.Objects.IImpactObject Interface Reference

Interface for implementing Impact Objects. More...

Inheritance diagram for Impact.Objects.IImpactObject:
Impact.Objects.ImpactObjectBase Impact.Objects.ImpactObjectSingleMaterial Impact.Objects.ImpactTerrain Impact.Objects.ImpactObjectRigidbody Impact.Objects.ImpactObjectRigidbodyCheap Impact.Objects.ImpactObjectRigidbodyChild

Public Member Functions

int GetMaterialCompositionNonAlloc (Vector3 point, ImpactMaterialComposition[] results)
 Gets the material composition at the given point by filling out the given array. More...
 
IImpactMaterial GetPrimaryMaterial (Vector3 point)
 Gets the primary material at the given point. More...
 
IImpactMaterial GetPrimaryMaterial ()
 Gets the primary material without knowing the contact point. More...
 
VelocityData GetVelocityDataAtPoint (Vector3 contactPoint)
 Gets this object's velocity data at the given point. More...
 
Vector3 GetContactPointRelativePosition (Vector3 point)
 Gets the local position of the contact point relative to this object's transform. More...
 

Properties

int Priority [get]
 How important this object is. More...
 
GameObject GameObject [get]
 The GameObject associated with this object. More...
 

Detailed Description

Interface for implementing Impact Objects.

Member Function Documentation

◆ GetContactPointRelativePosition()

Vector3 Impact.Objects.IImpactObject.GetContactPointRelativePosition ( Vector3  point)

Gets the local position of the contact point relative to this object's transform.

Parameters
pointThe world-space point to convert to local space.
Returns
The position of the point in local space.

Implemented in Impact.Objects.ImpactObjectBase, Impact.Objects.ImpactObjectRigidbody, Impact.Objects.ImpactObjectRigidbodyCheap, and Impact.Objects.ImpactObjectRigidbodyChild.

◆ GetMaterialCompositionNonAlloc()

int Impact.Objects.IImpactObject.GetMaterialCompositionNonAlloc ( Vector3  point,
ImpactMaterialComposition[]  results 
)

Gets the material composition at the given point by filling out the given array.

Parameters
pointThe point to get materials at.
resultsA pre-allocated array to put the results into.
Returns
The number of results.

Implemented in Impact.Objects.ImpactObjectBase, Impact.Objects.ImpactObjectSingleMaterial, and Impact.Objects.ImpactTerrain.

◆ GetPrimaryMaterial() [1/2]

IImpactMaterial Impact.Objects.IImpactObject.GetPrimaryMaterial ( )

Gets the primary material without knowing the contact point.

Returns
The primary material of the object.

Implemented in Impact.Objects.ImpactObjectBase, Impact.Objects.ImpactObjectSingleMaterial, and Impact.Objects.ImpactTerrain.

◆ GetPrimaryMaterial() [2/2]

IImpactMaterial Impact.Objects.IImpactObject.GetPrimaryMaterial ( Vector3  point)

Gets the primary material at the given point.

Parameters
pointThe point to get materias at.
Returns
The primary material, if there is one.

Implemented in Impact.Objects.ImpactObjectBase, Impact.Objects.ImpactObjectSingleMaterial, and Impact.Objects.ImpactTerrain.

◆ GetVelocityDataAtPoint()

VelocityData Impact.Objects.IImpactObject.GetVelocityDataAtPoint ( Vector3  contactPoint)

Gets this object's velocity data at the given point.

Parameters
contactPointThe world-space point to get data for.
Returns
Velocity data for the point.

Implemented in Impact.Objects.ImpactObjectRigidbody, Impact.Objects.ImpactObjectRigidbodyCheap, Impact.Objects.ImpactObjectRigidbodyChild, and Impact.Objects.ImpactObjectBase.

Property Documentation

◆ GameObject

GameObject Impact.Objects.IImpactObject.GameObject
get

The GameObject associated with this object.

Implemented in Impact.Objects.ImpactObjectBase.

◆ Priority

int Impact.Objects.IImpactObject.Priority
get

How important this object is.

Implemented in Impact.Objects.ImpactObjectBase.