Simplygon C++ API  8.3.35800.0
SimplygonSDK::ITextureTable Class Referenceabstract

#include <SimplygonSDK.h>

Inheritance diagram for SimplygonSDK::ITextureTable:
SimplygonSDK::ITable SimplygonSDK::IObject

Public Member Functions

virtual rid AddTexture (ITexture *texture)=0
 
virtual void ChangeTexturePrefixPath (const char *current_path_prefix, const char *new_path_prefix)=0
 
virtual CountedPointer< ITextureFindTexture (const char *name)=0
 
virtual rid FindTextureId (const char *name)=0
 
virtual CountedPointer< ITextureFindTextureUsingPath (const char *path)=0
 
virtual const char * GetClass ()
 
virtual CountedPointer< ITextureGetTexture (rid id)=0
 
virtual unsigned int GetTexturesCount ()=0
 
virtual bool IsA (const char *type) const
 
virtual void RemoveTexture (rid id)=0
 
virtual void SetTexture (rid id, ITexture *texture)=0
 
- Public Member Functions inherited from SimplygonSDK::ITable
virtual rid AddItem (IObject *item)=0
 
virtual void Clear ()=0
 
virtual void Copy (ITable *src)=0
 
virtual CountedPointer< IObjectFindItem (const char *name)=0
 
virtual rid FindItemId (const char *name)=0
 
virtual CountedPointer< IObjectGetItem (rid id)=0
 
virtual unsigned int GetItemsCount ()=0
 
virtual void RemoveItem (rid id)=0
 
virtual void SetItem (rid id, IObject *item)=0
 
- Public Member Functions inherited from SimplygonSDK::IObject
virtual rid AddObserver (robserver *Observer, rid EventId)=0
 
virtual void AddRef ()=0
 
virtual rstring GetName ()=0
 
virtual void * GetUserComponentArea (rid userid)=0
 
virtual void PrintInfo ()=0
 
virtual void Release ()=0
 
virtual void RemoveObserver (rid ObserverId)=0
 
virtual void SetName (const char *Name)=0
 

Static Public Member Functions

static bool IsClassA (const char *type)
 
static ITextureTableSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::ITable
static bool IsClassA (const char *type)
 
static ITableSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IObject
static bool IsClassA (const char *type)
 
static IObjectSafeCast (IObject *ptr)
 

Detailed Description

ITextureTable keeps information on textures used while rendering.

Definition at line 15550 of file SimplygonSDK.h.

Member Function Documentation

◆ AddTexture()

virtual rid SimplygonSDK::ITextureTable::AddTexture ( ITexture texture)
pure virtual

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

Parameters
texturethe texture to add into the table
Returns
the texture id of the texture in the table

◆ ChangeTexturePrefixPath()

virtual void SimplygonSDK::ITextureTable::ChangeTexturePrefixPath ( const char *  current_path_prefix,
const char *  new_path_prefix 
)
pure virtual

Changes the prefix path (drive, directory) of all matching texture paths in all the textures in the table, with the new one. This method is useful when external textures are placed in a specific folder, which needs to be moved

Parameters
current_path_prefixthe current prefix path, either relative or absolute
new_path_prefixthe new prefix path

◆ FindTexture()

virtual CountedPointer<ITexture> SimplygonSDK::ITextureTable::FindTexture ( const char *  name)
pure virtual

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, the return will be NULL.

Parameters
namethe texture name to look for
Returns
the texture, if found, NULL otherwise

◆ FindTextureId()

virtual rid SimplygonSDK::ITextureTable::FindTextureId ( const char *  name)
pure virtual

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, the return will be -1.

Parameters
namethe texture name to look for
Returns
the texture id if found, -1 otherwise

◆ FindTextureUsingPath()

virtual CountedPointer<ITexture> SimplygonSDK::ITextureTable::FindTextureUsingPath ( const char *  path)
pure virtual

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

Parameters
pathis the texture path
Returns
the texture, if found, NULL otherwise

◆ GetClass()

virtual const char* SimplygonSDK::ITextureTable::GetClass ( )
virtual

GetClass returns the name of the class of the object.

Returns
the name of the actual class of the object, as a const char string

Reimplemented from SimplygonSDK::ITable.

◆ GetTexture()

virtual CountedPointer<ITexture> SimplygonSDK::ITextureTable::GetTexture ( rid  id)
pure virtual

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

Parameters
idthe id of the texture in the table
Returns
the the texture in the table

◆ GetTexturesCount()

virtual unsigned int SimplygonSDK::ITextureTable::GetTexturesCount ( )
pure virtual

Returns the number of textures in the table

◆ IsA()

virtual bool SimplygonSDK::ITextureTable::IsA ( const char *  type) const
virtual

The IsA function returns true if the object is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the object is, or is a descendant of
Returns
true if the object is of the specified class, false if not

Reimplemented from SimplygonSDK::ITable.

◆ IsClassA()

static bool SimplygonSDK::ITextureTable::IsClassA ( const char *  type)
inlinestatic

The IsClassA function returns true if ITextureTable is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the class is, or is a descendant of
Returns
true if the class is of the specified class, false if not

Definition at line 15571 of file SimplygonSDK.h.

◆ RemoveTexture()

virtual void SimplygonSDK::ITextureTable::RemoveTexture ( rid  id)
pure virtual

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

Parameters
idthe id of the texture in the table

◆ SafeCast()

static ITextureTable* SimplygonSDK::ITextureTable::SafeCast ( IObject ptr)
inlinestatic

SafeCast makes sure the pointer is of a class that can be cast into a ITextureTable pointer, and if this is possible, returns the cast pointer.

Parameters
ptris the pointer to be cast into a ITextureTable pointer
Returns
a pointer to the ITextureTable object, if the cast can be made, and a NULL pointer otherwise

Definition at line 15584 of file SimplygonSDK.h.

◆ SetTexture()

virtual void SimplygonSDK::ITextureTable::SetTexture ( rid  id,
ITexture texture 
)
pure virtual

Sets a texture in the table.

Parameters
idthe id of the texture in the table
texturethe texture to set into the table

The documentation for this class was generated from the following file: