9 #ifndef CMZN_LIGHT_HPP__    10 #define CMZN_LIGHT_HPP__    12 #include "opencmiss/zinc/light.h"    13 #include "opencmiss/zinc/context.hpp"    39     explicit Light(cmzn_light_id light_id) :
    44         id(cmzn_light_access(light.id))
    49         cmzn_light_id temp_id = cmzn_light_access(light.id);
    52             cmzn_light_destroy(&
id);
    62             cmzn_light_destroy(&
id);
   115         return cmzn_light_is_managed(
id);
   132         return cmzn_light_set_managed(
id, value);
   142         return static_cast<Type>(cmzn_light_get_type(
id));
   153         return cmzn_light_set_type(
id, static_cast<cmzn_light_type>(type));
   164         return cmzn_light_get_name(
id);
   176         return cmzn_light_set_name(
id, name);
   190         return cmzn_light_get_constant_attenuation(
id);
   206         return cmzn_light_set_constant_attenuation(
id, constantAttenuation);
   220         return cmzn_light_get_linear_attenuation(
id);
   236         return cmzn_light_set_linear_attenuation(
id, linearAttenuation);
   250         return cmzn_light_get_quadratic_attenuation(
id);
   266         return cmzn_light_set_quadratic_attenuation(
id, quadraticAttenuation);
   279         return cmzn_light_get_colour_rgb(
id, valuesOut3);
   295         return cmzn_light_set_colour_rgb(
id, valuesIn3);
   309         return cmzn_light_get_direction(
id, valuesOut3);
   322         return cmzn_light_set_direction(
id, valuesIn3);
   336         return cmzn_light_get_position(
id, valuesOut3);
   349         return cmzn_light_set_position(
id, valuesIn3);
   360         return cmzn_light_get_spot_cutoff(
id);
   373         return cmzn_light_set_spot_cutoff(
id, cutoff);
   385         return cmzn_light_get_spot_exponent(
id);
   398         return cmzn_light_set_spot_exponent(
id, exponent);
   403 inline bool operator==(
const Light& a, 
const Light& b)
   418     cmzn_lightiterator_id id;
   431         id(cmzn_lightiterator_access(lightiterator.id))
   436         cmzn_lightiterator_id temp_id = cmzn_lightiterator_access(lightiterator.id);
   439             cmzn_lightiterator_destroy(&
id);
   449             cmzn_lightiterator_destroy(&
id);
   473         return Light(cmzn_lightiterator_next(
id));
   487     cmzn_lightmodule_id id;
   495     explicit Lightmodule(cmzn_lightmodule_id in_lightmodule_id) :
   496         id(in_lightmodule_id)
   500         id(cmzn_lightmodule_access(lightModule.id))
   505         cmzn_lightmodule_id temp_id = cmzn_lightmodule_access(
   509             cmzn_lightmodule_destroy(&
id);
   519             cmzn_lightmodule_destroy(&
id);
   552         return Light(cmzn_lightmodule_create_light(
id));
   569         return Lightiterator(cmzn_lightmodule_create_lightiterator(
id));
   580         return Light(cmzn_lightmodule_find_light_by_name(
id, name));
   594         return cmzn_lightmodule_begin_change(
id);
   608         return cmzn_lightmodule_end_change(
id);
   623         return Light(cmzn_lightmodule_get_default_light(
id));
   636         return cmzn_lightmodule_set_default_light(
id, light.
getId());
   650         return Light(cmzn_lightmodule_get_default_ambient_light(
id));
   662         return cmzn_lightmodule_set_default_ambient_light(
id, light.
getId());
   668     return Lightmodule(cmzn_context_get_lightmodule(
id));
 double getQuadraticAttenuation()
Definition: light.hpp:248
 
Light findLightByName(const char *name)
Definition: light.hpp:578
 
Module managing all light objects. 
Definition: light.hpp:484
 
cmzn_lightmodule_id getId() const 
Definition: light.hpp:538
 
double getSpotCutoff()
Definition: light.hpp:358
 
int getColourRGB(double *valuesOut3)
Definition: light.hpp:277
 
int setName(const char *name)
Definition: light.hpp:174
 
Light next()
Definition: light.hpp:471
 
The light controls how vertices will be lit on a sceneviewer. 
Definition: light.hpp:28
 
int endChange()
Definition: light.hpp:606
 
int setType(enum Type type)
Definition: light.hpp:151
 
Lightiterator createLightiterator()
Definition: light.hpp:567
 
int setSpotExponent(double exponent)
Definition: light.hpp:396
 
double getSpotExponent()
Definition: light.hpp:383
 
int getDirection(double *valuesOut3)
Definition: light.hpp:307
 
double getLinearAttenuation()
Definition: light.hpp:218
 
cmzn_light_id getId() const 
Definition: light.hpp:102
 
bool isValid() const 
Definition: light.hpp:71
 
int setDefaultAmbientLight(const Light &light)
Definition: light.hpp:660
 
int setDefaultLight(const Light &light)
Definition: light.hpp:634
 
bool isValid() const 
Definition: light.hpp:528
 
int setSpotCutoff(double cutoff)
Definition: light.hpp:371
 
int setQuadraticAttenuation(double quadraticAttenuation)
Definition: light.hpp:264
 
int setPosition(const double *valuesIn3)
Definition: light.hpp:347
 
Light createLight()
Definition: light.hpp:550
 
char * getName()
Definition: light.hpp:162
 
Type
Definition: light.hpp:79
 
int getPosition(double *valuesOut3)
Definition: light.hpp:334
 
double getConstantAttenuation()
Definition: light.hpp:188
 
Light getDefaultAmbientLight()
Definition: light.hpp:648
 
int setColourRGB(const double *valuesIn3)
Definition: light.hpp:293
 
The OpenCMISS namespace. 
Definition: context.hpp:20
 
Light getDefaultLight()
Definition: light.hpp:621
 
int setDirection(const double *valuesIn3)
Definition: light.hpp:320
 
Lightmodule getLightmodule()
Definition: light.hpp:666
 
int setLinearAttenuation(double linearAttenuation)
Definition: light.hpp:234
 
bool isManaged()
Definition: light.hpp:113
 
int beginChange()
Definition: light.hpp:592
 
An iterator for looping through all the lights in a light module. 
Definition: light.hpp:414
 
bool isValid() const 
Definition: light.hpp:458
 
int setManaged(bool value)
Definition: light.hpp:130
 
enum Type getType()
Definition: light.hpp:140
 
int setConstantAttenuation(double constantAttenuation)
Definition: light.hpp:204