ComputeFilteredNormals Data Member Function

Computes normalized normals from floating point elevation data.

Prototype

int32 ComputeFilteredNormals( Float32Array p_afElevationData, Float64VectorArray p_avNormals, Image p_oImage, double p_dElevationSpacingX, double p_dElevationSpacingY )

Parameters

Parameter Type Parameter Name Documentation
<Float32Array>p_afElevationDataA pointer to a <Float32Array> that contains the elevation data.
<Float64VectorArray>p_avNormalsA pointer to a <Float64VectorArray> that will contain the computed normals. You can pass in a non-null zero count array and this function will allocate sufficient storage. Alternatively, you can pre-allocate enough storage if you need precise control over when memory allocation occurs.
<Image>p_oImageA pointer to an <Image> that defines the x and y dimensions ( in samples/pixels ) of the elevation data. The x and y dimensions of the <Image> must match the dimensions of the elevation data, and be careful not to reverse the x dimension and y dimensions. Typically when using this function, you have an <Image> object that represents the normal map you wish to save to disk. This is the <Image> object you should pass to this function. If your use case is different, use a correctly formatted temporary <Image> object instead.
doublep_dElevationSpacingXA <float64> representing the worldspace distance between elevation samples on the x axis.
doublep_dElevationSpacingYA <float64> representing the worldspace distance between elevation samples on the y axis.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.