JSMath
API for mathematical algorithm processing
Create Module.getMath API.
var math = Module.getMath();
convertBezierCurve(options) → JSVec3Array
Returns a list of coordinates applied with a Bezier curve through a list of latitude and longitude coordinates.
Set vertex list as argument variable.
Return
Success: JSVec3Array Returns a list of coordinates applied with Bezier algorithm.
Failure: JSVec3Array Returns size 0.
Sample
Refer to function createCurvedLine.
convertBeZierLine(options) → object
Returns a list of Bezier curve coordinates based on the start and end positions of latitude and longitude.
Set vertex list as argument variable.
Return
.result: API success status (1: Success, 0: Failure).
.name: Operating API name.
.return: API return information (object: normal return value, string: failure error code).
Sample
Refer to function createBallPath
calculationSlopeAnalysis(options) → object
Returns the result of slope analysis through a 3*3 array value (0 array top left, 9 array bottom right).
Set vertex list as argument variable.
Return
.result: API success status (1: Success, 0: Failure).
.name: Operating API name.
.return: API return information (object: normal return value, string: failure error code).
Type Definitions
JSMath.BezierCurve
Options for transforming a list of latitude and longitude coordinates with a Bezier curve.
JSMath.BezierLine
Options for transforming a list of latitude and longitude coordinates with a parabolic curve.
detail
number
optional
50
Number of interpolation points for curve creation.
height
number
optional
100
Maximum height of the curve.
percent
number
optional
50
Set the maximum height point of the curve based on 0% start position and 100% end position.
JSMath.SlopeOption
Options for slope analysis settings.
type
string
Slope analysis option (TERRAIN_ANGLE, TERRAIN_DIRECTION, TERRAIN_DIRECTION_ANGLE).
array
array
[3*3] altitude array for slope analysis.
vertical
number
optional
5
Cell vertical length needed for slope analysis (unit: m).
horizontal
number
optional
5
Cell horizontal length needed for slope analysis (unit: m).
Last updated