Arma Reforger Script API
Loading...
Searching...
No Matches
Static Public Member Functions | Static Protected Attributes | List of all members
SCR_TerrainHelper Interface Reference

Static Public Member Functions

static float GetTerrainY (vector pos, BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
 Get terrain height at given position.
 
static float GetHeightAboveTerrain (vector pos, BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
 Get height above terrain of given position.
 
static vector GetTerrainNormal (inout vector pos, BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
 Get terrain normal vector on given position.
 
static bool GetTerrainBasis (vector pos, out vector result[4], BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
 Get terrain basis vectors on given position.
 
static void SnapToGeometry (out vector newPosition, vector currentPosition, array< IEntity > excludedEntities, BaseWorld world, TraceParam traceParam=null)
 Snap transformation to nearest geometry beneath provided position.
 
static bool SnapToTerrain (out vector transform[4], BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
 Snap transformation to terrain position.
 
static bool OrientToTerrain (out vector transform[4], BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
 Orient transformation to terrain normal.
 
static bool SnapAndOrientToTerrain (out vector transform[4], BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
 Snap transformation to terrain position and orient it to terrain normal.
 

Static Protected Attributes

static const float MAX_TRACE_LENGTH = 100
 

Member Function Documentation

◆ GetHeightAboveTerrain()

static float SCR_TerrainHelper.GetHeightAboveTerrain ( vector  pos,
BaseWorld  world = null,
bool  noUnderwater = false,
TraceParam  trace = null 
)
static

Get height above terrain of given position.

Parameters
[out]posWorld position
worldWorld to be checked (default world is used when undefined)
noUnderwaterWhen true, sea surface will be used instead of seabed \trace When defined, use this trace to check surface intersection (useful for setting custom trace flags or ignored entities)
Returns
Position above terrain

◆ GetTerrainBasis()

static bool SCR_TerrainHelper.GetTerrainBasis ( vector  pos,
out vector  result[4],
BaseWorld  world = null,
bool  noUnderwater = false,
TraceParam  trace = null 
)
static

Get terrain basis vectors on given position.

Parameters
posWorld position
[out]resultMatrix to be filled with basis vectors
worldWorld to be checked (default world is used when undefined)
noUnderwaterWhen true, sea surface will be used instead of seabed \trace When defined, use this trace to check surface intersection (useful for setting custom trace flags or ignored entities)
Returns
True if the basis was defined successfully

◆ GetTerrainNormal()

static vector SCR_TerrainHelper.GetTerrainNormal ( inout vector  pos,
BaseWorld  world = null,
bool  noUnderwater = false,
TraceParam  trace = null 
)
static

Get terrain normal vector on given position.

Parameters
[in,out]posWorld position, its vertical axis will be modified to be the surface height
worldWorld to be checked (default world is used when undefined)
noUnderwaterWhen true, sea surface will be used instead of seabed \trace When defined, use this trace to check surface intersection (useful for setting custom trace flags or ignored entities)
Returns
Normal vector

◆ GetTerrainY()

static float SCR_TerrainHelper.GetTerrainY ( vector  pos,
BaseWorld  world = null,
bool  noUnderwater = false,
TraceParam  trace = null 
)
static

Get terrain height at given position.

Parameters
[out]posWorld position
worldWorld to be checked (default world is used when undefined)
noUnderwaterWhen true, sea surface will be used instead of seabed \trace When defined, use this trace to check surface intersection (useful for setting custom trace flags or ignored entities)
Returns
Position above sea

◆ OrientToTerrain()

static bool SCR_TerrainHelper.OrientToTerrain ( out vector  transform[4],
BaseWorld  world = null,
bool  noUnderwater = false,
TraceParam  trace = null 
)
static

Orient transformation to terrain normal.

Parameters
[out]transformMatrix to be modified
worldWorld to be checked (default world is used when undefined)
noUnderwaterWhen true, sea surface will be used instead of seabed \trace When defined, use this trace to check surface intersection (useful for setting custom trace flags or ignored entities)
Returns
True if the operation was performed successfully

◆ SnapAndOrientToTerrain()

static bool SCR_TerrainHelper.SnapAndOrientToTerrain ( out vector  transform[4],
BaseWorld  world = null,
bool  noUnderwater = false,
TraceParam  trace = null 
)
static

Snap transformation to terrain position and orient it to terrain normal.

Parameters
[out]transformMatrix to be modified
worldWorld to be checked (default world is used when undefined)
noUnderwaterWhen true, sea surface will be used instead of seabed \trace When defined, use this trace to check surface intersection (useful for setting custom trace flags or ignored entities)
Returns
True if the operation was performed successfully

◆ SnapToGeometry()

static void SCR_TerrainHelper.SnapToGeometry ( out vector  newPosition,
vector  currentPosition,
array< IEntity >  excludedEntities,
BaseWorld  world,
TraceParam  traceParam = null 
)
static

Snap transformation to nearest geometry beneath provided position.

Parameters
[out]newPositionthat is snapped to the geometry
[in]currentPositionthat will be used as a starting point for snapping
[in]excludedEntitiesarray that will not be taken into account when snapping to the geometry
[in]worldWorld to be checked (default world is used when undefined)
[in]traceParamWhen defined, use this trace to check surface intersection (useful for setting custom trace flags or ignored entities)

◆ SnapToTerrain()

static bool SCR_TerrainHelper.SnapToTerrain ( out vector  transform[4],
BaseWorld  world = null,
bool  noUnderwater = false,
TraceParam  trace = null 
)
static

Snap transformation to terrain position.

Parameters
[out]transformMatrix to be modified
worldWorld to be checked (default world is used when undefined)
noUnderwaterWhen true, sea surface will be used instead of seabed \trace When defined, use this trace to check surface intersection (useful for setting custom trace flags or ignored entities)
Returns
True if the operation was performed successfully

Member Data Documentation

◆ MAX_TRACE_LENGTH

const float SCR_TerrainHelper.MAX_TRACE_LENGTH = 100
staticprotected

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