BIS fnc terrainGradAngle: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Text replacement - "= <code>([^<{]+)<\/code>" to "= <sqf>$1</sqf>")
 
(31 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= Geometry


|1.00|= Game version
|descr= Returns the gradient angle (in radians) of the terrain at a specified position and a compass direction.
____________________________________________________________________________________________
It is an angle of the slope of a tangent plane to the terrain at the specified position in the specified direction.


| <pre>/************************************************************
|s1= <!-- [object, direction, delta] call [[BIS_fnc_terrainGradAngle]]; -->
Terrain Gradient Angle


Description:  
|p1= object: [[Object]] or [[Position]]
Returns the gradient angle (in radians) of the terrain at a specified position and a compass direction. It is an angle of the slope of a tangent plane to the terrain at the specified position in the specified direction.


Parameters:
|p2= direction: [[Number]] - direction where should be gradient calculated (compass direction)
0: OBJECT or ARRAY - object or its position
1: NUMBER - direction where should be gradient calculated (compass direction)
2: NUMBER (optional) - which stepsize should be used


Returns:  
|p3= delta: [[Number]] - which stepsize should be used
NUMBER


Example: [getPos player, getDir player] call BIS_fnc_terrainGradient
|r1= [[Number]] - gradient angle in radians
*************************************************************/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|x1= <sqf>private _radGrad = [getPos player, getDir player] call BIS_fnc_terrainGradAngle;</sqf>
____________________________________________________________________________________________
 
| <!-- [] call [[BIS_fnc_terrainGradAngle]]; --> |= Syntax
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[getDir]] [[surfaceNormal]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Geometry|{{uc:terrainGradAngle}}]]
[[Category:Functions|{{uc:terrainGradAngle}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:terrainGradAngle}}]]

Latest revision as of 17:00, 13 July 2022

Hover & click on the images for description

Description

Description:
Returns the gradient angle (in radians) of the terrain at a specified position and a compass direction. It is an angle of the slope of a tangent plane to the terrain at the specified position in the specified direction.
Execution:
call
Groups:
Geometry

Syntax

Syntax:
Syntax needed
Parameters:
object: Object or Position
direction: Number - direction where should be gradient calculated (compass direction)
delta: Number - which stepsize should be used
Return Value:
Number - gradient angle in radians

Examples

Example 1:
private _radGrad = [getPos player, getDir player] call BIS_fnc_terrainGradAngle;

Additional Information

See also:
getDir surfaceNormal

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note