Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TerrainHelper Class Reference

Static Protected Member Functions

static float GetTerrainY (vector pos, BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
static float GetHeightAboveTerrain (vector pos, BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
static vector GetTerrainNormal (inout vector pos, BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
static bool GetTerrainBasis (vector pos, out vector result[4], BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
static void SnapToGeometry (out vector newPosition, vector currentPosition, array< IEntity > excludedEntities, BaseWorld world=null, TraceParam traceParam=null, out vector surfaceNormal=vector.Zero)
static bool SnapToTerrain (out vector transform[4], BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
static bool OrientToTerrain (out vector transform[4], BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
static bool SnapAndOrientToTerrain (out vector transform[4], BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)

Static Protected Attributes

static const float MAX_TRACE_LENGTH = 100

Detailed Description

Definition at line 1 of file SCR_TerrainHelper.c.

Member Function Documentation

◆ GetHeightAboveTerrain()

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

Get height above terrain of given position.

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

Definition at line 51 of file SCR_TerrainHelper.c.

◆ GetTerrainBasis()

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

Get terrain basis vectors on given position.

Parameters
[in]posWorld position
[out]resultMatrix to be filled with basis vectors
[in]worldWorld to be checked (default world is used when undefined)
[in]noUnderwaterWhen true, sea surface will be used instead of seabed
[in]traceWhen 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

Definition at line 129 of file SCR_TerrainHelper.c.

◆ GetTerrainNormal()

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

Get terrain normal vector on given position.

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

Definition at line 65 of file SCR_TerrainHelper.c.

◆ GetTerrainY()

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

Get terrain height at given position.

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

Definition at line 12 of file SCR_TerrainHelper.c.

◆ OrientToTerrain()

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

Orient transformation to terrain normal.

Parameters
[out]transformMatrix to be modified
[in]worldWorld to be checked (default world is used when undefined)
[in]noUnderwaterWhen true, sea surface will be used instead of seabed
[in]traceWhen 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

Definition at line 227 of file SCR_TerrainHelper.c.

◆ SnapAndOrientToTerrain()

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

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

Parameters
[out]transformMatrix to be modified
[in]worldWorld to be checked (default world is used when undefined)
[in]noUnderwaterWhen true, sea surface will be used instead of seabed
[in]traceWhen 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

Definition at line 253 of file SCR_TerrainHelper.c.

◆ SnapToGeometry()

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

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)
[out]surfaceNormalReturns the surface intersection normal

Definition at line 160 of file SCR_TerrainHelper.c.

◆ SnapToTerrain()

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

Snap transformation to terrain position.

Parameters
[out]transformMatrix to be modified
[in]worldWorld to be checked (default world is used when undefined)
[in]noUnderwaterWhen true, sea surface will be used instead of seabed
[in]traceWhen 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

Definition at line 206 of file SCR_TerrainHelper.c.

Member Data Documentation

◆ MAX_TRACE_LENGTH

const float SCR_TerrainHelper::MAX_TRACE_LENGTH = 100
staticprotected

Definition at line 3 of file SCR_TerrainHelper.c.


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