#include <SimplygonSDK.h>
IMaterialTable keeps information on materials used while rendering.
Definition at line 7162 of file SimplygonSDK.h.
◆ AddMaterial()
virtual rid SimplygonSDK::IMaterialTable::AddMaterial |
( |
IMaterial * |
material | ) |
|
|
pure virtual |
Adds a material to the table. The returned value is the id of the material within the table.
- Parameters
-
material | the material to add into the table |
- Returns
- the material id of the material in the table
◆ ChangeTexturePrefixPath()
virtual void SimplygonSDK::IMaterialTable::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 materials 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_prefix | the current prefix path, either relative or absolute |
new_path_prefix | the new prefix path |
◆ FindIdenticalMaterial()
Finds a material in the table that is setup identical to the specified material.
- Parameters
-
mat | the material setup to look for |
- Returns
- the material, if found, NULL otherwise
◆ FindIdenticalMaterialId()
virtual rid SimplygonSDK::IMaterialTable::FindIdenticalMaterialId |
( |
IMaterial * |
mat | ) |
|
|
pure virtual |
Finds the id of a material in the table that is setup identical to the specified material.
- Parameters
-
mat | the material setup to look for |
- Returns
- the material id if found, -1 otherwise
◆ FindIdenticalMaterialIds()
Finds the materials in the table that are setup identical to the specified material.
- Parameters
-
mat | the material setup to look for |
- Returns
- the an array material ids if found, NULL otherwise
◆ FindMaterial()
Finds a material in the table, using the material name. If multiple materials have the same name, the first will be returned. If the material was not found, the return will be NULL.
- Parameters
-
name | the material name to look for |
- Returns
- the material, if found, NULL otherwise
◆ FindMaterialId()
virtual rid SimplygonSDK::IMaterialTable::FindMaterialId |
( |
const char * |
name | ) |
|
|
pure virtual |
Finds the id of a material in the table, using the material name. If multiple materials have the same name, the first will be returned. If the material was not found, the return will be -1.
- Parameters
-
name | the material name to look for |
- Returns
- the material id if found, -1 otherwise
◆ GetClass()
virtual const char* SimplygonSDK::IMaterialTable::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.
◆ GetMaterial()
Returns the i:th material, using the id of the material
- Parameters
-
id | the id of the material in the table |
- Returns
- the the material in the table
◆ GetMaterialsCount()
virtual unsigned int SimplygonSDK::IMaterialTable::GetMaterialsCount |
( |
| ) |
|
|
pure virtual |
Returns the number of materials in the table
◆ IsA()
virtual bool SimplygonSDK::IMaterialTable::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
-
type | is 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::IMaterialTable::IsClassA |
( |
const char * |
type | ) |
|
|
inlinestatic |
The IsClassA function returns true if IMaterialTable is a or is a descendant of the class named as the type parameter
- Parameters
-
type | is 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 7183 of file SimplygonSDK.h.
◆ RemoveMaterial()
virtual void SimplygonSDK::IMaterialTable::RemoveMaterial |
( |
rid |
id | ) |
|
|
pure virtual |
Removes a material. If GetMaterial is called with the material id, the value returned will be NULL.
- Parameters
-
id | the id of the material in the table |
◆ SafeCast()
SafeCast makes sure the pointer is of a class that can be cast into a IMaterialTable pointer, and if this is possible, returns the cast pointer.
- Parameters
-
- Returns
- a pointer to the IMaterialTable object, if the cast can be made, and a NULL pointer otherwise
Definition at line 7196 of file SimplygonSDK.h.
◆ SetMaterial()
virtual void SimplygonSDK::IMaterialTable::SetMaterial |
( |
rid |
id, |
|
|
IMaterial * |
material |
|
) |
| |
|
pure virtual |
Sets a material in the table.
- Parameters
-
id | the id of the material in the table |
material | the material to set into the table |
The documentation for this class was generated from the following file: