![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The IAtlas resource object interface.
An atlas resource contains a number of structures, each storing both a coordinate and a corresponding texture coordinate rectangle, which define the actual size of e.g. a plane on screen together with its corresponding sub-region of a texture. Note that there is no texture image actually stored within the atlas resource. When using the atlas for rendering, a corresponding Resource::IImage must be used for a separate texture to produce the correct output.
Get the atlas' horizontal texture reference size, or 0 if undefined.
Integer GetTextureSizeX()
Get the atlas' vertical texture reference size, or 0 if undefined.
Integer GetTextureSizeY()
Get the total number of rectangles stored in this resource.
Integer GetNumberOfRectangles()
Get the index of a rectangle with a given name.
Integer GetRectangleIndex(String rectangleName)
rectangleName | The name of the rectangle to query. |
Get the name of a rectangle at a given index.
String GetRectangleName(Integer rectangleIndex)
rectangleIndex | The zero-based index of the rectangle, in the range from 0 to GetNumberOfRectangles()-1. |
Get the rectangle at a given index.
Murl.Resource.IRectangle GetRectangle(Integer rectangleIndex)
rectangleIndex | The index in the range from 0 to GetNumberOfRectangles()-1. |
Get the extended (i.e. uncropped) rectangle at a given index.
Murl.Resource.IRectangle GetExtendedRectangle(Integer rectangleIndex)
rectangleIndex | The index in the range from 0 to GetNumberOfRectangles()-1. |
Get the cropped rectangle at a given index.
Murl.Resource.IRectangle GetCroppedRectangle(Integer rectangleIndex)
rectangleIndex | The index in the range from 0 to GetNumberOfRectangles()-1. |
Get the material slot of a rectangle at a given index.
Integer GetRectangleMaterialSlot(Integer rectangleIndex)
rectangleIndex | The index in the range from 0 to GetNumberOfRectangles()-1. |
Get the parameters slot of a rectangle at a given index.
Integer GetRectangleParametersSlot(Integer rectangleIndex)
rectangleIndex | The index in the range from 0 to GetNumberOfRectangles()-1. |
Get the texture slot of a rectangle at a given index.
Integer GetRectangleTextureSlot(Integer rectangleIndex)
rectangleIndex | The index in the range from 0 to GetNumberOfRectangles()-1. |
Get the horizontal texture reference size for a given rectangle.
Integer GetRectangleTextureSizeX(Integer rectangleIndex)
rectangleIndex | The index in the range from 0 to GetNumberOfRectangles()-1. |
Get the vertical texture reference size for a given rectangle.
Integer GetRectangleTextureSizeY(Integer rectangleIndex)
rectangleIndex | The index in the range from 0 to GetNumberOfRectangles()-1. |
Check if a given rectangle is rotated by 90 degrees in counter-clockwise direction.
Integer IsRectangleRotated(Integer rectangleIndex)
rectangleIndex | The index in the range from 0 to GetNumberOfRectangles()-1. |