light_property: linked graphic_object light properties to scirenderer. 23/12223/1
authorPedro Arthur <bygrandao@gmail.com>
Sat, 3 Aug 2013 22:39:45 +0000 (19:39 -0300)
committerPedro Arthur <bygrandao@gmail.com>
Sat, 3 Aug 2013 22:39:45 +0000 (19:39 -0300)
commit2be1889ce7923dd99b55f36fce3623b24d35d0aa
tree91c4ffe4a0d1b55032a53a69ee25b9b4513617ca
parent789214d62835de4804a7143c0c67ed847feb0f2b
light_property: linked graphic_object light properties to scirenderer.

How to test:
plot3d;
a=gca();
s=gce();
s.color_flag = 0;
s.thickness = 0;
a.lighting = "on";

to change surface properties:
s.ambient_color = [x x x]
s.diffuse_color = [x x x] //works only if s.color_material is "on"
s.specular_color = [x x x]
s.material_shinines = x

to change light properties:
a.light_type = x // 0 - directional, 1 - point
a.light_position = [x x x] // used only if type = 1
a.light_direction = [x x x]// used only if type = 0
//change light color
a.ambient_color = [x x x]
a.diffuse_color = [x x x]
a.specular_color = [x x x]

Change-Id: I67aaf6d61c8bb6d2da5462f776f241a1a04d4ab4
13 files changed:
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/axes/Axes.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/lighting/Light.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/lighting/Material.java
scilab/modules/graphic_objects/src/java/org/scilab/modules/graphic_objects/surface/Surface.java
scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/DrawerVisitor.java
scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/util/LightingUtils.java [new file with mode: 0644]
scilab/modules/scirenderer/src/org/scilab/forge/scirenderer/implementation/jogl/drawer/JoGLShapeDrawer.java
scilab/modules/scirenderer/src/org/scilab/forge/scirenderer/implementation/jogl/lightning/JoGLLight.java
scilab/modules/scirenderer/src/org/scilab/forge/scirenderer/implementation/jogl/lightning/JoGLLightManager.java
scilab/modules/scirenderer/src/org/scilab/forge/scirenderer/lightning/Light.java
scilab/modules/scirenderer/src/org/scilab/forge/scirenderer/lightning/LightManager.java
scilab/modules/scirenderer/src/org/scilab/forge/scirenderer/shapes/appearance/Appearance.java
scilab/modules/scirenderer/src/org/scilab/forge/scirenderer/shapes/appearance/Material.java [new file with mode: 0644]