Arma Reforger Script API
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
MeshObjectVolumeCalculator Interface Reference
Inheritance diagram for MeshObjectVolumeCalculator:
[legend]

Static Public Member Functions

static proto float GetVolumeFromColliders (IEntity ent, int layer)
 Calculate volume of given mesh of meshObject using colliders with given interaction layer.
 
static proto float GetVolumeFromVisualMesh (VObject vObject, int meshId)
 Calculate volume of given mesh of meshObject.
 

Member Function Documentation

◆ GetVolumeFromColliders()

static proto float MeshObjectVolumeCalculator.GetVolumeFromColliders ( IEntity  ent,
int  layer 
)
static

Calculate volume of given mesh of meshObject using colliders with given interaction layer.

Colliders should be closed as not closed could return imprecise result. Doesn't support scaled objects.

Parameters
entEntity that is volume calculated for.
layerIteraction layer of object to calculate it from.
Returns
Volume of given object, or 0 without object or on error

◆ GetVolumeFromVisualMesh()

static proto float MeshObjectVolumeCalculator.GetVolumeFromVisualMesh ( VObject  vObject,
int  meshId 
)
static

Calculate volume of given mesh of meshObject.

Mesh should be closed as not closed meshes will return imprecise result. Doesn't support scaled objects.

Parameters
vObjectObject that is volume calculated for.
meshIdId of mesh from vObject to calculate.
Returns
Volume of given object, or 0 without object

The documentation for this interface was generated from the following file: