Jump to content

GetScaleDrawTable

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: GetScaleDrawTable
Function Description: Takes a vector position and a table of points to scale and convert to world coordinates, returning a scaled and positioned table for drawing purposes with optional scaling and center adjustment.
File Location: cmm.markerFunctions.lua
Syntax: CMM.GetScaleDrawTable( table vec3 , table pointTBL , number or nil scale )
Return Value: table or nil
Parameters: Name Description
vec3A vec3 table containing x, y, z values where x and z are used for world positioning, y is ignored.
pointTBLA table of points to scale, each entry has x and z fields; may include a center entry for center point scaling.
scaleThe scale factor to apply to all points; defaults to 1 if not provided.
Example: CMM.GetScaleDrawTable({x=100, y=50, z=200}, PointTable, 2)
Example Description: Scales points by a factor of 2 and positions them relative to the world origin at (100, 50, 200), returning a table with adjusted coordinates and center point.
Related Functions:
Notes: