Bcc.TransformPoint
Bcc.TransformPoint({point}, {matrix})
Description
Get the resulting point by transforming the input point with a 4x4 matrix
Parameters
The primary input of this function is a Table which can include the following keys:
- point - table of X, Y, Z positions of input point: point={x,y,z}
- matrix - table representing the transform matrix: matrix={{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}}
Return
Returns a table containing the new point in the format: result={x,y,z}
Examples
The following example shows rotating a point at X=1.5, Y=1.5, Z=0 by 90 degrees around the Z axis at the origin.
point = {1.5,1.5,0}
matrix = {{0,1,0,0},{-1,0,0,0},{0,0,1,0},{0,0,0,1}}
newPoint = Bcc.TransformPoint(point,matrix)
The resulting newPoint will contain:
newPoint = {-1.5,-1.5,0}