Impact Interaction System API
Impact.Objects.ImpactObjectBase Class Referenceabstract

Base component for implementing Impact Objects. More...

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

Public Member Functions

virtual VelocityData GetVelocityDataAtPoint (Vector3 point)
 Gets this object's velocity data at the given point. By default this returns empty data. More...
 
virtual Vector3 GetContactPointRelativePosition (Vector3 point)
 Gets the local position of the contact point relative to this object's transform. More...
 
abstract int GetMaterialCompositionNonAlloc (Vector3 point, ImpactMaterialComposition[] results)
 Gets the material composition at the given point by filling out the given array. More...
 
abstract IImpactMaterial GetPrimaryMaterial (Vector3 point)
 Gets the primary material at the given point. More...
 
abstract IImpactMaterial GetPrimaryMaterial ()
 Gets the primary material without knowing the contact point. More...
 
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...
 

Protected Attributes

int _priority
 

Properties

int Priority [get, set]
 How important this object is. More...
 
GameObject GameObject [get]
 The GameObject associated with this object. More...
 
- Properties inherited from Impact.Objects.IImpactObject
int Priority [get]
 How important this object is. More...
 
GameObject GameObject [get]
 The GameObject associated with this object. More...
 

Detailed Description

Base component for implementing Impact Objects.

Member Function Documentation

◆ GetContactPointRelativePosition()

virtual Vector3 Impact.Objects.ImpactObjectBase.GetContactPointRelativePosition ( Vector3  point)
virtual

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.

Implements Impact.Objects.IImpactObject.

Reimplemented in Impact.Objects.ImpactObjectRigidbody, Impact.Objects.ImpactObjectRigidbodyCheap, and Impact.Objects.ImpactObjectRigidbodyChild.

◆ GetMaterialCompositionNonAlloc()

abstract int Impact.Objects.ImpactObjectBase.GetMaterialCompositionNonAlloc ( Vector3  point,
ImpactMaterialComposition[]  results 
)
pure virtual

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.

Implements Impact.Objects.IImpactObject.

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

◆ GetPrimaryMaterial() [1/2]

abstract IImpactMaterial Impact.Objects.ImpactObjectBase.GetPrimaryMaterial ( )
pure virtual

Gets the primary material without knowing the contact point.

Returns
The primary material of the object.

Implements Impact.Objects.IImpactObject.

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

◆ GetPrimaryMaterial() [2/2]

abstract IImpactMaterial Impact.Objects.ImpactObjectBase.GetPrimaryMaterial ( Vector3  point)
pure virtual

Gets the primary material at the given point.

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

Implements Impact.Objects.IImpactObject.

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

◆ GetVelocityDataAtPoint()

virtual VelocityData Impact.Objects.ImpactObjectBase.GetVelocityDataAtPoint ( Vector3  point)
virtual

Gets this object's velocity data at the given point. By default this returns empty data.

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

Implements Impact.Objects.IImpactObject.

Reimplemented in Impact.Objects.ImpactObjectRigidbody, Impact.Objects.ImpactObjectRigidbodyCheap, and Impact.Objects.ImpactObjectRigidbodyChild.

Property Documentation

◆ GameObject

GameObject Impact.Objects.ImpactObjectBase.GameObject
get

The GameObject associated with this object.

Implements Impact.Objects.IImpactObject.

◆ Priority

int Impact.Objects.ImpactObjectBase.Priority
getset

How important this object is.

Implements Impact.Objects.IImpactObject.