#include <SimplygonSDK.h>
IMaterial keeps information on materials used while rendering.
Definition at line 6972 of file SimplygonSDK.h.
◆ AddUserChannel()
virtual void SimplygonSDK::IMaterial::AddUserChannel |
( |
const char * |
channel_name | ) |
|
|
pure virtual |
Add a user material channel
- Parameters
-
channel_name | the name of the material channel |
◆ ChangeTexturePrefixPath()
virtual void SimplygonSDK::IMaterial::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 the material, 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 |
◆ ConvertHandedness()
virtual void SimplygonSDK::IMaterial::ConvertHandedness |
( |
| ) |
|
|
pure virtual |
Converts parameters such as UVTiling and UVOffset in shading networks.
◆ GetChannelCount()
virtual unsigned int SimplygonSDK::IMaterial::GetChannelCount |
( |
| ) |
|
|
pure virtual |
Returns the number of material channels in the material
- Returns
- the current channel count
◆ GetChannelFromIndex()
virtual rstring SimplygonSDK::IMaterial::GetChannelFromIndex |
( |
rid |
index | ) |
|
|
pure virtual |
Returns the name of a channel from the index. Note that by adding/removing channels the indices are changed, and this method should only be used for enumeration
- Parameters
-
index | is the index to the channel to be fetched |
- Returns
- the channel name corresponding to the index
◆ GetClass()
virtual const char* SimplygonSDK::IMaterial::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::IObject.
◆ GetMaterialGUID()
virtual rstring SimplygonSDK::IMaterial::GetMaterialGUID |
( |
| ) |
|
|
pure virtual |
Gets the unique id for this node.
- Returns
- the GUID for this node
◆ GetMaterialType()
virtual unsigned int SimplygonSDK::IMaterial::GetMaterialType |
( |
| ) |
|
|
pure virtual |
◆ GetShadingNetwork()
Get which shading network to use for the material's channel
- Parameters
-
channel_name | is the name of the channel |
- Returns
- the current shading network's exit node
◆ GetUseTangentSpaceNormals()
virtual bool SimplygonSDK::IMaterial::GetUseTangentSpaceNormals |
( |
| ) |
|
|
pure virtual |
Set/Get the UseTangentSpaceNormals flag. If set, the normal map has tangent space normals
◆ HasUserChannel()
virtual bool SimplygonSDK::IMaterial::HasUserChannel |
( |
const char * |
channel_name | ) |
|
|
pure virtual |
Check if the user channel exists within the material.
- Parameters
-
channel_name | the name of the material channel |
- Returns
- true if the channel exists, false if not
◆ IsA()
virtual bool SimplygonSDK::IMaterial::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::IObject.
◆ IsClassA()
static bool SimplygonSDK::IMaterial::IsClassA |
( |
const char * |
type | ) |
|
|
inlinestatic |
The IsClassA function returns true if IMaterial 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 6993 of file SimplygonSDK.h.
◆ IsIdenticalTo()
virtual bool SimplygonSDK::IMaterial::IsIdenticalTo |
( |
IMaterial * |
mat | ) |
|
|
pure virtual |
Returns true if the material is setup identical to this material
- Parameters
-
mat | the material to compare to |
◆ IsTransparent()
virtual bool SimplygonSDK::IMaterial::IsTransparent |
( |
| ) |
|
|
pure virtual |
Returns true if the material could be transparent
◆ LoadShadingNetworkFromXML()
virtual void SimplygonSDK::IMaterial::LoadShadingNetworkFromXML |
( |
const char * |
channel_name, |
|
|
const char * |
in_xml |
|
) |
| |
|
pure virtual |
Save shading network to XML
- Parameters
-
channel_name | is the name of the channel |
in_xml | the xml descriping the shading node graph |
- Returns
- the current shading network's exit node
◆ RemoveUserChannel()
virtual void SimplygonSDK::IMaterial::RemoveUserChannel |
( |
const char * |
channel_name | ) |
|
|
pure virtual |
Remove a user material channel
- Parameters
-
channel_name | the name of the material channel |
◆ SafeCast()
SafeCast makes sure the pointer is of a class that can be cast into a IMaterial pointer, and if this is possible, returns the cast pointer.
- Parameters
-
ptr | is the pointer to be cast into a IMaterial pointer |
- Returns
- a pointer to the IMaterial object, if the cast can be made, and a NULL pointer otherwise
Definition at line 7006 of file SimplygonSDK.h.
◆ SaveShadingNetworkToXML()
virtual rstring SimplygonSDK::IMaterial::SaveShadingNetworkToXML |
( |
const char * |
channel_name | ) |
|
|
pure virtual |
Save shading network to XML
- Parameters
-
channel_name | is the name of the channel |
- Returns
- the current shading network's exit node
◆ SetMaterialGUID()
virtual void SimplygonSDK::IMaterial::SetMaterialGUID |
( |
const char * |
value | ) |
|
|
pure virtual |
Sets the unique id for this node.
- Parameters
-
value | is the node id of type string |
◆ SetMaterialType()
virtual void SimplygonSDK::IMaterial::SetMaterialType |
( |
unsigned int |
value | ) |
|
|
pure virtual |
Set the MaterialType.
- Parameters
-
value | the Material type. One of the following
-
SG_MATERIALTYPE_STANDARD -> Use the standard shader
-
SG_MATERIALTYPE_FLIPBOOK -> Use the flipbook shader.
-
SG_MATERIALTYPE_BILLBOARDCLOUD -> Use the billboard cloud shader.
|
◆ SetOpacityFromDiffuseAlpha()
virtual void SimplygonSDK::IMaterial::SetOpacityFromDiffuseAlpha |
( |
| ) |
|
|
pure virtual |
Maps the alpha component of the diffuse channel to all the RGBA components in the opacity channel (by using a swizzle node).
◆ SetShadingNetwork()
virtual void SimplygonSDK::IMaterial::SetShadingNetwork |
( |
const char * |
channel_name, |
|
|
IShadingNode * |
node |
|
) |
| |
|
pure virtual |
Set which shading network to use for the material's channel
- Parameters
-
channel_name | is the name of the new channel |
node | the shading network's exit node |
◆ SetUseTangentSpaceNormals()
virtual void SimplygonSDK::IMaterial::SetUseTangentSpaceNormals |
( |
bool |
value | ) |
|
|
pure virtual |
Set/Get the UseTangentSpaceNormals flag. If set, the normal map has tangent space normals
- Parameters
-
value | the desired flag value. |
The documentation for this class was generated from the following file: