![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
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.
Murl.Graph.IDrawable
Murl.Graph.IScalable
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()
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()
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)
item | The item to add. |
Remove an attribute item frome the plane's vertex data prior to initialization. See AddAttribute().
Boolean RemoveAttribute(Murl.IEnums.AttributeItem item)
item | The item to remove. |
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)
sizeX | The horizontal (X, or U) texture coordinate reference size. |
sizeY | The vertical (Y, or V) texture coordinate reference size. |
index | The index of the texture coordinate set. |
Set the horizontal texture reference size. See SetTextureSize().
Boolean SetTextureSizeX(Number sizeX, Integer index)
sizeX | The horizontal (X, or U) texture coordinate reference size. |
index | The index of the texture coordinate set. |
Set the vertical texture reference size. See SetTextureSize().
Boolean SetTextureSizeY(Number sizeY, Integer index)
sizeY | The vertical (Y, or V) texture coordinate reference size. |
index | The index of the texture coordinate set. |
Get the horizontal texture reference size. See SetTextureSize().
Number GetTextureSizeX(Integer index)
index | The index of the texture coordinate set. |
Get the vertical texture reference size. See SetTextureSize().
Number GetTextureSizeY(Integer index)
index | The index of the texture coordinate set. |
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)
x1 | The start coordinate in X direction. |
y1 | The start coordinate in Y direction. |
x2 | The end coordinate in X direction. |
y2 | The end coordinate in Y direction. |
index | The index of the texture coordinate set. |
Set the plane's start texture coordinates. See SetTexCoord().
Boolean SetTexCoord1(Number x1, Number y1, Integer index)
x1 | The start coordinate in X direction. |
y1 | The start coordinate in Y direction. |
index | The index of the texture coordinate set. |
Set the plane's end texture coordinates. See SetTexCoord().
Boolean SetTexCoord2(Number x2, Number y2, Integer index)
x2 | The end coordinate in X direction. |
y2 | The end coordinate in Y direction. |
index | The index of the texture coordinate set. |
Set the plane's horizontal start texture coordinate. See SetTexCoord().
Boolean SetTexCoordX1(Number x1, Integer index)
x1 | The start coordinate in X direction. |
index | The index of the texture coordinate set. |
Set the plane's vertical start texture coordinates. See SetTexCoord().
Boolean SetTexCoordY1(Number y1, Integer index)
y1 | The start coordinate in Y direction. |
index | The index of the texture coordinate set. |
Set the plane's horizontal end texture coordinate. See SetTexCoord().
Boolean SetTexCoordX2(Number x2, Integer index)
x2 | The end coordinate in X direction. |
index | The index of the texture coordinate set. |
Set the plane's vertical end texture coordinates. See SetTexCoord().
Boolean SetTexCoordY2(Number y2, Integer index)
y2 | The end coordinate in Y direction. |
index | The index of the texture coordinate set. |
Get the plane's horizontal start texture coordinate. See SetTexCoord().
Number GetTexCoordX1(Integer index)
index | The index of the texture coordinate set. |
Get the plane's vertical start texture coordinate. See SetTexCoord().
Number GetTexCoordY1(Integer index)
index | The index of the texture coordinate set. |
Get the plane's horizontal end texture coordinate. See SetTexCoord().
Number GetTexCoordX2(Integer index)
index | The index of the texture coordinate set. |
Get the plane's vertical end texture coordinate. See SetTexCoord().
Number GetTexCoordY2(Integer index)
index | The index of the texture coordinate set. |
Set the size of the display rectangle.
Boolean SetFrameSize(Number sizeX, Number sizeY)
sizeX | The rectangle width. |
sizeY | The rectangle height. |
Set the width of the display rectangle.
Boolean SetFrameSizeX(Number sizeX)
sizeX | The rectangle width. |
Set the height of the display rectangle.
Boolean SetFrameSizeY(Number sizeY)
sizeY | The rectangle height. |
Get the width of the display rectangle.
Number GetFrameSizeX()
Get the height of the display rectangle.
Number GetFrameSizeY()
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)
alignmentX | The horizontal container alignment. |
alignmentY | The vertical container alignment. |
Set the horizontal container alignment. See SetContainerAlignment().
Boolean SetContainerAlignmentX(Murl.IEnums.AlignmentX alignmentX)
alignmentX | The horizontal container alignment. |
Set the vertical container alignment. See SetContainerAlignment().
Boolean SetContainerAlignmentY(Murl.IEnums.AlignmentY alignmentY)
alignmentY | The vertical container alignment. |
Get the horizontal container alignment.
Murl.IEnums.AlignmentX GetContainerAlignmentX()
Get the vertical container alignment.
Murl.IEnums.AlignmentY GetContainerAlignmentY()
Set the horizontal and vertical borders used for alignment.
Boolean SetBorder(Number borderX, Number borderY)
borderX | The horizontal border. |
borderY | The vertical border. |
Set the horizontal border used for alignment.
Boolean SetBorderX(Number borderX)
borderX | The horizontal border. |
Set the vertical border used for alignment.
Boolean SetBorderY(Number borderY)
borderY | The vertical border. |
Get the horizontal border used for alignment.
Number GetBorderX()
Get the vertical border used for alignment.
Number GetBorderY()