Top | ![]() |
![]() |
![]() |
![]() |
MashPointLightMashPointLight — An actor for a light with a position that emits light in all directions. |
ClutterActor * | mash_point_light_new () |
void | mash_point_light_set_constant_attenuation () |
gfloat | mash_point_light_get_constant_attenuation () |
void | mash_point_light_set_linear_attenuation () |
gfloat | mash_point_light_get_linear_attenuation () |
void | mash_point_light_set_quadratic_attenuation () |
gfloat | mash_point_light_get_quadratic_attenuation () |
gfloat | constant-attenuation | Read / Write |
gfloat | linear-attenuation | Read / Write |
gfloat | quadratic-attenuation | Read / Write |
GObject ╰── GInitiallyUnowned ╰── ClutterActor ╰── MashLight ╰── MashPointLight ╰── MashSpotLight
MashPointLight implements ClutterContainer, ClutterScriptable, ClutterAnimatable and AtkImplementorIface.
A MashPointLight models a light that has a position and emits light evenly in all directions. The position of the light is taken from the actor's position so it can be easily modified and even animated using the ClutterActor properties. The intensity of the light can be attenuated using the attenuation properties to make objects that are further from the light receive less intensity. The intensity of the light is divided by ad² + bd + c, where d is the distance between the light and the vertex and a, b and c are the following properties which can be modified on the light: quadratic-attenuation, linear-attenuation and constant-attenuation.
By default the attenuation values are all zero except for the constant attenuation. This causes the light to never be attenuated so that the light intensity is not affected by the distance from the light.
ClutterActor *
mash_point_light_new (void
);
Constructs a new MashPointLight.
void mash_point_light_set_constant_attenuation (MashPointLight *light
,gfloat attenuation
);
Sets the constant attenuation value on a light. The light intensity is divided by this value. Setting a higher value will cause the light to appear dimmer.
gfloat
mash_point_light_get_constant_attenuation
(MashPointLight *light
);
void mash_point_light_set_linear_attenuation (MashPointLight *light
,gfloat attenuation
);
Sets the linear attenuation value on a light. The light intensity is divided by this value multiplied by the distance to the light. Setting a higher value will cause the intensity to dim faster as the vertex moves away from the light.
gfloat
mash_point_light_get_linear_attenuation
(MashPointLight *light
);
void mash_point_light_set_quadratic_attenuation (MashPointLight *light
,gfloat attenuation
);
Sets the quadratic attenuation value on a light. The light intensity is divided by this value multiplied by the square of the distance to the light. Setting a higher value will cause the intensity to dim sharply as the vertex moves away from the light.
gfloat
mash_point_light_get_quadratic_attenuation
(MashPointLight *light
);
struct MashPointLight;
The MashLightClass structure contains only private data.
struct MashPointLightClass { };
The MashPointLightClass structure contains only private data.
“constant-attenuation”
property “constant-attenuation” gfloat
A constant number to add to the attenuation value.
Flags: Read / Write
Allowed values: >= 0
Default value: 1
“linear-attenuation”
property “linear-attenuation” gfloat
This number is multiplied by the distance from the vertex to the light source and added to the attenuation factor.
Flags: Read / Write
Allowed values: >= 0
Default value: 0