OpenCMISS-Zinc C++ API Documentation
|
Module managing all materials. More...
#include <material.hpp>
Public Member Functions | |
Materialmodule (cmzn_materialmodule_id in_materialmodule_id) | |
Materialmodule (const Materialmodule &materialModule) | |
Materialmodule & | operator= (const Materialmodule &materialModule) |
bool | isValid () const |
cmzn_materialmodule_id | getId () const |
Material | createMaterial () |
Materialiterator | createMaterialiterator () |
Material | findMaterialByName (const char *name) |
int | beginChange () |
int | endChange () |
int | defineStandardMaterials () |
Material | getDefaultMaterial () |
int | setDefaultMaterial (const Material &material) |
Material | getDefaultSelectedMaterial () |
int | setDefaultSelectedMaterial (const Material &material) |
Material | getDefaultSurfaceMaterial () |
int | setDefaultSurfaceMaterial (const Material &material) |
Protected Attributes | |
cmzn_materialmodule_id | id |
Module managing all materials.
Module managing all materials. Note that only default and default selected materials exist on start-up, so many users will want to define standard materials early in their program. Standard materials include basic colours, greys, bioengineering materials (bone, muscle, tissue), etc. Alternative and additional materials can be defined using the API.
|
inline |
Begin caching or increment cache level for this material module. Call this function before making multiple changes to minimise number of change messages sent to clients. Must remember to end_change after completing changes. Can be nested.
|
inline |
Create and return a new material.
material will belong to.
|
inline |
Create a material iterator object for iterating through the materials in the material module, in alphabetical order of name. The iterator initially points at the position before the first material, so the first call to the material iterator next() method returns the first material and advances the iterator. Iterator becomes invalid if materials are added, removed or renamed while in use.
be iterated over.
|
inline |
Define a list of standard cmgui materials and store them as they are managed by graphics module.
|
inline |
Decrement cache level or end caching of changes for the material module. Call matching begin change method before making multiple changes and call this afterwards. When change level is restored to zero, cached change messages are sent out to clients.
|
inline |
Find the material with the specified name, if any.
name | The name of the material. |
|
inline |
Get the default material, if any.
|
inline |
Get the default selected material, if any. This material is used as the default selected material for any new graphics.
|
inline |
Get the default surface material, if any.
|
inline |
Return the C handle of the Materialmodule object.
|
inline |
Check if this is a valid Materialmodule object.
|
inline |
Set the default material. This material is used as the default material for new graphics, but note if the default surface material is set it is used instead for new surface and contours graphics.
material | The material to set as default. |
|
inline |
Set the default selected material.
material | The material to set as default. |
|
inline |
Set the default surface material set for new surface and contours graphics. If this is not set, the default material is used instead.
material | The material to set as default for surfaces. Pass NULL or unvalid material to clear. |