2015-06-19 02:34:48 -07:00
|
|
|
class Evas.Canvas3D.Light (Evas.Canvas3D.Object, Evas.Common_Interface)
|
2014-04-14 03:03:47 -07:00
|
|
|
{
|
2014-04-26 00:10:06 -07:00
|
|
|
legacy_prefix: null;
|
2015-06-17 07:31:14 -07:00
|
|
|
data: Evas_Canvas3D_Light_Data;
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-05-07 08:36:45 -07:00
|
|
|
methods {
|
|
|
|
@property directional {
|
2014-04-14 03:03:47 -07:00
|
|
|
set {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Set the directional flag of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
\@ref evas_canvas3d_node_look_at_set]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Get the directional flag of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.directional.set]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-07-16 03:16:45 -07:00
|
|
|
directional: bool; [[Whether the light is directional ($true), or not ($false).]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-07 08:36:45 -07:00
|
|
|
@property spot_exponent {
|
2014-04-14 03:03:47 -07:00
|
|
|
set {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Set the spot exponent of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.spot_cutoff.set]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Get the spot exponent of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.spot_exponent.set]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-07-16 03:16:45 -07:00
|
|
|
exponent: Evas_Real; [[Spot exponent value.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-07 08:36:45 -07:00
|
|
|
@property spot_cutoff {
|
2014-04-14 03:03:47 -07:00
|
|
|
set {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Set the spot cutoff angle of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
|
|
|
Only angle less than 180 degree will make it spot light, so that other spot
|
|
|
|
light attribute will take effect.
|
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
Default spot cutoff angle is 180.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Get the spot cutoff angle of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.spot_cutoff.set]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-07-16 03:16:45 -07:00
|
|
|
cutoff: Evas_Real; [[Cutoff angle in degree..]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-07 08:36:45 -07:00
|
|
|
@property attenuation_enable {
|
2014-04-14 03:03:47 -07:00
|
|
|
set {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Set the attenuation enable flag of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
|
|
|
By default, light attenuation is not enabled.
|
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.attenuation_set]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Get the attenuation enable flag of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.attenuation_enable.set]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
values {
|
2015-07-16 03:16:45 -07:00
|
|
|
enable: bool; [[Whether to enable attenuation ($true), or not ($false)..]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
2015-05-07 08:36:45 -07:00
|
|
|
|
2014-04-14 03:03:47 -07:00
|
|
|
ambient_set {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Set the ambient color of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
Default ambient color is (0.0, 0.0, 0.0, 1.0).]]
|
2014-04-14 03:03:47 -07:00
|
|
|
params {
|
2015-07-16 03:16:45 -07:00
|
|
|
@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].]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
2014-07-22 09:13:24 -07:00
|
|
|
ambient_get @const {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Get the ambient color of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.ambient_set]]
|
2014-04-14 03:03:47 -07:00
|
|
|
params {
|
2015-07-16 03:16:45 -07:00
|
|
|
@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].]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
diffuse_set {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Set the diffuse color of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
Default diffuse color is (1.0, 1.0, 1.0, 1.0).]]
|
2014-04-14 03:03:47 -07:00
|
|
|
params {
|
2015-07-16 03:16:45 -07:00
|
|
|
@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].]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
2014-07-22 09:13:24 -07:00
|
|
|
diffuse_get @const {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Get the diffuse color of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.diffuse_set]]
|
2014-04-14 03:03:47 -07:00
|
|
|
params {
|
2015-07-16 03:16:45 -07:00
|
|
|
@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].]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
specular_set {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Set the specular color of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
Default specular color is (1.0, 1.0, 1.0, 1.0).]]
|
2014-04-14 03:03:47 -07:00
|
|
|
params {
|
2015-07-16 03:16:45 -07:00
|
|
|
@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].]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
2014-07-22 09:13:24 -07:00
|
|
|
specular_get @const {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Get the specular color of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.specular_set]]
|
2014-04-14 03:03:47 -07:00
|
|
|
params {
|
2015-07-16 03:16:45 -07:00
|
|
|
@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].]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
attenuation_set {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Set the attenuation of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.attenuation_enable.set]]
|
2014-04-14 03:03:47 -07:00
|
|
|
params {
|
2015-07-16 03:16:45 -07:00
|
|
|
@in constant: Evas_Real; [[Constant attenuation term..]]
|
|
|
|
@in linear: Evas_Real; [[Linear attenuation term..]]
|
|
|
|
@in quadratic: Evas_Real; [[Quadratic attenuation term..]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-22 09:13:24 -07:00
|
|
|
attenuation_get @const {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Get the attenuation of the given light.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.attenuation_set]]
|
2014-04-14 03:03:47 -07:00
|
|
|
params {
|
2015-07-16 03:16:45 -07:00
|
|
|
@out constant: Evas_Real; [[Constant attenuation term..]]
|
|
|
|
@out linear: Evas_Real; [[Linear attenuation term..]]
|
|
|
|
@out quadratic: Evas_Real; [[Quadratic attenuation term..]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
2014-09-03 05:06:03 -07:00
|
|
|
|
|
|
|
projection_matrix_set {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Set the projection matrix of the given light source.
|
2014-09-03 05:06:03 -07:00
|
|
|
|
|
|
|
Default projection matrix is identity matrix.
|
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.projection_perspective_set, @.projection_ortho_set and @.projection_frustum_set]]
|
2014-09-03 05:06:03 -07:00
|
|
|
params {
|
2015-07-16 03:16:45 -07:00
|
|
|
@in matrix: const(Evas_Real) *; [[Projection Matrix. Pointer to the array of 16 Evas_Real values in column major order.]]
|
2014-09-03 05:06:03 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
projection_matrix_get @const {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Get the projection matrix of the given light source.
|
2014-09-03 05:06:03 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.projection_matrix_set]]
|
2014-09-03 05:06:03 -07:00
|
|
|
params {
|
2015-07-16 03:16:45 -07:00
|
|
|
@out matrix: Evas_Real; [[Projection Matrix]]
|
2014-09-03 05:06:03 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
projection_perspective_set {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Set the projection matrix of the given light source with perspective projection.
|
2014-09-03 05:06:03 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.projection_matrix_set]]
|
2014-09-03 05:06:03 -07:00
|
|
|
|
|
|
|
params {
|
2015-07-16 03:16:45 -07:00
|
|
|
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.]]
|
2014-09-03 05:06:03 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
projection_frustum_set {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Set the projection matrix of the given light source with frustum projection.
|
2014-09-03 05:06:03 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
@Evas.Canvas3D.Light.projection_matrix_set]]
|
2014-09-03 05:06:03 -07:00
|
|
|
params {
|
2015-07-16 03:16:45 -07:00
|
|
|
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.]]
|
2014-09-03 05:06:03 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
projection_ortho_set {
|
2015-07-16 03:16:45 -07:00
|
|
|
[[Set the projection matrix of the given light source with orthogonal projection.
|
2014-09-03 05:06:03 -07:00
|
|
|
|
2015-07-16 03:16:45 -07:00
|
|
|
See also @.projection_matrix_set]]
|
2014-09-03 05:06:03 -07:00
|
|
|
params {
|
2015-07-16 03:16:45 -07:00
|
|
|
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.]]
|
2014-09-03 05:06:03 -07:00
|
|
|
}
|
|
|
|
}
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
implements {
|
2014-06-20 03:14:59 -07:00
|
|
|
Eo.Base.constructor;
|
|
|
|
Eo.Base.destructor;
|
2015-06-19 02:34:48 -07:00
|
|
|
Evas.Canvas3D.Object.update_notify;
|
|
|
|
Evas.Canvas3D.Object.change_notify;
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|