OpenCMISS-Zinc C++ API Documentation
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Pages
Public Member Functions | Protected Attributes | List of all members
OpenCMISS::Zinc::Spectrummodule Class Reference

Module managing all spectrums. More...

#include <spectrum.hpp>

Public Member Functions

 Spectrummodule (cmzn_spectrummodule_id in_spectrummodule_id)
 
 Spectrummodule (const Spectrummodule &spectrummodule)
 
Spectrummoduleoperator= (const Spectrummodule &spectrummodule)
 
bool isValid () const
 
cmzn_spectrummodule_id getId () const
 
Spectrum createSpectrum ()
 
Spectrum findSpectrumByName (const char *name)
 
int beginChange ()
 
int endChange ()
 
Spectrum getDefaultSpectrum ()
 
int setDefaultSpectrum (const Spectrum &spectrum)
 

Protected Attributes

cmzn_spectrummodule_id id
 

Detailed Description

Module managing all spectrums.

Module managing all spectrums.

Member Function Documentation

int OpenCMISS::Zinc::Spectrummodule::beginChange ( )
inline

Begin caching or increment cache level for this spectrum 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.

See Also
Spectrummodule::endChange
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
Spectrum OpenCMISS::Zinc::Spectrummodule::createSpectrum ( )
inline

Create and return a new spectrum.

spectrum will belong to.

Returns
Handle to new spectrum, or NULL/invalid handle on failure.
int OpenCMISS::Zinc::Spectrummodule::endChange ( )
inline

Decrement cache level or end caching of changes for the spectrum module. Call spectrum module 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.

See Also
Spectrummodule::beginChange
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
Spectrum OpenCMISS::Zinc::Spectrummodule::findSpectrumByName ( const char *  name)
inline

Find the spectrum with the specified name, if any.

Parameters
nameThe name of the spectrum.
Returns
Handle to spectrum, or NULL/invalid handle if not found or failed.
Spectrum OpenCMISS::Zinc::Spectrummodule::getDefaultSpectrum ( )
inline

Get the default spectrum, if any. By default, a single component spectrum with COLOUR_MAPPING_TYPE_RAINBOW is returned.

See Also
Spectrummodule::setDefaultSpectrum
Spectrumcomponent::ColourMappingType
Returns
Handle to default spectrum, or NULL/invalid handle if none or failed.
cmzn_spectrummodule_id OpenCMISS::Zinc::Spectrummodule::getId ( ) const
inline

Return the C handle of the Spectrummodule object.

Returns
C handle of Spectrummodule if this objects is valid, 0 otherwise.
bool OpenCMISS::Zinc::Spectrummodule::isValid ( ) const
inline

Check if this is a valid Spectrummodule object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Spectrummodule::setDefaultSpectrum ( const Spectrum spectrum)
inline

Set the default spectrum.

Parameters
spectrumThe spectrum to set as default.
Returns
OpenCMISS::Zinc::OK on success otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.

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