import evas_canvas3d_types;
class Evas.Canvas3D.Light (Evas.Canvas3D.Object)
{
[[Evas 3D canvas light class]]
data: Evas_Canvas3D_Light_Data;
methods {
@property directional {
set {
[[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.
\@ref evas_canvas3d_node_look_at_set]]
}
get {
[[Get the directional flag of the given light.
See also @.directional.set]]
}
values {
directional: bool; [[Whether the light is directional ($true), or not ($false).]]
}
}
@property spot_exponent {
set {
[[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 @.spot_cutoff.set]]
}
get {
[[Get the spot exponent of the given light.
See also @.spot_exponent.set]]
}
values {
exponent: Evas.Real; [[Spot exponent value.]]
}
}
@property spot_cutoff {
set {
[[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.]]
}
get {
[[Get the spot cutoff angle of the given light.
See also @.spot_cutoff.set]]
}
values {
cutoff: Evas.Real; [[Cutoff angle in degree..]]
}
}
@property attenuation_enable {
set {
[[Set the attenuation enable flag of the given light.
By default, light attenuation is not enabled.
See also @.attenuation_set]]
}
get {
[[Get the attenuation enable flag of the given light.
See also @.attenuation_enable.set]]
}
values {
enable: bool; [[Whether to enable attenuation ($true), or not ($false)..]]
}
}
ambient_set {
[[Set the ambient color of the given light.
Default ambient color is (0.0, 0.0, 0.0, 1.0).]]
params {
@in r: Evas.Real; [[Red component of the ambient color between [0.0, 1.0].]]
@in g: Evas.Real; [[Green component of the ambient color between [0.0, 1.0].]]
@in b: Evas.Real; [[Blue component of the ambient color between [0.0, 1.0].]]
@in a: Evas.Real; [[Alpha component of the ambient color between [0.0, 1.0].]]
}
}
ambient_get @const {
[[Get the ambient color of the given light.
See also @.ambient_set]]
params {
@out r: Evas.Real; [[Red component of the ambient color between [0.0, 1.0].]]
@out g: Evas.Real; [[Green component of the ambient color between [0.0, 1.0].]]
@out b: Evas.Real; [[Blue component of the ambient color between [0.0, 1.0].]]
@out a: Evas.Real; [[Alpha component of the ambient color between [0.0, 1.0].]]
}
}
diffuse_set {
[[Set the diffuse color of the given light.
Default diffuse color is (1.0, 1.0, 1.0, 1.0).]]
params {
@in r: Evas.Real; [[Red component of the diffuse color between [0.0, 1.0].]]
@in g: Evas.Real; [[Green component of the diffuse color between [0.0, 1.0].]]
@in b: Evas.Real; [[Blue component of the diffuse color between [0.0, 1.0].]]
@in a: Evas.Real; [[Alpha component of the diffuse color between [0.0, 1.0].]]
}
}
diffuse_get @const {
[[Get the diffuse color of the given light.
See also @.diffuse_set]]
params {
@out r: Evas.Real; [[Red component of the diffuse color between [0.0, 1.0].]]
@out g: Evas.Real; [[Green component of the diffuse color between [0.0, 1.0].]]
@out b: Evas.Real; [[Blue component of the diffuse color between [0.0, 1.0].]]
@out a: Evas.Real; [[Alpha component of the diffuse color between [0.0, 1.0].]]
}
}
specular_set {
[[Set the specular color of the given light.
Default specular color is (1.0, 1.0, 1.0, 1.0).]]
params {
@in r: Evas.Real; [[Red component of the specular color between [0.0, 1.0].]]
@in g: Evas.Real; [[Green component of the specular color between [0.0, 1.0].]]
@in b: Evas.Real; [[Blue component of the specular color between [0.0, 1.0].]]
@in a: Evas.Real; [[Alpha component of the specular color between [0.0, 1.0].]]
}
}
specular_get @const {
[[Get the specular color of the given light.
See also @.specular_set]]
params {
@out r: Evas.Real; [[Red component of the specular color between [0.0, 1.0].]]
@out g: Evas.Real; [[Green component of the specular color between [0.0, 1.0].]]
@out b: Evas.Real; [[Blue component of the specular color between [0.0, 1.0].]]
@out a: Evas.Real; [[Alpha component of the specular color between [0.0, 1.0].]]
}
}
attenuation_set {
[[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 @.attenuation_enable.set]]
params {
@in constant: Evas.Real; [[Constant attenuation term..]]
@in linear: Evas.Real; [[Linear attenuation term..]]
@in quadratic: Evas.Real; [[Quadratic attenuation term..]]
}
}
attenuation_get @const {
[[Get the attenuation of the given light.
See also @.attenuation_set]]
params {
@out constant: Evas.Real; [[Constant attenuation term..]]
@out linear: Evas.Real; [[Linear attenuation term..]]
@out quadratic: Evas.Real; [[Quadratic attenuation term..]]
}
}
projection_matrix_set {
[[Set the projection matrix of the given light source.
Default projection matrix is identity matrix.
See also @.projection_perspective_set, @.projection_ortho_set and @.projection_frustum_set]]
params {
@in matrix: ptr(const(Evas.Real)); [[Projection Matrix. Pointer to the array of 16 Evas.Real values in column major order.]]
}
}
projection_matrix_get @const {
[[Get the projection matrix of the given light source.
See also @.projection_matrix_set]]
params {
@out matrix: Evas.Real; [[Projection Matrix]]
}
}
projection_perspective_set {
[[Set the projection matrix of the given light source with perspective projection.
See also @.projection_matrix_set]]
params {
fovy: Evas.Real; [[Field of view angle in Y direction.]]
aspect: Evas.Real; [[Aspect ratio.]]
dnear: Evas.Real; [[Distance to near clipping plane.]]
dfar: Evas.Real; [[Distance to far clipping plane.]]
}
}
projection_frustum_set {
[[Set the projection matrix of the given light source with frustum projection.
@Evas.Canvas3D.Light.projection_matrix_set]]
params {
left: Evas.Real; [[Left X coordinate of the near clipping plane.]]
right: Evas.Real; [[Right X coordinate of the near clipping plane.]]
bottom: Evas.Real; [[Bottom Y coordinate of the near clipping plane.]]
top: Evas.Real; [[Top Y coordinate of the near clipping plane]]
dnear: Evas.Real; [[Distance to near clipping plane.]]
dfar: Evas.Real; [[Distance to far clipping plane.]]
}
}
projection_ortho_set {
[[Set the projection matrix of the given light source with orthogonal projection.
See also @.projection_matrix_set]]
params {
left: Evas.Real; [[Left X coordinate of the near clipping plane.]]
right: Evas.Real; [[Right X coordinate of the near clipping plane.]]
bottom: Evas.Real; [[Bottom Y coordinate of the near clipping plane.]]
top: Evas.Real; [[Top Y coordinate of the near clipping plane]]
dnear: Evas.Real; [[Distance to near clipping plane.]]
dfar: Evas.Real; [[Distance to far clipping plane.]]
}
}
}
implements {
Efl.Object.constructor;
Efl.Object.destructor;
Evas.Canvas3D.Object.update_notify;
Evas.Canvas3D.Object.change_notify;
}
}