Skip to content
On this page

class TextureTable ​

TextureTable keeps information on textures used while rendering. Note that the table will make sure that the names of objects added are unique within the table, and will rename objects with non-unique names.

Properties ​

PropertyDescription
NameThe name of the TextureTable object. (Inherited from Object)

Methods ​

MethodDescription
AddItemAdds an item to the table. The returned value is the id of the item within the table, which can be used to retrieve the item using GetItem(). (Inherited from Table)
AddObserverAdds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
AddTextureAdds a texture to the table. The returned value is the id of the texture within the table.
ClearClears the table, and removes all items. If AddItem is called after Clear, the item ids will start over from 0. (Inherited from Table)
CopyClears the current table and copies the items from a source table. (Inherited from Table)
FindItemFinds a named item in the table. If multiple items have the same name, the first will be returned. If no item was found, null will be returned. (Inherited from Table)
FindItemIdFinds the id of an item in the table, using the name. If multiple items have the same name, the first will be returned. If no item was found, the return will be -1. (Inherited from Table)
FindTextureFinds a texture in the table, using the texture name. If multiple textures have the same name, the first will be returned. If the texture was not found, null will be returned.
FindTextureIdFinds the id of a texture in the table, using the texture name. If multiple textures have the same name, the first will be returned. If the texture was not found, -1 will be returned.
FindTextureUsingAbsoluteFilePathFinds a texture in the table, using the texture AbsoluteFilePath property. If multiple textures have the same path, the first will be returned. If the texture was not found, null will be returned.
FindTextureUsingFilePathFinds a texture in the table, using the texture FilePath property. If multiple textures have the same path, the first will be returned. If the texture was not found, null will be returned.
FindTextureUsingPathFinds a texture in the table, using the texture file path. If multiple textures have the same path, the first will be returned. If the texture was not found, null will be returned.
GetClassGet the name of the TextureTable class. (Inherited from Object)
GetItemReturns the i:th item, using the id of the item. (Inherited from Table)
GetItemsCountThe number of item id:s in the table. If an item has been removed, using RemoveItem, the id is still counted in this method. GetIdsCount also equals the id that will be applied to the next item added to the table. (Inherited from Table)
GetTextureReturns the i:th texture, using the id of the texture.
GetTexturesCountReturns the number of textures in the table.
IsAReturns true if TextureTable is a or is a descendant of the class named as the type parameter. (Inherited from Object)
IsNullReturns true if the TextureTable object is invalid. (Inherited from Object)
IsSameObjectAsReturns true if the TextureTable object is valid. (Inherited from Object)
NonNullReturns true if the TextureTable object is valid. (Inherited from Object)
PrintInfoPrints the content/info of the TextureTable object to the log. (Inherited from Object)
RemoveItemRemoves an item, and invalidates the id. The id will not point at a valid item, until Clear is called and new items are added up until the id. (Inherited from Table)
RemoveObserverRemoves a previously added observer object. (Inherited from Object)
RemoveTextureRemoves a texture. If GetTexture is called with the texture id, the value returned will be null.
SetItemSets an item in the table. The id must exist in the table. (Inherited from Table)
SetTextureSets a texture in the table.

Static methods ​

MethodDescription
IsClassAReturns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
SafeCastSafeCast makes sure the input object is of a class that can be cast into spTextureTable, and if this is the case, returns the object cast into spTextureTable. (Inherited from Object)

Properties details ​

Name ​

The name of the TextureTable object. (Inherited from Object)

Methods details ​

AddItem ​

Adds an item to the table. The returned value is the id of the item within the table, which can be used to retrieve the item using GetItem().

AddObserver ​

Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)

AddTexture ​

Adds a texture to the table. The returned value is the id of the texture within the table.

Clear ​

Clears the table, and removes all items. If AddItem is called after Clear, the item ids will start over from 0.

Copy ​

Clears the current table and copies the items from a source table.

FindItem ​

Finds a named item in the table. If multiple items have the same name, the first will be returned. If no item was found, null will be returned.

FindItemId ​

Finds the id of an item in the table, using the name. If multiple items have the same name, the first will be returned. If no item was found, the return will be -1.

FindTexture ​

Finds a texture in the table, using the texture name. If multiple textures have the same name, the first will be returned. If the texture was not found, null will be returned.

FindTextureId ​

Finds the id of a texture in the table, using the texture name. If multiple textures have the same name, the first will be returned. If the texture was not found, -1 will be returned.

FindTextureUsingAbsoluteFilePath ​

Finds a texture in the table, using the texture AbsoluteFilePath property. If multiple textures have the same path, the first will be returned. If the texture was not found, null will be returned.

FindTextureUsingFilePath ​

Finds a texture in the table, using the texture FilePath property. If multiple textures have the same path, the first will be returned. If the texture was not found, null will be returned.

FindTextureUsingPath ​

Finds a texture in the table, using the texture file path. If multiple textures have the same path, the first will be returned. If the texture was not found, null will be returned.

WARNING

This method is marked as deprecated and will be removed in a future version.

Use FindTextureUsingPath instead.

GetClass ​

Get the name of the TextureTable class. (Inherited from Object)

GetItem ​

Returns the i:th item, using the id of the item.

GetItemsCount ​

The number of item id:s in the table. If an item has been removed, using RemoveItem, the id is still counted in this method. GetIdsCount also equals the id that will be applied to the next item added to the table.

GetTexture ​

Returns the i:th texture, using the id of the texture.

GetTexturesCount ​

Returns the number of textures in the table.

IsA ​

Returns true if TextureTable is a or is a descendant of the class named as the type parameter. (Inherited from Object)

IsNull ​

Returns true if the TextureTable object is invalid. (Inherited from Object)

IsSameObjectAs ​

Returns true if the TextureTable object is valid. (Inherited from Object)

NonNull ​

Returns true if the TextureTable object is valid. (Inherited from Object)

PrintInfo ​

Prints the content/info of the TextureTable object to the log. (Inherited from Object)

RemoveItem ​

Removes an item, and invalidates the id. The id will not point at a valid item, until Clear is called and new items are added up until the id.

RemoveObserver ​

Removes a previously added observer object. (Inherited from Object)

RemoveTexture ​

Removes a texture. If GetTexture is called with the texture id, the value returned will be null.

SetItem ​

Sets an item in the table. The id must exist in the table.

SetTexture ​

Sets a texture in the table.

Static methods details ​

IsClassA ​

Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)

SafeCast ​

SafeCast makes sure the input object is of a class that can be cast into spTextureTable, and if this is the case, returns the object cast into spTextureTable. (Inherited from Object)