OpenCMISS-Zinc C++ API Documentation
|
Module managing all light objects. More...
#include <light.hpp>
Public Member Functions | |
Lightmodule (cmzn_lightmodule_id in_lightmodule_id) | |
Lightmodule (const Lightmodule &lightModule) | |
Lightmodule & | operator= (const Lightmodule &lightModule) |
bool | isValid () const |
cmzn_lightmodule_id | getId () const |
Light | createLight () |
Lightiterator | createLightiterator () |
Light | findLightByName (const char *name) |
int | beginChange () |
int | endChange () |
Light | getDefaultLight () |
int | setDefaultLight (const Light &light) |
Light | getDefaultAmbientLight () |
int | setDefaultAmbientLight (const Light &light) |
Protected Attributes | |
cmzn_lightmodule_id | id |
Module managing all light objects.
Module managing all light objects. It maintains separate default lights for directional head-lights and for ambient lights (background lighting from all directions), which are automatically added to new scene viewers.
|
inline |
Begin caching or increment cache level for this light 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 a new light, initialised with default settings. Following creation, the caller is expected to set the type and settings such as colour, direction and/or position as appropriate for the type.
|
inline |
Create a light iterator object for iterating through the lights in the light module, in alphabetical order of name. The iterator initially points at the position before the first light, so the first call to the iterator next() method returns the first light and advances the iterator. The iterator becomes invalid if lights are added, removed or renamed while in use.
lights are to be iterated over.
|
inline |
Decrement cache level or end caching of changes for the light module. Call light 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.
|
inline |
Find the light with the specified name, if any.
name | The name of the light. |
|
inline |
Get the default ambient light to be used in new scene viewers. If none, one is automatically created with RGB colour value of [0.2, 0.2, 0.2]. Note that the colour of this light and the default light sum to 1.0 to ensure colours of graphics are not oversaturated with default settings.
|
inline |
Get the default light to be used in sceneviewer. If there is none, a default directional light is automatically created with RGB value of [0.8, 0.8, 0.8] and [0.0, -0.5, -1.0] for its direction i.e. into the screen and slightly down. Note that the colour of this light and the default ambient light sum to 1.0 to ensure colours of graphics are not oversaturated with default settings.
|
inline |
Return the C handle of the Lightmodule object.
|
inline |
Check if this is a valid Lightmodule object.
|
inline |
Set the default ambient light, this default ambient light will be used by any scene viewers created afterward.
light | The light to set as default ambient light. |
|
inline |
Set the default light, this default light will be used by any sceneviewer created afterward. Typically this is expected to be a directional light; not expected to be of ambient type.
light | The light to set as the default light. |