BIS fnc terrainGradAngle: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(Page filling)
Line 1: Line 1:
 
{{Function|Comments=
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________


| arma3 |= Game name
| arma3 |Game name=


|1.00|= Game version
|1.00|Game version=
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>/************************************************************
| Returns the gradient angle (in radians) of the terrain at a specified position and a compass direction.
Terrain Gradient Angle
It is an angle of the slope of a tangent plane to the terrain at the specified position in the specified direction. |Description=
____________________________________________________________________________________________


Description:
| <!-- [object, direction, delta] call [[BIS_fnc_terrainGradAngle]]; --> |Syntax=
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:
|p1= object: [[Object]] or [[Position]] |Parameter 1=
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:  
|p2= direction: [[Number]] - direction where should be gradient calculated (compass direction) |Parameter 2=
NUMBER


Example: [getPos player, getDir player] call BIS_fnc_terrainGradAngle
|p3= delta: [[Number]] - which stepsize should be used |Parameter 3=
*************************************************************/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
| [[Number]] - gradient angle in radians |Return value=
____________________________________________________________________________________________
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_terrainGradAngle]]; --> |= Syntax
|x1= <code>_radGrad = <nowiki>[</nowiki>[[getPos]] [[player]], [[getDir]] [[player]]] [[call]] [[BIS_fnc_terrainGradAngle]];</code> |Example 1=
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=
| [[getDir]], [[surfaceNormal]] |See also=
____________________________________________________________________________________________
 
| |= See also
 
}}
}}


Line 50: Line 36:


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>
[[Category:Functions|{{uc:terrainGradAngle}}]]
[[Category:Function Group: Geometry|{{uc:terrainGradAngle}}]]
[[Category:Function Group: Geometry|{{uc:terrainGradAngle}}]]
[[Category:Functions|{{uc:terrainGradAngle}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:terrainGradAngle}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:terrainGradAngle}}]]

Revision as of 15:34, 6 June 2018

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:
Uncategorised

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:
_radGrad = [getPos player, getDir player] call BIS_fnc_terrainGradAngle;

Additional Information

See also:
getDirsurfaceNormal

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

Notes

Bottom Section