Computes worldspace normals from the elevation data contained in the <Float32Array> submitted to this function.
int32 ComputeWorldspaceNormals( Float32Array p_afElevationData, Int32Array p_aiParams, Float32Array p_afSpacing, Float64VectorArray p_avNormals )
Parameter Type | Parameter Name | Documentation |
---|---|---|
<Float32Array> | p_afElevationData | A pointer to a <Float32Array> containing the elevation data. |
<Int32Array> | p_aiParams | An <Int32Array> containing the parameters used to generate the worldspace normals. This <Int32Array> must contain two values. The first value represents the dimension of the elevation data on the x axis, and the second value contains the dimension of the elevation data on the y axis. Both these values are in samples/pixels. Be careful not to reverse the x and y values. |
<Float32Array> | p_afSpacing | A pointer to a <Float32Array> that contains the distance between each sample on the x axis and y axis. Be careful not to reverse the x and y values. |
<Float64VectorArray> | p_avNormals | A <Float64VectorArray> that contains the computed normals. You can pass in a non-null zero count array and this function will allocate enough storage for the normals. Alternatively, you can pre-allocate enough storage if you need precise control over when memory allocation occurs. |
None published. Please look for an example in the Scenome Scripting Language code base.