The IAtlas resource object interface. More...

#include "murl_resource_i_atlas.h"

Inheritance diagram for Murl::Resource::IAtlas:

Classes

struct  Iff
 IFF file specific structs. More...
 
struct  Raw
 Raw data structs. More...
 

Public Member Functions

virtual IObjectGetObjectInterface ()=0
 Get the mutable Resource::IObject interface. More...
 
virtual const IObjectGetObjectInterface () 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 CharGetRectangleName (UInt32 rectangleIndex) const =0
 Get the name of a rectangle at a given index. More...
 
virtual const IRectangleGetRectangle (UInt32 rectangleIndex) const =0
 Get the rectangle at a given index. More...
 
virtual const IRectangleGetExtendedRectangle (UInt32 rectangleIndex) const =0
 Get the extended (i.e. More...
 
virtual const IRectangleGetCroppedRectangle (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]

virtual IObject* Murl::Resource::IAtlas::GetObjectInterface ( )
pure virtual

Get the mutable Resource::IObject interface.

Returns
The IObject interface.

◆ GetObjectInterface() [2/2]

virtual const IObject* Murl::Resource::IAtlas::GetObjectInterface ( ) const
pure virtual

Get the constant Resource::IObject interface.

Returns
The IObject interface.

◆ GetTextureSizeX()

virtual UInt32 Murl::Resource::IAtlas::GetTextureSizeX ( ) const
pure virtual

Get the atlas' horizontal texture reference size, or 0 if undefined.

Returns
The horizontal reference size.

◆ GetTextureSizeY()

virtual UInt32 Murl::Resource::IAtlas::GetTextureSizeY ( ) const
pure virtual

Get the atlas' vertical texture reference size, or 0 if undefined.

Returns
The vertical reference size.

◆ GetNumberOfRectangles()

virtual UInt32 Murl::Resource::IAtlas::GetNumberOfRectangles ( ) const
pure virtual

Get the total number of rectangles stored in this resource.

Returns
The number of rectangles.

◆ GetRectangleIndex()

virtual SInt32 Murl::Resource::IAtlas::GetRectangleIndex ( const Char rectangleName) const
pure virtual

Get the index of a rectangle with a given name.

Parameters
rectangleNameThe name of the rectangle to query.
Returns
The zero-based index of the rectangle, or -1 if not found.

◆ GetRectangleName()

virtual const Char* Murl::Resource::IAtlas::GetRectangleName ( UInt32  rectangleIndex) const
pure virtual

Get the name of a rectangle at a given index.

Parameters
rectangleIndexThe 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()

virtual const IRectangle* Murl::Resource::IAtlas::GetRectangle ( UInt32  rectangleIndex) const
pure virtual

Get the rectangle at a given index.

Parameters
rectangleIndexThe index in the range from 0 to GetNumberOfRectangles()-1.
Returns
A pointer to the rectangle, or null if index is out of bounds.

◆ GetExtendedRectangle()

virtual const IRectangle* Murl::Resource::IAtlas::GetExtendedRectangle ( UInt32  rectangleIndex) const
pure virtual

Get the extended (i.e.

uncropped) rectangle at a given index.

Parameters
rectangleIndexThe index in the range from 0 to GetNumberOfRectangles()-1.
Returns
A pointer to the rectangle, or null if index is out of bounds.

◆ GetCroppedRectangle()

virtual const IRectangle* Murl::Resource::IAtlas::GetCroppedRectangle ( UInt32  rectangleIndex) const
pure virtual

Get the cropped rectangle at a given index.

Parameters
rectangleIndexThe index in the range from 0 to GetNumberOfRectangles()-1.
Returns
A pointer to the rectangle, or null if index is out of bounds.

◆ GetRectangleMaterialSlot()

virtual SInt32 Murl::Resource::IAtlas::GetRectangleMaterialSlot ( UInt32  rectangleIndex) const
pure virtual

Get the material slot of a rectangle at a given index.

Parameters
rectangleIndexThe index in the range from 0 to GetNumberOfRectangles()-1.
Returns
The slot, or -1 if not set or index is out of bounds.

◆ GetRectangleParametersSlot()

virtual SInt32 Murl::Resource::IAtlas::GetRectangleParametersSlot ( UInt32  rectangleIndex) const
pure virtual

Get the parameters slot of a rectangle at a given index.

Parameters
rectangleIndexThe index in the range from 0 to GetNumberOfRectangles()-1.
Returns
The slot, or -1 if not set or index is out of bounds.

◆ GetRectangleTextureSlot()

virtual SInt32 Murl::Resource::IAtlas::GetRectangleTextureSlot ( UInt32  rectangleIndex) const
pure virtual

Get the texture slot of a rectangle at a given index.

Parameters
rectangleIndexThe index in the range from 0 to GetNumberOfRectangles()-1.
Returns
The slot, or -1 if not set or index is out of bounds.

◆ GetRectangleTextureSizeX()

virtual UInt32 Murl::Resource::IAtlas::GetRectangleTextureSizeX ( UInt32  rectangleIndex) const
pure virtual

Get the horizontal texture reference size for a given rectangle.

Parameters
rectangleIndexThe index in the range from 0 to GetNumberOfRectangles()-1.
Returns
The horizontal reference size.

◆ GetRectangleTextureSizeY()

virtual UInt32 Murl::Resource::IAtlas::GetRectangleTextureSizeY ( UInt32  rectangleIndex) const
pure virtual

Get the vertical texture reference size for a given rectangle.

Parameters
rectangleIndexThe index in the range from 0 to GetNumberOfRectangles()-1.
Returns
The vertical reference size.

◆ IsRectangleRotated()

virtual UInt32 Murl::Resource::IAtlas::IsRectangleRotated ( UInt32  rectangleIndex) const
pure virtual

Check if a given rectangle is rotated by 90 degrees in counter-clockwise direction.

Parameters
rectangleIndexThe 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


Copyright © 2011-2024 Spraylight GmbH.