Light Object

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files
- Examples

Typedefs | Functions
Light Object
Evas » Evas 3D Extensions

A light object represents a set of properties of a light source. More...

## Typedefs
typedef Eo | Evas_3D_Light
| Light object handle. More...

## Functions
EOAPI void | evas_3d_light_directional_set (Eina_Bool directional)
| Set the directional flag of the given light. More...
EOAPI Eina_Bool | evas_3d_light_directional_get (void)
| Get the directional flag of the given light. More...
EOAPI void | evas_3d_light_spot_exponent_set (Evas_Real exponent)
| Set the spot exponent of the given light. More...
EOAPI Evas_Real | evas_3d_light_spot_exponent_get (void)
| Get the spot exponent of the given light. More...
EOAPI void | evas_3d_light_spot_cutoff_set (Evas_Real cutoff)
| Set the spot cutoff angle of the given light. More...
EOAPI Evas_Real | evas_3d_light_spot_cutoff_get (void)
| Get the spot cutoff angle of the given light. More...
EOAPI void | evas_3d_light_attenuation_enable_set (Eina_Bool enable)
| Set the attenuation enable flag of the given light. More...
EOAPI Eina_Bool | evas_3d_light_attenuation_enable_get (void)
| Get the attenuation enable flag of the given light. More...
EOAPI void | evas_3d_light_ambient_set (Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
| Set the ambient color of the given light. More...
EOAPI void | evas_3d_light_ambient_get (Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a)
| Get the ambient color of the given light. More...
EOAPI void | evas_3d_light_diffuse_set (Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
| Set the diffuse color of the given light. More...
EOAPI void | evas_3d_light_diffuse_get (Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a)
| Get the diffuse color of the given light. More...
EOAPI void | evas_3d_light_specular_set (Evas_Real r, Evas_Real g, Evas_Real b, Evas_Real a)
| Set the specular color of the given light. More...
EOAPI void | evas_3d_light_specular_get (Evas_Real *r, Evas_Real *g, Evas_Real *b, Evas_Real *a)
| Get the specular color of the given light. More...
EOAPI void | evas_3d_light_attenuation_set (Evas_Real constant, Evas_Real linear, Evas_Real quadratic)
| Set the attenuation of the given light. More...
EOAPI void | evas_3d_light_attenuation_get (Evas_Real *constant, Evas_Real *linear, Evas_Real *quadratic)
| Get the attenuation of the given light. More...
EOAPI void | evas_3d_light_projection_matrix_set (const Evas_Real *matrix)
| Set the projection matrix of the given light source. More...
EOAPI void | evas_3d_light_projection_matrix_get (Evas_Real *matrix)
| Get the projection matrix of the given light source. More...
EOAPI void | evas_3d_light_projection_perspective_set (Evas_Real fovy, Evas_Real aspect, Evas_Real dnear, Evas_Real dfar)
| Set the projection matrix of the given light source with perspective projection. More...
EOAPI void | evas_3d_light_projection_frustum_set (Evas_Real left, Evas_Real right, Evas_Real bottom, Evas_Real top, Evas_Real dnear, Evas_Real dfar)
| Set the projection matrix of the given light source with frustum projection. More...
EOAPI void | evas_3d_light_projection_ortho_set (Evas_Real left, Evas_Real right, Evas_Real bottom, Evas_Real top, Evas_Real dnear, Evas_Real dfar)
| Set the projection matrix of the given light source with orthogonal projection. More...
void | evas_3d_light::ambient_set (Evas_Real r_, Evas_Real g_, Evas_Real b_, Evas_Real a_) const
| Set the ambient color of the given light. More...
void | evas_3d_light::ambient_get (Evas_Real *r_, Evas_Real *g_, Evas_Real *b_, Evas_Real *a_) const
| Get the ambient color of the given light. More...
void | evas_3d_light::diffuse_set (Evas_Real r_, Evas_Real g_, Evas_Real b_, Evas_Real a_) const
| Set the diffuse color of the given light. More...
void | evas_3d_light::diffuse_get (Evas_Real *r_, Evas_Real *g_, Evas_Real *b_, Evas_Real *a_) const
| Get the diffuse color of the given light. More...
void | evas_3d_light::specular_set (Evas_Real r_, Evas_Real g_, Evas_Real b_, Evas_Real a_) const
| Set the specular color of the given light. More...
void | evas_3d_light::specular_get (Evas_Real *r_, Evas_Real *g_, Evas_Real *b_, Evas_Real *a_) const
| Get the specular color of the given light. More...
void | evas_3d_light::attenuation_set (Evas_Real constant_, Evas_Real linear_, Evas_Real quadratic_) const
| Set the attenuation of the given light. More...
void | evas_3d_light::attenuation_get (Evas_Real *constant_, Evas_Real *linear_, Evas_Real *quadratic_) const
| Get the attenuation of the given light. More...
void | evas_3d_light::projection_matrix_set (const Evas_Real *matrix_) const
| Set the projection matrix of the given light source. More...
void | evas_3d_light::projection_matrix_get (Evas_Real *matrix_) const
| Get the projection matrix of the given light source. More...
void | evas_3d_light::projection_perspective_set (Evas_Real fovy_, Evas_Real aspect_, Evas_Real dnear_, Evas_Real dfar_) const
| Set the projection matrix of the given light source with perspective projection. More...
void | evas_3d_light::projection_frustum_set (Evas_Real left_, Evas_Real right_, Evas_Real bottom_, Evas_Real top_, Evas_Real dnear_, Evas_Real dfar_) const
| Set the projection matrix of the given light source with frustum projection. More...
void | evas_3d_light::projection_ortho_set (Evas_Real left_, Evas_Real right_, Evas_Real bottom_, Evas_Real top_, Evas_Real dnear_, Evas_Real dfar_) const
| Set the projection matrix of the given light source with orthogonal projection. More...
bool | evas_3d_light::directional_get () const
| Get the directional flag of the given light. More...
void | evas_3d_light::directional_set (bool directional_) const
| Set the directional flag of the given light. More...
Evas_Real | evas_3d_light::spot_exponent_get () const
| Get the spot exponent of the given light. More...
void | evas_3d_light::spot_exponent_set (Evas_Real exponent_) const
| Set the spot exponent of the given light. More...
Evas_Real | evas_3d_light::spot_cutoff_get () const
| Get the spot cutoff angle of the given light. More...
void | evas_3d_light::spot_cutoff_set (Evas_Real cutoff_) const
| Set the spot cutoff angle of the given light. More...
bool | evas_3d_light::attenuation_enable_get () const
| Get the attenuation enable flag of the given light. More...
void | evas_3d_light::attenuation_enable_set (bool enable_) const
| Set the attenuation enable flag of the given light. More...

## Detailed Description

A light object represents a set of properties of a light source.

Evas 3D provides standard reflection model that of ambient, diffuse and specular reflection model. Also, Evas 3D support 3 types of light model, directional, point and spot light. Light position and direction is determined by the node containing the light.

## Typedef Documentation

Evas_3D_Light

Light object handle.

Since
  1.10

## Function Documentation

EOAPI void evas_3d_light_directional_set | ( | Eina_Bool | directional | ) |

Set the directional flag of the given light.

Directional light is a type of light which is infinitely far away with no attenuation. The light direction is determined by the containing node's forward vector (negative Z-axis).

By default, directional is not enabled.

See also
  evas_3d_node_look_at_set()

Parameters

  [in] | directional | Whether the light is directional (`EINA_TRUE`), or not (`EINA_FALSE`).

EOAPI Eina_Bool evas_3d_light_directional_get | ( | void |  | ) |

Get the directional flag of the given light.

See also
  evas_3d_light_directional_set()

EOAPI void evas_3d_light_spot_exponent_set | ( | Evas_Real | exponent | ) |

Set the spot exponent of the given light.

Higher spot exponent means intensity at the center of the cone is relatively stronger. Zero exponent means the light intensity is evenly distibuted. The spot exponent has no effect when the light is not spot light (spot cutoff angle is less than 180 degree).

Default spot exponent is 0.

See also
  evas_3d_light_spot_cutoff_set()

Parameters

  [in] | exponent | Spot exponent value..

EOAPI Evas_Real evas_3d_light_spot_exponent_get | ( | void |  | ) |

Get the spot exponent of the given light.

See also
  evas_3d_light_spot_exponent_set()

EOAPI void evas_3d_light_spot_cutoff_set | ( | Evas_Real | cutoff | ) |

Set the spot cutoff angle of the given light.

Only angle less than 180 degree will make it spot light, so that other spot light attribute will take effect.

Default spot cutoff angle is 180.

Parameters

  [in] | cutoff | Cutoff angle in degree..

EOAPI Evas_Real evas_3d_light_spot_cutoff_get | ( | void |  | ) |

Get the spot cutoff angle of the given light.

See also
  evas_3d_light_spot_cutoff_set()

EOAPI void evas_3d_light_attenuation_enable_set | ( | Eina_Bool | enable | ) |

Set the attenuation enable flag of the given light.

By default, light attenuation is not enabled.

See also
  evas_3d_light_attenuation_set()

Parameters

  [in] | enable | Whether to enable attenuation (`EINA_TRUE`), or not (`EINA_FALSE`)..

EOAPI Eina_Bool evas_3d_light_attenuation_enable_get | ( | void |  | ) |

Get the attenuation enable flag of the given light.

See also
  evas_3d_light_attenuation_enable_set()

EOAPI void evas_3d_light_ambient_set | ( | Evas_Real | r,
|  | Evas_Real | g,
|  | Evas_Real | b,
|  | Evas_Real | a
| ) |  |

Set the ambient color of the given light.

Default ambient color is (0.0, 0.0, 0.0, 1.0).

Parameters

  [in] | r | Red component of the ambient color between [0.0, 1.0].
  [in] | g | Green component of the ambient color between [0.0, 1.0].
  [in] | b | Blue component of the ambient color between [0.0, 1.0].
  [in] | a | Alpha component of the ambient color between [0.0, 1.0].

EOAPI void evas_3d_light_ambient_get | ( | Evas_Real * | r,
|  | Evas_Real * | g,
|  | Evas_Real * | b,
|  | Evas_Real * | a
| ) |  |

Get the ambient color of the given light.

See also
  evas_3d_light_ambient_set()

Parameters

  [out] | r | Red component of the ambient color between [0.0, 1.0].
  [out] | g | Green component of the ambient color between [0.0, 1.0].
  [out] | b | Blue component of the ambient color between [0.0, 1.0].
  [out] | a | Alpha component of the ambient color between [0.0, 1.0].

EOAPI void evas_3d_light_diffuse_set | ( | Evas_Real | r,
|  | Evas_Real | g,
|  | Evas_Real | b,
|  | Evas_Real | a
| ) |  |

Set the diffuse color of the given light.

Default diffuse color is (1.0, 1.0, 1.0, 1.0).

Parameters

  [in] | r | Red component of the diffuse color between [0.0, 1.0].
  [in] | g | Green component of the diffuse color between [0.0, 1.0].
  [in] | b | Blue component of the diffuse color between [0.0, 1.0].
  [in] | a | Alpha component of the diffuse color between [0.0, 1.0].

EOAPI void evas_3d_light_diffuse_get | ( | Evas_Real * | r,
|  | Evas_Real * | g,
|  | Evas_Real * | b,
|  | Evas_Real * | a
| ) |  |

Get the diffuse color of the given light.

See also
  evas_3d_light_diffuse_set()

Parameters

  [out] | r | Red component of the diffuse color between [0.0, 1.0].
  [out] | g | Green component of the diffuse color between [0.0, 1.0].
  [out] | b | Blue component of the diffuse color between [0.0, 1.0].
  [out] | a | Alpha component of the diffuse color between [0.0, 1.0].

EOAPI void evas_3d_light_specular_set | ( | Evas_Real | r,
|  | Evas_Real | g,
|  | Evas_Real | b,
|  | Evas_Real | a
| ) |  |

Set the specular color of the given light.

Default specular color is (1.0, 1.0, 1.0, 1.0).

Parameters

  [in] | r | Red component of the specular color between [0.0, 1.0].
  [in] | g | Green component of the specular color between [0.0, 1.0].
  [in] | b | Blue component of the specular color between [0.0, 1.0].
  [in] | a | Alpha component of the specular color between [0.0, 1.0].

EOAPI void evas_3d_light_specular_get | ( | Evas_Real * | r,
|  | Evas_Real * | g,
|  | Evas_Real * | b,
|  | Evas_Real * | a
| ) |  |

Get the specular color of the given light.

See also
  evas_3d_light_specular_set()

Parameters

  [out] | r | Red component of the specular color between [0.0, 1.0].
  [out] | g | Green component of the specular color between [0.0, 1.0].
  [out] | b | Blue component of the specular color between [0.0, 1.0].
  [out] | a | Alpha component of the specular color between [0.0, 1.0].

EOAPI void evas_3d_light_attenuation_set | ( | Evas_Real | constant,
|  | Evas_Real | linear,
|  | Evas_Real | quadratic
| ) |  |

Set the attenuation of the given light.

Light attenuation has no effect with directional light. And the attenuation should be enabled first to take effect. The attenuation factor is calculated as follows.

atten = 1.0 / constant + linear * distance + quadratic * distance * distance

Default attenuation is constant = 1.0, linear = 0.0, quadratic = 0.0.

See also
  evas_3d_light_attenuation_enable_set()

Parameters

  [in] | constant | Constant attenuation term..
  [in] | linear | Linear attenuation term..
  [in] | quadratic | Quadratic attenuation term..

EOAPI void evas_3d_light_attenuation_get | ( | Evas_Real * | constant,
|  | Evas_Real * | linear,
|  | Evas_Real * | quadratic
| ) |  |

Get the attenuation of the given light.

See also
  evas_3d_light_attenuation_set()

Parameters

  [out] | constant | Constant attenuation term..
  [out] | linear | Linear attenuation term..
  [out] | quadratic | Quadratic attenuation term..

EOAPI void evas_3d_light_projection_matrix_set | ( | const Evas_Real * | matrix | ) |

Set the projection matrix of the given light source.

Parameters

  light | The given light source.
  matrix | Pointer to the array of 16 Evas_Real values in column major order.

Default projection matrix is identity matrix.

See also
  evas_3d_light_projection_perspective_set()
  evas_3d_light_projection_ortho_set()
  evas_3d_light_projection_frustum_set()

Parameters

  [in] | matrix | Projection Matrix

EOAPI void evas_3d_light_projection_matrix_get | ( | Evas_Real * | matrix | ) |

Get the projection matrix of the given light source.

Parameters

  light | The given light source.
  matrix | Pointer to receive the 16 Evas_Real values in column major order.

See also
  evas_3d_light_projection_matrix_set()

Parameters

  [out] | matrix | Projection Matrix

EOAPI void evas_3d_light_projection_perspective_set | ( | Evas_Real | fovy,
|  | Evas_Real | aspect,
|  | Evas_Real | dnear,
|  | Evas_Real | dfar
| ) |  |

Set the projection matrix of the given light source with perspective projection.

Parameters

  light | The given light source.
  fovy | Field of view angle in Y direction.
  aspect | Aspect ratio.
  dnear | Distance to near clipping plane.
  dfar | Distance to far clipping plane.

See also
  evas_3d_light_projection_matrix_set()

Parameters

  [in] | fovy | Field of view angle in Y direction.
  [in] | aspect | Aspect ratio.
  [in] | dnear | Distance to near clipping plane.
  [in] | dfar | Distance to far clipping plane.

EOAPI void evas_3d_light_projection_frustum_set | ( | Evas_Real | left,
|  | Evas_Real | right,
|  | Evas_Real | bottom,
|  | Evas_Real | top,
|  | Evas_Real | dnear,
|  | Evas_Real | dfar
| ) |  |

Set the projection matrix of the given light source with frustum projection.

See also
  evas_3d_Light_projection_matrix_set()

Parameters

  [in] | left | Left X coordinate of the near clipping plane.
  [in] | right | Right X coordinate of the near clipping plane..
  [in] | bottom | Bottom Y coordinate of the near clipping plane.
  [in] | top | Top Y coordinate of the near clipping plane
  [in] | dnear | Distance to near clipping plane.
  [in] | dfar | Distance to far clipping plane.

EOAPI void evas_3d_light_projection_ortho_set | ( | Evas_Real | left,
|  | Evas_Real | right,
|  | Evas_Real | bottom,
|  | Evas_Real | top,
|  | Evas_Real | dnear,
|  | Evas_Real | dfar
| ) |  |

Set the projection matrix of the given light source with orthogonal projection.

See also
  evas_3d_light_projection_matrix_set()

Parameters

  [in] | left | Left X coordinate of the near clipping plane.
  [in] | right | Right X coordinate of the near clipping plane..
  [in] | bottom | Bottom Y coordinate of the near clipping plane.
  [in] | top | Top Y coordinate of the near clipping plane
  [in] | dnear | Distance to near clipping plane.
  [in] | dfar | Distance to far clipping plane.

void evas_3d_light::ambient_set | ( | Evas_Real | r_,
|  | Evas_Real | g_,
|  | Evas_Real | b_,
|  | Evas_Real | a_
| ) |  | const

Set the ambient color of the given light.

Default ambient color is (0.0, 0.0, 0.0, 1.0).

Parameters

  r | Red component of the ambient color between [0.0, 1.0].
  g | Green component of the ambient color between [0.0, 1.0].
  b | Blue component of the ambient color between [0.0, 1.0].
  a | Alpha component of the ambient color between [0.0, 1.0].

void evas_3d_light::ambient_get | ( | Evas_Real * | r_,
|  | Evas_Real * | g_,
|  | Evas_Real * | b_,
|  | Evas_Real * | a_
| ) |  | const

Get the ambient color of the given light.

See also
  evas_3d_light_ambient_set()

Parameters

  [out] | r | Red component of the ambient color between [0.0, 1.0].
  [out] | g | Green component of the ambient color between [0.0, 1.0].
  [out] | b | Blue component of the ambient color between [0.0, 1.0].
  [out] | a | Alpha component of the ambient color between [0.0, 1.0].

void evas_3d_light::diffuse_set | ( | Evas_Real | r_,
|  | Evas_Real | g_,
|  | Evas_Real | b_,
|  | Evas_Real | a_
| ) |  | const

Set the diffuse color of the given light.

Default diffuse color is (1.0, 1.0, 1.0, 1.0).

Parameters

  r | Red component of the diffuse color between [0.0, 1.0].
  g | Green component of the diffuse color between [0.0, 1.0].
  b | Blue component of the diffuse color between [0.0, 1.0].
  a | Alpha component of the diffuse color between [0.0, 1.0].

void evas_3d_light::diffuse_get | ( | Evas_Real * | r_,
|  | Evas_Real * | g_,
|  | Evas_Real * | b_,
|  | Evas_Real * | a_
| ) |  | const

Get the diffuse color of the given light.

See also
  evas_3d_light_diffuse_set()

Parameters

  [out] | r | Red component of the diffuse color between [0.0, 1.0].
  [out] | g | Green component of the diffuse color between [0.0, 1.0].
  [out] | b | Blue component of the diffuse color between [0.0, 1.0].
  [out] | a | Alpha component of the diffuse color between [0.0, 1.0].

void evas_3d_light::specular_set | ( | Evas_Real | r_,
|  | Evas_Real | g_,
|  | Evas_Real | b_,
|  | Evas_Real | a_
| ) |  | const

Set the specular color of the given light.

Default specular color is (1.0, 1.0, 1.0, 1.0).

Parameters

  r | Red component of the specular color between [0.0, 1.0].
  g | Green component of the specular color between [0.0, 1.0].
  b | Blue component of the specular color between [0.0, 1.0].
  a | Alpha component of the specular color between [0.0, 1.0].

void evas_3d_light::specular_get | ( | Evas_Real * | r_,
|  | Evas_Real * | g_,
|  | Evas_Real * | b_,
|  | Evas_Real * | a_
| ) |  | const

Get the specular color of the given light.

See also
  evas_3d_light_specular_set()

Parameters

  [out] | r | Red component of the specular color between [0.0, 1.0].
  [out] | g | Green component of the specular color between [0.0, 1.0].
  [out] | b | Blue component of the specular color between [0.0, 1.0].
  [out] | a | Alpha component of the specular color between [0.0, 1.0].

void evas_3d_light::attenuation_set | ( | Evas_Real | constant_,
|  | Evas_Real | linear_,
|  | Evas_Real | quadratic_
| ) |  | const

Set the attenuation of the given light.

Light attenuation has no effect with directional light. And the attenuation should be enabled first to take effect. The attenuation factor is calculated as follows.

atten = 1.0 / constant + linear * distance + quadratic * distance * distance

Default attenuation is constant = 1.0, linear = 0.0, quadratic = 0.0.

See also
  evas_3d_light_attenuation_enable_set()

Parameters

  constant | Constant attenuation term..
  linear | Linear attenuation term..
  quadratic | Quadratic attenuation term..

void evas_3d_light::attenuation_get | ( | Evas_Real * | constant_,
|  | Evas_Real * | linear_,
|  | Evas_Real * | quadratic_
| ) |  | const

Get the attenuation of the given light.

See also
  evas_3d_light_attenuation_set()

Parameters

  [out] | constant | Constant attenuation term..
  [out] | linear | Linear attenuation term..
  [out] | quadratic | Quadratic attenuation term..

void evas_3d_light::projection_matrix_set | ( | const Evas_Real * | matrix_ | ) | const

Set the projection matrix of the given light source.

Parameters

  light | The given light source.
  matrix | Pointer to the array of 16 Evas_Real values in column major order.

Default projection matrix is identity matrix.

See also
  evas_3d_light_projection_perspective_set()
  evas_3d_light_projection_ortho_set()
  evas_3d_light_projection_frustum_set()

Parameters

  matrix | Projection Matrix

void evas_3d_light::projection_matrix_get | ( | Evas_Real * | matrix_ | ) | const

Get the projection matrix of the given light source.

Parameters

  light | The given light source.
  matrix | Pointer to receive the 16 Evas_Real values in column major order.

See also
  evas_3d_light_projection_matrix_set()

Parameters

  [out] | matrix | Projection Matrix

void evas_3d_light::projection_perspective_set | ( | Evas_Real | fovy_,
|  | Evas_Real | aspect_,
|  | Evas_Real | dnear_,
|  | Evas_Real | dfar_
| ) |  | const

Set the projection matrix of the given light source with perspective projection.

Parameters

  light | The given light source.
  fovy | Field of view angle in Y direction.
  aspect | Aspect ratio.
  dnear | Distance to near clipping plane.
  dfar | Distance to far clipping plane.

See also
  evas_3d_light_projection_matrix_set()

Parameters

  fovy | Field of view angle in Y direction.
  aspect | Aspect ratio.
  dnear | Distance to near clipping plane.
  dfar | Distance to far clipping plane.

void evas_3d_light::projection_frustum_set | ( | Evas_Real | left_,
|  | Evas_Real | right_,
|  | Evas_Real | bottom_,
|  | Evas_Real | top_,
|  | Evas_Real | dnear_,
|  | Evas_Real | dfar_
| ) |  | const

Set the projection matrix of the given light source with frustum projection.

See also
  evas_3d_Light_projection_matrix_set()

Parameters

  left | Left X coordinate of the near clipping plane.
  right | Right X coordinate of the near clipping plane..
  bottom | Bottom Y coordinate of the near clipping plane.
  top | Top Y coordinate of the near clipping plane
  dnear | Distance to near clipping plane.
  dfar | Distance to far clipping plane.

void evas_3d_light::projection_ortho_set | ( | Evas_Real | left_,
|  | Evas_Real | right_,
|  | Evas_Real | bottom_,
|  | Evas_Real | top_,
|  | Evas_Real | dnear_,
|  | Evas_Real | dfar_
| ) |  | const

Set the projection matrix of the given light source with orthogonal projection.

See also
  evas_3d_light_projection_matrix_set()

Parameters

  left | Left X coordinate of the near clipping plane.
  right | Right X coordinate of the near clipping plane..
  bottom | Bottom Y coordinate of the near clipping plane.
  top | Top Y coordinate of the near clipping plane
  dnear | Distance to near clipping plane.
  dfar | Distance to far clipping plane.

bool evas_3d_light::directional_get | ( |  | ) | const

Get the directional flag of the given light.

See also
  evas_3d_light_directional_set()

Parameters

  directional | Whether the light is directional (`EINA_TRUE`), or not (`EINA_FALSE`).

void evas_3d_light::directional_set | ( | bool | directional_ | ) | const

Set the directional flag of the given light.

Directional light is a type of light which is infinitely far away with no attenuation. The light direction is determined by the containing node's forward vector (negative Z-axis).

By default, directional is not enabled.

See also
  evas_3d_node_look_at_set()

Parameters

  directional | Whether the light is directional (`EINA_TRUE`), or not (`EINA_FALSE`).

Evas_Real evas_3d_light::spot_exponent_get | ( |  | ) | const

Get the spot exponent of the given light.

See also
  evas_3d_light_spot_exponent_set()

Parameters

  exponent | Spot exponent value..

void evas_3d_light::spot_exponent_set | ( | Evas_Real | exponent_ | ) | const

Set the spot exponent of the given light.

Higher spot exponent means intensity at the center of the cone is relatively stronger. Zero exponent means the light intensity is evenly distibuted. The spot exponent has no effect when the light is not spot light (spot cutoff angle is less than 180 degree).

Default spot exponent is 0.

See also
  evas_3d_light_spot_cutoff_set()

Parameters

  exponent | Spot exponent value..

Evas_Real evas_3d_light::spot_cutoff_get | ( |  | ) | const

Get the spot cutoff angle of the given light.

See also
  evas_3d_light_spot_cutoff_set()

Parameters

  cutoff | Cutoff angle in degree..

void evas_3d_light::spot_cutoff_set | ( | Evas_Real | cutoff_ | ) | const

Set the spot cutoff angle of the given light.

Only angle less than 180 degree will make it spot light, so that other spot light attribute will take effect.

Default spot cutoff angle is 180.

Parameters

  cutoff | Cutoff angle in degree..

bool evas_3d_light::attenuation_enable_get | ( |  | ) | const

Get the attenuation enable flag of the given light.

See also
  evas_3d_light_attenuation_enable_set()

Parameters

  enable | Whether to enable attenuation (`EINA_TRUE`), or not (`EINA_FALSE`)..

void evas_3d_light::attenuation_enable_set | ( | bool | enable_ | ) | const

Set the attenuation enable flag of the given light.

By default, light attenuation is not enabled.

See also
  evas_3d_light_attenuation_set()

Parameters

  enable | Whether to enable attenuation (`EINA_TRUE`), or not (`EINA_FALSE`)..