2017-05-16 01:54:37 -07:00
|
|
|
import evas_canvas3d_types;
|
2015-07-14 03:19:35 -07:00
|
|
|
|
2016-06-20 23:45:31 -07:00
|
|
|
class Evas.Canvas3D.Scene (Evas.Canvas3D.Object)
|
2014-04-14 03:03:47 -07:00
|
|
|
{
|
2016-11-15 02:38:18 -08:00
|
|
|
[[Efl 3D canvas scene class]]
|
2015-06-17 07:31:14 -07:00
|
|
|
data: Evas_Canvas3D_Scene_Data;
|
2014-04-14 03:03:47 -07:00
|
|
|
methods {
|
|
|
|
size_set {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Set the resolution of a scene.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-07-30 04:38:51 -07:00
|
|
|
A scene should be rendered to be displayed through an image
|
|
|
|
objects. The resolution defines size of the internal surface
|
|
|
|
holding the rendered result.
|
|
|
|
]]
|
2014-04-14 03:03:47 -07:00
|
|
|
params {
|
2015-07-30 04:38:51 -07:00
|
|
|
@in w: int; [[Width of the resolution.]]
|
|
|
|
@in h: int; [[Height of the resolution.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-22 09:13:24 -07:00
|
|
|
size_get @const {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Get the internal resolution of a scene.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
params {
|
2015-07-30 04:38:51 -07:00
|
|
|
@out w: int; [[Pointer to receive width of the resolution.]]
|
|
|
|
@out h: int; [[Pointer to receive height of the resolution.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
background_color_set {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Set the background color of a scene.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-07-30 04:38:51 -07:00
|
|
|
Background color defines initial color of pixels before a scene
|
|
|
|
is rendered. If you want to display a scene with background evas
|
|
|
|
objects are still remaining as if it was the background, set
|
|
|
|
the alpha term to 0.0.
|
2014-04-14 03:03:47 -07:00
|
|
|
|
|
|
|
Default background color is (0.0, 0.0, 0.0, 0.0).
|
2015-07-30 04:38:51 -07:00
|
|
|
]]
|
2014-04-14 03:03:47 -07:00
|
|
|
params {
|
2015-07-14 03:19:35 -07:00
|
|
|
@in r: Evas.Real; [[Red component of the background color.]]
|
|
|
|
@in g: Evas.Real; [[Green component of the background color.]]
|
|
|
|
@in b: Evas.Real; [[Blue component of the background color.]]
|
|
|
|
@in a: Evas.Real; [[Alpha component of the background color.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-22 09:13:24 -07:00
|
|
|
background_color_get @const {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Get the background color of a scene.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
params {
|
2015-07-14 03:19:35 -07:00
|
|
|
@out r: Evas.Real; [[Pointer to receive red component of the background color.]]
|
|
|
|
@out g: Evas.Real; [[Pointer to receive green component of the background color.]]
|
|
|
|
@out b: Evas.Real; [[Pointer to receive blue component of the background color.]]
|
|
|
|
@out a: Evas.Real; [[Pointer to receive alpha component of the background color.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-22 09:13:24 -07:00
|
|
|
pick @const {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Get information on the most front visible mesh for the given
|
|
|
|
position.
|
|
|
|
|
|
|
|
(x, y) is the screen coordinate of the given scene. That is,
|
|
|
|
left-top is (0, 0) and right-bottom is (w, h) where (w, h) is
|
|
|
|
the size of the scene. The texture coordinate is useful when
|
|
|
|
using proxy texture source.
|
|
|
|
]]
|
2016-11-15 02:38:18 -08:00
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
2014-04-14 03:03:47 -07:00
|
|
|
params {
|
2016-05-23 07:41:28 -07:00
|
|
|
@in x: Evas.Real; [[X coordinate of the picking position.]]
|
|
|
|
@in y: Evas.Real; [[Y coordinate of the picking position.]]
|
|
|
|
@out node: Evas.Canvas3D.Node; [[Pointer to receive the node contains the picked mesh.]]
|
|
|
|
@out mesh: Evas.Canvas3D.Mesh; [[Pointer to receive the picked mesh.]]
|
|
|
|
@out s: Evas.Real; [[Pointer to receive the texture "s" coordinate.]]
|
|
|
|
@out t: Evas.Real; [[Pointer to receive the texture "t" coordinate.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-22 09:13:24 -07:00
|
|
|
exist @const {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Search given node in the given position.]]
|
2016-11-15 02:38:18 -08:00
|
|
|
return: Evas.Canvas3D.Node; [[Node at the given position]]
|
2014-05-28 02:24:58 -07:00
|
|
|
params {
|
2015-07-14 03:19:35 -07:00
|
|
|
@in x: Evas.Real; [[X coordinate of the picking position.]]
|
|
|
|
@in y: Evas.Real; [[Y coordinate of the picking position.]]
|
2016-05-23 07:41:28 -07:00
|
|
|
@in node: Evas.Canvas3D.Node; [[Node for search.]]
|
2014-05-28 02:24:58 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-22 09:13:24 -07:00
|
|
|
pick_member_list_get @const {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Get list of the all root members from scene in the given position.]]
|
2016-11-15 02:38:18 -08:00
|
|
|
return: list<Evas.Canvas3D.Node>; [[List of all root members from scene]]
|
2014-05-28 02:24:58 -07:00
|
|
|
params {
|
2015-07-14 03:19:35 -07:00
|
|
|
@in x: Evas.Real; [[X coordinate of the picking position.]]
|
|
|
|
@in y: Evas.Real; [[Y coordinate of the picking position.]]
|
2014-05-28 02:24:58 -07:00
|
|
|
}
|
|
|
|
}
|
2014-09-03 05:06:03 -07:00
|
|
|
shadows_enable_set {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Enable or disable shadows on given scene
|
2014-09-03 05:06:03 -07:00
|
|
|
|
2015-07-30 04:38:51 -07:00
|
|
|
If shadows_enabled is $true, the objects in the scene can throw
|
|
|
|
shadow to another objects located behind them. The depth map used
|
|
|
|
for shading. Directed and projective light sources are supported.
|
|
|
|
]]
|
2014-09-03 05:06:03 -07:00
|
|
|
params {
|
2015-07-30 04:38:51 -07:00
|
|
|
@in shadows_enabled: bool; [[Shadows enabled status.]]
|
2014-09-03 05:06:03 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
shadows_enable_get @const {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Get shadows enabled status for given scene.]]
|
|
|
|
return: bool; [[The shadows enabled status.]]
|
2014-09-03 05:06:03 -07:00
|
|
|
}
|
2015-02-11 08:44:42 -08:00
|
|
|
color_pick_enable_get @const {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Get status of color picking of the scene.]]
|
2016-11-15 02:38:18 -08:00
|
|
|
return: bool; [[The pick enabled status]]
|
2015-02-11 08:44:42 -08:00
|
|
|
}
|
|
|
|
color_pick_enable_set {
|
2016-11-15 02:38:18 -08:00
|
|
|
[[Set possibility color picking.]]
|
|
|
|
return: bool; [[$true on success, $false otherwise]]
|
2015-02-11 08:44:42 -08:00
|
|
|
params {
|
2016-11-15 02:38:18 -08:00
|
|
|
@in color_pick: bool; [[Possibility flag]]
|
2015-02-11 08:44:42 -08:00
|
|
|
}
|
|
|
|
}
|
2014-04-14 03:03:47 -07:00
|
|
|
|
2015-05-07 08:36:45 -07:00
|
|
|
@property root_node {
|
2014-04-14 03:03:47 -07:00
|
|
|
set {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Set the root node of a scene.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Get the root node of a scene.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
values {
|
2016-05-23 07:41:28 -07:00
|
|
|
node: Evas.Canvas3D.Node; [[A node which will be used as a
|
|
|
|
root node for the scene.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-07 08:36:45 -07:00
|
|
|
@property camera_node {
|
2014-04-14 03:03:47 -07:00
|
|
|
set {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Set the camera node of a scene.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
get {
|
2015-07-30 04:38:51 -07:00
|
|
|
[[Get the camera node of a scene.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
values {
|
2016-05-23 07:41:28 -07:00
|
|
|
node: Evas.Canvas3D.Node; [[A node which will be used as a
|
|
|
|
camera node for the scene.]]
|
2014-04-14 03:03:47 -07:00
|
|
|
}
|
|
|
|
}
|
2015-09-21 14:41:25 -07:00
|
|
|
@property shadows_depth {
|
|
|
|
set {
|
|
|
|
[[Set scale and units used to calculate depth values.]]
|
|
|
|
}
|
|
|
|
get {
|
|
|
|
[[Get scale and units used to calculate depth values.]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
depth_offset: Evas.Real; [[Scale factor that is used to
|
|
|
|
create a variable depth offset
|
|
|
|
for each polygon.]]
|
|
|
|
depth_constant: Evas.Real; [[Value to create a constant
|
|
|
|
depth offset]]
|
|
|
|
}
|
|
|
|
}
|
2016-04-11 08:50:46 -07:00
|
|
|
}
|
2014-04-14 03:03:47 -07:00
|
|
|
implements {
|
2016-08-10 07:23:04 -07:00
|
|
|
Efl.Object.constructor;
|
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
|
|
|
}
|
|
|
|
}
|