![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The IPlaneSequenceGeometry graph node interface.
This interface represents a flat rectangular geometry object (quad) in world space that retrieves its actual size and texture coordinates from a given Resource::IAtlas object.
Use the Graph::IIndexed base interface to access the individual rectangles stored in the referenced resource atlas.
Use the Graph::IScalable base interface to set an overall scaling factor for the geometry.
See Graph::IPlaneGeometry for a non-animated version.
Murl.Graph.IDrawable
Murl.Graph.IIndexed
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()
Get a constant Graph::IAtlasResourceTarget container. This method returns a constant pointer to a Graph::IAtlasResourceTarget container, which allows to query the atlas resources referenced by a node implementing this interface.
Murl.Graph.IGenericResourceTarget.ResourceIAtlas GetAtlasResourceTarget()
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. Note, that it may also be necessary to set these values depending on the actual texture coordinates stored in the Resource::IAtlas that is referenced; it is often desired to store an atlas' texture coordinates with an already present scale factor. 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. An IPlaneSequenceGeometry directly takes the texture coordinates for set #0 from the given atlas resource, so this method only accepts the value 1 for the index parameter to set texture coordinates for set #1 (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. |
Get the width of the currently displayed atlas rectangle.
Number GetFrameSizeX()
Get the width of a given atlas rectangle.
Number GetFrameSizeX(Integer frameIndex)
frameIndex | The zero-based index into the referenced atlas resource's rectangles. |
Get the height of the currently displayed atlas rectangle.
Number GetFrameSizeY()
Get the height of a given atlas rectangle.
Number GetFrameSizeY(Integer frameIndex)
frameIndex | The zero-based index into the referenced atlas resource's rectangles. |
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()
Set the current atlas rectangle by name. If the given name is empty, the rectangle is explicitly set via a given index (see SetIndex()). This method fails if no atlas resource is set, or the given name is not found within the atlas resource.
Boolean SetRectangleName(String rectangleName)
rectangleName | The rectangle name. |
Get the current rectangle's name. This method returns an empty string when no atlas resource is defined or the currently active rectangle is unnamed.
String GetRectangleName()