- Cal3D 0.9 API Reference - |
#include <corematerial.h>
Public Member Functions | |
CalCoreMaterial () | |
Constructs the core material instance. | |
virtual | ~CalCoreMaterial () |
Destructs the core model instance. | |
bool | create () |
Creates the core material instance. | |
void | destroy () |
Destroys the core material instance. | |
Color & | getAmbientColor () |
Returns the ambient color. | |
Color & | getDiffuseColor () |
Returns the diffuse color. | |
int | getMapCount () |
Returns the number of maps. | |
const std::string & | getMapFilename (int mapId) |
Returns a specified map texture filename. | |
Cal::UserData | getMapUserData (int mapId) |
Provides access to a specified map user data. | |
float | getShininess () |
Returns the shininess factor. | |
Color & | getSpecularColor () |
Returns the specular color. | |
Cal::UserData | getUserData () |
Provides access to the user data. | |
std::vector< Map > & | getVectorMap () |
Returns the map vector. | |
bool | reserve (int mapCount) |
Reserves memory for the maps. | |
void | setAmbientColor (const Color &ambientColor) |
Sets the ambient color. | |
void | setDiffuseColor (const Color &diffuseColor) |
Sets the diffuse color. | |
bool | setMap (int mapId, const Map &map) |
Sets a specified map. | |
bool | setMapUserData (int mapId, Cal::UserData userData) |
Stores specified map user data. | |
void | setShininess (float shininess) |
Sets the shininess factor. | |
void | setSpecularColor (const Color &specularColor) |
Sets the specular color. | |
void | setFilename (const std::string &filename) |
Set the name of the file in which the core material is stored, if any. | |
const std::string & | getFilename (void) |
Get the name of the file in which the core material is stored, if any. | |
void | setName (const std::string &name) |
Set the symbolic name of the core material. | |
const std::string & | getName (void) |
Get the symbolic name the core material. | |
void | setUserData (Cal::UserData userData) |
Stores user data. | |
void | incRef () |
Increment the reference counter the core material. | |
bool | decRef () |
Decrement the reference counter the core material. | |
Protected Attributes | |
Color | m_ambientColor |
Color | m_diffuseColor |
Color | m_specularColor |
float | m_shininess |
std::vector< Map > | m_vectorMap |
Cal::UserData | m_userData |
std::string | m_name |
std::string | m_filename |
int | m_referenceCount |
Classes | |
struct | Color |
The core material Color. More... | |
struct | Map |
The core material Map. More... |
|
Constructs the core material instance. This function is the default constructor of the core material instance. |
|
Destructs the core model instance. This function is the destructor of the core model instance. |
|
Creates the core material instance. This function creates the core material instance.
|
|
Decrement the reference counter the core material.
|
|
Destroys the core material instance. This function destroys all data stored in the core material instance and frees all allocated memory. |
|
Returns the ambient color. This function returns the ambient color of the core material instance.
|
|
Returns the diffuse color. This function returns the diffuse color of the core material instance.
|
|
Get the name of the file in which the core material is stored, if any.
|
|
Returns the number of maps. This function returns the number of mapss in the core material instance.
|
|
Returns a specified map texture filename. This function returns the texture filename for a specified map ID of the core material instance.
|
|
Provides access to a specified map user data. This function returns the user data stored in the specified map of the core material instance.
|
|
Get the symbolic name the core material.
|
|
Returns the shininess factor. This function returns the shininess factor of the core material instance.
|
|
Returns the specular color. This function returns the specular color of the core material instance.
|
|
Provides access to the user data. This function returns the user data stored in the core material instance.
|
|
Returns the map vector. This function returns the vector that contains all maps of the core material instance.
|
|
Reserves memory for the maps. This function reserves memory for the maps of the core material instance.
|
|
Sets the ambient color. This function sets the ambient color of the core material instance.
|
|
Sets the diffuse color. This function sets the diffuse color of the core material instance.
|
|
Set the name of the file in which the core material is stored, if any.
|
|
Sets a specified map. This function sets a specified map in the core material instance.
|
|
Stores specified map user data. This function stores user data in a specified map of the core material instance.
|
|
Set the symbolic name of the core material.
|
|
Sets the shininess factor. This function sets the shininess factor of the core material instance.
|
|
Sets the specular color. This function sets the specular color of the core material instance.
|
|
Stores user data. This function stores user data in the core material instance.
|