The IAtlas resource object interface. More...
#include "murl_resource_i_atlas.h"
Classes | |
struct | Iff |
IFF file specific structs. More... | |
struct | Raw |
Raw data structs. More... | |
Public Member Functions | |
virtual IObject * | GetObjectInterface ()=0 |
Get the mutable Resource::IObject interface. More... | |
virtual const IObject * | GetObjectInterface () const =0 |
Get the constant Resource::IObject interface. More... | |
virtual UInt32 | GetTextureSizeX () const =0 |
Get the atlas' horizontal texture reference size, or 0 if undefined. More... | |
virtual UInt32 | GetTextureSizeY () const =0 |
Get the atlas' vertical texture reference size, or 0 if undefined. More... | |
virtual UInt32 | GetNumberOfRectangles () const =0 |
Get the total number of rectangles stored in this resource. More... | |
virtual SInt32 | GetRectangleIndex (const Char *rectangleName) const =0 |
Get the index of a rectangle with a given name. More... | |
virtual const Char * | GetRectangleName (UInt32 rectangleIndex) const =0 |
Get the name of a rectangle at a given index. More... | |
virtual const IRectangle * | GetRectangle (UInt32 rectangleIndex) const =0 |
Get the rectangle at a given index. More... | |
virtual const IRectangle * | GetExtendedRectangle (UInt32 rectangleIndex) const =0 |
Get the extended (i.e. More... | |
virtual const IRectangle * | GetCroppedRectangle (UInt32 rectangleIndex) const =0 |
Get the cropped rectangle at a given index. More... | |
virtual SInt32 | GetRectangleMaterialSlot (UInt32 rectangleIndex) const =0 |
Get the material slot of a rectangle at a given index. More... | |
virtual SInt32 | GetRectangleParametersSlot (UInt32 rectangleIndex) const =0 |
Get the parameters slot of a rectangle at a given index. More... | |
virtual SInt32 | GetRectangleTextureSlot (UInt32 rectangleIndex) const =0 |
Get the texture slot of a rectangle at a given index. More... | |
virtual UInt32 | GetRectangleTextureSizeX (UInt32 rectangleIndex) const =0 |
Get the horizontal texture reference size for a given rectangle. More... | |
virtual UInt32 | GetRectangleTextureSizeY (UInt32 rectangleIndex) const =0 |
Get the vertical texture reference size for a given rectangle. More... | |
virtual UInt32 | IsRectangleRotated (UInt32 rectangleIndex) const =0 |
Check if a given rectangle is rotated by 90 degrees in counter-clockwise direction. More... | |
Detailed Description
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.
Member Function Documentation
◆ GetObjectInterface() [1/2]
|
pure virtual |
Get the mutable Resource::IObject interface.
- Returns
- The IObject interface.
◆ GetObjectInterface() [2/2]
|
pure virtual |
Get the constant Resource::IObject interface.
- Returns
- The IObject interface.
◆ GetTextureSizeX()
|
pure virtual |
Get the atlas' horizontal texture reference size, or 0 if undefined.
- Returns
- The horizontal reference size.
◆ GetTextureSizeY()
|
pure virtual |
Get the atlas' vertical texture reference size, or 0 if undefined.
- Returns
- The vertical reference size.
◆ GetNumberOfRectangles()
|
pure virtual |
Get the total number of rectangles stored in this resource.
- Returns
- The number of rectangles.
◆ GetRectangleIndex()
|
pure virtual |
Get the index of a rectangle with a given name.
- Parameters
-
rectangleName The name of the rectangle to query.
- Returns
- The zero-based index of the rectangle, or -1 if not found.
◆ GetRectangleName()
|
pure virtual |
Get the name of a rectangle at a given index.
- Parameters
-
rectangleIndex The zero-based index of the rectangle, in the range from 0 to GetNumberOfRectangles()-1.
- Returns
- The name of the rectangle, or null if the index was out of range.
◆ GetRectangle()
|
pure virtual |
Get the rectangle at a given index.
- Parameters
-
rectangleIndex The index in the range from 0 to GetNumberOfRectangles()-1.
- Returns
- A pointer to the rectangle, or null if index is out of bounds.
◆ GetExtendedRectangle()
|
pure virtual |
Get the extended (i.e.
uncropped) rectangle at a given index.
- Parameters
-
rectangleIndex The index in the range from 0 to GetNumberOfRectangles()-1.
- Returns
- A pointer to the rectangle, or null if index is out of bounds.
◆ GetCroppedRectangle()
|
pure virtual |
Get the cropped rectangle at a given index.
- Parameters
-
rectangleIndex The index in the range from 0 to GetNumberOfRectangles()-1.
- Returns
- A pointer to the rectangle, or null if index is out of bounds.
◆ GetRectangleMaterialSlot()
|
pure virtual |
Get the material slot of a rectangle at a given index.
- Parameters
-
rectangleIndex The index in the range from 0 to GetNumberOfRectangles()-1.
- Returns
- The slot, or -1 if not set or index is out of bounds.
◆ GetRectangleParametersSlot()
|
pure virtual |
Get the parameters slot of a rectangle at a given index.
- Parameters
-
rectangleIndex The index in the range from 0 to GetNumberOfRectangles()-1.
- Returns
- The slot, or -1 if not set or index is out of bounds.
◆ GetRectangleTextureSlot()
|
pure virtual |
Get the texture slot of a rectangle at a given index.
- Parameters
-
rectangleIndex The index in the range from 0 to GetNumberOfRectangles()-1.
- Returns
- The slot, or -1 if not set or index is out of bounds.
◆ GetRectangleTextureSizeX()
|
pure virtual |
Get the horizontal texture reference size for a given rectangle.
- Parameters
-
rectangleIndex The index in the range from 0 to GetNumberOfRectangles()-1.
- Returns
- The horizontal reference size.
◆ GetRectangleTextureSizeY()
|
pure virtual |
Get the vertical texture reference size for a given rectangle.
- Parameters
-
rectangleIndex The index in the range from 0 to GetNumberOfRectangles()-1.
- Returns
- The vertical reference size.
◆ IsRectangleRotated()
|
pure virtual |
Check if a given rectangle is rotated by 90 degrees in counter-clockwise direction.
- Parameters
-
rectangleIndex The index in the range from 0 to GetNumberOfRectangles()-1.
- Returns
- true if rotated.
The documentation for this interface was generated from the following file:
- murl_resource_i_atlas.h