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

The IPlaneGeometry graph node interface.

This interface represents a flat rectangular geometry object (quad) in world space, with unit size dimensions around the origin and given texture coordinates.

Use the Graph::IScalable base interface to set an overall scaling factor for the plane, i.e. define its actual size.

See Graph::IPlaneSequenceGeometry for an animated version.


Table members

Inherited


Murl.Graph.IDrawable
Murl.Graph.IScalable

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

GetTransformInterface()

Get the constant Graph::ITransform interface. This method returns a constant pointer to the node's Graph::ITransform interface, to be able to query the node's transformation matrix and depth order.

Murl.Graph.ITransform GetTransformInterface()

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

AddAttribute(item)

Add an attribute item to the plane's vertex data prior to initialization. This method allows to add one of the available attribute items to the plane's internal vertex buffer. Available items from the IEnums::AttributeItem enum are NORMAL, BINORMAL, TANGENT, COLOR, TEXCOORD_0 and TEXCOORD_1. The item COORD is always present, and by default also TEXCOORD_0 is active. See also RemoveAttribute() to unset the latter one.

Boolean AddAttribute(Murl.IEnums.AttributeItem item)

Parameters
itemThe item to add.
Returns
Boolean true if successful.

RemoveAttribute(item)

Remove an attribute item frome the plane's vertex data prior to initialization. See AddAttribute().

Boolean RemoveAttribute(Murl.IEnums.AttributeItem item)

Parameters
itemThe item to remove.
Returns
Boolean true if successful.

SetTextureSize(sizeX, sizeY, index)

Set the texture reference size. Generally, texture coordinates are represented by values ranging from 0.0 to 1.0. As a convenience, this method can be used to set an arbitrary reference size for both dimensions of the plane; this way it is possible to specify integer (pixel) values instead of (quite unreadable) floats. For example, if a 256x128 texture is to be used when rendering this plane, a sizeX value of 256 and sizeY value of 128 directly maps incoming integer texture coordinates to whole texture pixels. Use the index parameter to specify the actual set of texture coordinates for which to set the reference size, either 0 for TEXCOORD_0 or 1 for TEXCOORD_1.

Boolean SetTextureSize(Number sizeX, Number sizeY, Integer index)

Parameters
sizeXThe horizontal (X, or U) texture coordinate reference size.
sizeYThe vertical (Y, or V) texture coordinate reference size.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetTextureSizeX(sizeX, index)

Set the horizontal texture reference size. See SetTextureSize().

Boolean SetTextureSizeX(Number sizeX, Integer index)

Parameters
sizeXThe horizontal (X, or U) texture coordinate reference size.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetTextureSizeY(sizeY, index)

Set the vertical texture reference size. See SetTextureSize().

Boolean SetTextureSizeY(Number sizeY, Integer index)

Parameters
sizeYThe vertical (Y, or V) texture coordinate reference size.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

GetTextureSizeX(index)

Get the horizontal texture reference size. See SetTextureSize().

Number GetTextureSizeX(Integer index)

Parameters
indexThe index of the texture coordinate set.
Returns
Number The horizontal (X, or U) texture coordinate reference size.

GetTextureSizeY(index)

Get the vertical texture reference size. See SetTextureSize().

Number GetTextureSizeY(Integer index)

Parameters
indexThe index of the texture coordinate set.
Returns
Number The vertical (Y, or V) texture coordinate reference size.

SetTexCoord(x1, y1, x2, y2, index)

Set the plane's texture coordinates. This method sets the plane's start and end texture coordinates, to allow for rendering only part of the currently active texture on the plane. All given texture coordinate values are divided by their respective reference sizes (See SetTextureSize() for description), before they are actually applied for rendering. Use the index parameter to specify the actual set of texture coordinates to modify, either 0 for TEXCOORD_0 or 1 for TEXCOORD_1.

Boolean SetTexCoord(Number x1, Number y1, Number x2, Number y2, Integer index)

Parameters
x1The start coordinate in X direction.
y1The start coordinate in Y direction.
x2The end coordinate in X direction.
y2The end coordinate in Y direction.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetTexCoord1(x1, y1, index)

Set the plane's start texture coordinates. See SetTexCoord().

Boolean SetTexCoord1(Number x1, Number y1, Integer index)

Parameters
x1The start coordinate in X direction.
y1The start coordinate in Y direction.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetTexCoord2(x2, y2, index)

Set the plane's end texture coordinates. See SetTexCoord().

Boolean SetTexCoord2(Number x2, Number y2, Integer index)

Parameters
x2The end coordinate in X direction.
y2The end coordinate in Y direction.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetTexCoordX1(x1, index)

Set the plane's horizontal start texture coordinate. See SetTexCoord().

Boolean SetTexCoordX1(Number x1, Integer index)

Parameters
x1The start coordinate in X direction.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetTexCoordY1(y1, index)

Set the plane's vertical start texture coordinates. See SetTexCoord().

Boolean SetTexCoordY1(Number y1, Integer index)

Parameters
y1The start coordinate in Y direction.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetTexCoordX2(x2, index)

Set the plane's horizontal end texture coordinate. See SetTexCoord().

Boolean SetTexCoordX2(Number x2, Integer index)

Parameters
x2The end coordinate in X direction.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

SetTexCoordY2(y2, index)

Set the plane's vertical end texture coordinates. See SetTexCoord().

Boolean SetTexCoordY2(Number y2, Integer index)

Parameters
y2The end coordinate in Y direction.
indexThe index of the texture coordinate set.
Returns
Boolean true if successful.

GetTexCoordX1(index)

Get the plane's horizontal start texture coordinate. See SetTexCoord().

Number GetTexCoordX1(Integer index)

Parameters
indexThe index of the texture coordinate set.
Returns
Number The start coordinate in X direction.

GetTexCoordY1(index)

Get the plane's vertical start texture coordinate. See SetTexCoord().

Number GetTexCoordY1(Integer index)

Parameters
indexThe index of the texture coordinate set.
Returns
Number The start coordinate in Y direction.

GetTexCoordX2(index)

Get the plane's horizontal end texture coordinate. See SetTexCoord().

Number GetTexCoordX2(Integer index)

Parameters
indexThe index of the texture coordinate set.
Returns
Number The end coordinate in X direction.

GetTexCoordY2(index)

Get the plane's vertical end texture coordinate. See SetTexCoord().

Number GetTexCoordY2(Integer index)

Parameters
indexThe index of the texture coordinate set.
Returns
Number The end coordinate in Y direction.

SetFrameSize(sizeX, sizeY)

Set the size of the display rectangle.

Boolean SetFrameSize(Number sizeX, Number sizeY)

Parameters
sizeXThe rectangle width.
sizeYThe rectangle height.
Returns
Boolean true if successful.

SetFrameSizeX(sizeX)

Set the width of the display rectangle.

Boolean SetFrameSizeX(Number sizeX)

Parameters
sizeXThe rectangle width.
Returns
Boolean true if successful.

SetFrameSizeY(sizeY)

Set the height of the display rectangle.

Boolean SetFrameSizeY(Number sizeY)

Parameters
sizeYThe rectangle height.
Returns
Boolean true if successful.

GetFrameSizeX()

Get the width of the display rectangle.

Number GetFrameSizeX()

Returns
Number The rectangle width.

GetFrameSizeY()

Get the height of the display rectangle.

Number GetFrameSizeY()

Returns
Number The rectangle height.

SetContainerAlignment(alignmentX, alignmentY)

Set the horizontal container alignment. The given alignment values specify how the text container is actually positioned with respect to the node's world position.

Boolean SetContainerAlignment(Murl.IEnums.AlignmentX alignmentX, Murl.IEnums.AlignmentY alignmentY)

Parameters
alignmentXThe horizontal container alignment.
alignmentYThe vertical container alignment.
Returns
Boolean true if successful.

SetContainerAlignmentX(alignmentX)

Set the horizontal container alignment. See SetContainerAlignment().

Boolean SetContainerAlignmentX(Murl.IEnums.AlignmentX alignmentX)

Parameters
alignmentXThe horizontal container alignment.
Returns
Boolean true if successful.

SetContainerAlignmentY(alignmentY)

Set the vertical container alignment. See SetContainerAlignment().

Boolean SetContainerAlignmentY(Murl.IEnums.AlignmentY alignmentY)

Parameters
alignmentYThe vertical container alignment.
Returns
Boolean true if successful.

GetContainerAlignmentX()

Get the horizontal container alignment.

Murl.IEnums.AlignmentX GetContainerAlignmentX()

Returns
Murl.IEnums.AlignmentX The horizontal container alignment.

GetContainerAlignmentY()

Get the vertical container alignment.

Murl.IEnums.AlignmentY GetContainerAlignmentY()

Returns
Murl.IEnums.AlignmentY The vertical container alignment.

SetBorder(borderX, borderY)

Set the horizontal and vertical borders used for alignment.

Boolean SetBorder(Number borderX, Number borderY)

Parameters
borderXThe horizontal border.
borderYThe vertical border.
Returns
Boolean true if successful.

SetBorderX(borderX)

Set the horizontal border used for alignment.

Boolean SetBorderX(Number borderX)

Parameters
borderXThe horizontal border.
Returns
Boolean true if successful.

SetBorderY(borderY)

Set the vertical border used for alignment.

Boolean SetBorderY(Number borderY)

Parameters
borderYThe vertical border.
Returns
Boolean true if successful.

GetBorderX()

Get the horizontal border used for alignment.

Number GetBorderX()

Returns
Number The horizontal border.

GetBorderY()

Get the vertical border used for alignment.

Number GetBorderY()

Returns
Number The vertical border.