356 lines
11 KiB
Plaintext
356 lines
11 KiB
Plaintext
class Evas_3D_Light (Evas_3D_Object, Evas.Common_Interface)
|
|
{
|
|
legacy_prefix: null;
|
|
data: Evas_3D_Light_Data;
|
|
|
|
properties {
|
|
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.
|
|
|
|
@see evas_3d_node_look_at_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
}
|
|
get {
|
|
/*@
|
|
Get the directional flag of the given light.
|
|
|
|
@see evas_3d_light_directional_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
}
|
|
values {
|
|
bool directional; /*@ Whether the light is directional (@c EINA_TRUE), or not (@c EINA_FALSE).*/
|
|
}
|
|
}
|
|
|
|
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 evas_3d_light_spot_cutoff_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
}
|
|
get {
|
|
/*@
|
|
Get the spot exponent of the given light.
|
|
|
|
@see evas_3d_light_spot_exponent_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
}
|
|
values {
|
|
Evas_Real exponent; /*@ Spot exponent value..*/
|
|
}
|
|
}
|
|
|
|
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.
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
}
|
|
get {
|
|
/*@
|
|
Get the spot cutoff angle of the given light.
|
|
|
|
@see evas_3d_light_spot_cutoff_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
}
|
|
values {
|
|
Evas_Real cutoff; /*@ Cutoff angle in degree..*/
|
|
}
|
|
}
|
|
|
|
attenuation_enable {
|
|
set {
|
|
/*@
|
|
Set the attenuation enable flag of the given light.
|
|
|
|
By default, light attenuation is not enabled.
|
|
|
|
@see evas_3d_light_attenuation_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
}
|
|
get {
|
|
/*@
|
|
Get the attenuation enable flag of the given light.
|
|
|
|
@see evas_3d_light_attenuation_enable_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
}
|
|
values {
|
|
bool enable; /*@ Whether to enable attenuation (@c EINA_TRUE), or not (@c EINA_FALSE)..*/
|
|
}
|
|
}
|
|
}
|
|
methods {
|
|
ambient_set {
|
|
/*@
|
|
Set the ambient color of the given light.
|
|
|
|
Default ambient color is (0.0, 0.0, 0.0, 1.0).
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
params {
|
|
@in Evas_Real r; /*@ Red component of the ambient color between [0.0, 1.0]. */
|
|
@in Evas_Real g; /*@ Green component of the ambient color between [0.0, 1.0]. */
|
|
@in Evas_Real b; /*@ Blue component of the ambient color between [0.0, 1.0]. */
|
|
@in Evas_Real a; /*@ Alpha component of the ambient color between [0.0, 1.0]. */
|
|
}
|
|
}
|
|
ambient_get @const {
|
|
/*@
|
|
Get the ambient color of the given light.
|
|
|
|
@see evas_3d_light_ambient_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
params {
|
|
@out Evas_Real r; /*@ Red component of the ambient color between [0.0, 1.0]. */
|
|
@out Evas_Real g; /*@ Green component of the ambient color between [0.0, 1.0]. */
|
|
@out Evas_Real b; /*@ Blue component of the ambient color between [0.0, 1.0]. */
|
|
@out Evas_Real a; /*@ 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).
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
params {
|
|
@in Evas_Real r; /*@ Red component of the diffuse color between [0.0, 1.0]. */
|
|
@in Evas_Real g; /*@ Green component of the diffuse color between [0.0, 1.0]. */
|
|
@in Evas_Real b; /*@ Blue component of the diffuse color between [0.0, 1.0]. */
|
|
@in Evas_Real a; /*@ Alpha component of the diffuse color between [0.0, 1.0]. */
|
|
}
|
|
}
|
|
diffuse_get @const {
|
|
/*@
|
|
Get the diffuse color of the given light.
|
|
|
|
@see evas_3d_light_diffuse_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
params {
|
|
@out Evas_Real r; /*@ Red component of the diffuse color between [0.0, 1.0]. */
|
|
@out Evas_Real g; /*@ Green component of the diffuse color between [0.0, 1.0]. */
|
|
@out Evas_Real b; /*@ Blue component of the diffuse color between [0.0, 1.0]. */
|
|
@out Evas_Real a; /*@ 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).
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
params {
|
|
@in Evas_Real r; /*@ Red component of the specular color between [0.0, 1.0]. */
|
|
@in Evas_Real g; /*@ Green component of the specular color between [0.0, 1.0]. */
|
|
@in Evas_Real b; /*@ Blue component of the specular color between [0.0, 1.0]. */
|
|
@in Evas_Real a; /*@ Alpha component of the specular color between [0.0, 1.0]. */
|
|
}
|
|
}
|
|
specular_get @const {
|
|
/*@
|
|
Get the specular color of the given light.
|
|
|
|
@see evas_3d_light_specular_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
params {
|
|
@out Evas_Real r; /*@ Red component of the specular color between [0.0, 1.0]. */
|
|
@out Evas_Real g; /*@ Green component of the specular color between [0.0, 1.0]. */
|
|
@out Evas_Real b; /*@ Blue component of the specular color between [0.0, 1.0]. */
|
|
@out Evas_Real a; /*@ 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 evas_3d_light_attenuation_enable_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
params {
|
|
@in Evas_Real constant; /*@ Constant attenuation term..*/
|
|
@in Evas_Real linear; /*@ Linear attenuation term..*/
|
|
@in Evas_Real quadratic; /*@ Quadratic attenuation term..*/
|
|
}
|
|
}
|
|
|
|
attenuation_get @const {
|
|
/*@
|
|
Get the attenuation of the given light.
|
|
|
|
@see evas_3d_light_attenuation_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
params {
|
|
@out Evas_Real constant; /*@ Constant attenuation term..*/
|
|
@out Evas_Real linear; /*@ Linear attenuation term..*/
|
|
@out Evas_Real quadratic; /*@ Quadratic attenuation term..*/
|
|
}
|
|
}
|
|
|
|
projection_matrix_set {
|
|
/*@
|
|
Set the projection matrix of the given light source.
|
|
|
|
@param light The given light source.
|
|
@param matrix Pointer to the array of 16 Evas_Real values in column major order.
|
|
|
|
Default projection matrix is identity matrix.
|
|
|
|
@see evas_3d_light_projection_perspective_set()
|
|
@see evas_3d_light_projection_ortho_set()
|
|
@see evas_3d_light_projection_frustum_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
params {
|
|
@in const(Evas_Real) *matrix; /*@ Projection Matrix */
|
|
}
|
|
}
|
|
|
|
projection_matrix_get @const {
|
|
/*@
|
|
Get the projection matrix of the given light source.
|
|
|
|
@param light The given light source.
|
|
@param matrix Pointer to receive the 16 Evas_Real values in column major order.
|
|
|
|
@see evas_3d_light_projection_matrix_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
params {
|
|
@out Evas_Real matrix; /*@ Projection Matrix */
|
|
}
|
|
}
|
|
|
|
projection_perspective_set {
|
|
/*@
|
|
Set the projection matrix of the given light source with perspective projection.
|
|
|
|
@param light The given light source.
|
|
@param fovy Field of view angle in Y direction.
|
|
@param aspect Aspect ratio.
|
|
@param dnear Distance to near clipping plane.
|
|
@param dfar Distance to far clipping plane.
|
|
|
|
@see evas_3d_light_projection_matrix_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
|
|
params {
|
|
Evas_Real fovy; /*@ Field of view angle in Y direction. */
|
|
Evas_Real aspect; /*@ Aspect ratio.*/
|
|
Evas_Real dnear; /*@ Distance to near clipping plane. */
|
|
Evas_Real dfar; /*@ Distance to far clipping plane. */
|
|
}
|
|
}
|
|
|
|
projection_frustum_set {
|
|
/*@
|
|
Set the projection matrix of the given light source with frustum projection.
|
|
|
|
@see evas_3d_Light_projection_matrix_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
params {
|
|
Evas_Real left; /*@ Left X coordinate of the near clipping plane. */
|
|
Evas_Real right; /*@ Right X coordinate of the near clipping plane..*/
|
|
Evas_Real bottom; /*@ Bottom Y coordinate of the near clipping plane. */
|
|
Evas_Real top; /*@ Top Y coordinate of the near clipping plane */
|
|
Evas_Real dnear; /*@ Distance to near clipping plane. */
|
|
Evas_Real dfar; /*@ Distance to far clipping plane. */
|
|
}
|
|
}
|
|
projection_ortho_set {
|
|
/*@
|
|
Set the projection matrix of the given light source with orthogonal projection.
|
|
|
|
@see evas_3d_light_projection_matrix_set()
|
|
|
|
@ingroup Evas_3D_Light
|
|
*/
|
|
params {
|
|
Evas_Real left; /*@ Left X coordinate of the near clipping plane. */
|
|
Evas_Real right; /*@ Right X coordinate of the near clipping plane..*/
|
|
Evas_Real bottom; /*@ Bottom Y coordinate of the near clipping plane. */
|
|
Evas_Real top; /*@ Top Y coordinate of the near clipping plane */
|
|
Evas_Real dnear; /*@ Distance to near clipping plane. */
|
|
Evas_Real dfar; /*@ Distance to far clipping plane. */
|
|
}
|
|
}
|
|
}
|
|
|
|
implements {
|
|
Eo.Base.constructor;
|
|
Eo.Base.destructor;
|
|
Evas_3D_Object.update_notify;
|
|
Evas_3D_Object.change_notify;
|
|
}
|
|
|
|
}
|