Murl Engine Lua Addon API  Version 1.0 beta
Murl.Graph.IHeightField

The IHeightField graph node interface.

This interface represents a generic height field, which consists of a rectangular data set representing discrete points in the XZ plane with exactly one elevation value at a given XZ coordinate.


Table members

Methods


GetNodeInterface()

Get the constant Graph::INode interface. This method returns a constant pointer to the node's Graph::INode interface, to be able to query common node properties such as active state, visibility or ID.

Murl.Graph.INode GetNodeInterface()

Returns
Murl.Graph.INode The constant Graph::INode interface, or null if not available

GetFieldSizeX()

Get the height field's extent along the X axis.

Number GetFieldSizeX()

Returns
Number The X dimension of the height field.

GetFieldSizeZ()

Get the height field's extent along the Z axis.

Number GetFieldSizeZ()

Returns
Number The Z dimension of the height field.

GetFieldElevation(posX, posZ)

Get the height field's elevation (Y coordinate) for a given XZ coordinate.

Number GetFieldElevation(Number posX, Number posZ)

Parameters
posXThe X coordinate to query.
posZThe Z coordinate to query.
Returns
Number The (interpolated) Y elevation at the given XZ coordinate.