Efl.Gfx.Mapping.lighting_3d

Description

Apply a lighting effect on the object.

This is used to apply lighting calculations (from a single light source) to a given mapped object. The R, G and B values of each vertex will be modified to reflect the lighting based on the light point coordinates, the light color and the ambient color, and at what angle the map is facing the light source. A surface should have its points be declared in a clockwise fashion if the face is "facing" towards you (as opposed to away from you) as faces have a "logical" side for lighting.

The coordinates are set relative to the given pivot object. If its geometry changes, then the absolute position of the rotation center will change accordingly. The Z position is absolute. If the pivot is null then this object will be its own pivot.

Since 1.22

Signature

lighting_3d {
    params {
        @in pivot: const(Efl.Gfx.Entity);
        @in lx: double;
        @in ly: double;
        @in lz: double;
        @in lr: int;
        @in lg: int;
        @in lb: int;
        @in ar: int;
        @in ag: int;
        @in ab: int;
    }
}

C signature

void efl_gfx_mapping_lighting_3d(Eo *obj, const Efl_Gfx_Entity *pivot, double lx, double ly, double lz, int lr, int lg, int lb, int ar, int ag, int ab);

Parameters

  • pivot (in) - A pivot object for the light point, can be null.
  • lx (in) - X relative coordinate in space of light point.
  • ly (in) - Y relative coordinate in space of light point.
  • lz (in) - Z absolute coordinate in space of light point.
  • lr (in) - Light red value (0 - 255).
  • lg (in) - Light green value (0 - 255).
  • lb (in) - Light blue value (0 - 255).
  • ar (in) - Ambient color red value (0 - 255).
  • ag (in) - Ambient color green value (0 - 255).
  • ab (in) - Ambient color blue value (0 - 255).

Implemented by