Added help files +better wording 76/12276/2
Pedro Arthur [Sun, 11 Aug 2013 20:46:03 +0000 (17:46 -0300)]
Change-Id: I97a1f9e040d2cc0996759c4d267a6bd32da21041

29 files changed:
scilab/modules/graphic_objects/includes/graphicObjectProperties.h
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/graphicObject/GraphicObjectProperties.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/graphic_objects/src/scripts/propertiesMap.properties
scilab/modules/graphics/Makefile.am
scilab/modules/graphics/Makefile.in
scilab/modules/graphics/graphics.vcxproj
scilab/modules/graphics/graphics.vcxproj.filters
scilab/modules/graphics/help/en_US/Lighting.xml [new file with mode: 0644]
scilab/modules/graphics/help/en_US/axes_operations/axes_properties.xml
scilab/modules/graphics/help/images/lighting_off.png [new file with mode: 0644]
scilab/modules/graphics/help/images/lighting_on.png [new file with mode: 0644]
scilab/modules/graphics/help/pt_BR/axes_operations/axes_properties.xml
scilab/modules/graphics/macros/%h_p.sci
scilab/modules/graphics/src/c/getHandleProperty/GetHashTable.c
scilab/modules/graphics/src/c/getHandleProperty/SetHashTable.c
scilab/modules/graphics/src/c/getHandleProperty/getHandleProperty.h
scilab/modules/graphics/src/c/getHandleProperty/get_light_direction_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_light_position_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_light_type_property.c
scilab/modules/graphics/src/c/getHandleProperty/get_material_shininess_property.c [moved from scilab/modules/graphics/src/c/getHandleProperty/get_material_shinines_property.c with 64% similarity]
scilab/modules/graphics/src/c/getHandleProperty/setHandleProperty.h
scilab/modules/graphics/src/c/getHandleProperty/set_light_direction_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_light_position_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_light_type_property.c
scilab/modules/graphics/src/c/getHandleProperty/set_material_shininess_property.c [moved from scilab/modules/graphics/src/c/getHandleProperty/set_material_shinines_property.c with 79% similarity]
scilab/modules/renderer/src/java/org/scilab/modules/renderer/JoGLView/util/LightingUtils.java

index 78ee3a5..68f5e3f 100644 (file)
 #define __GO_SPECULARCOLOR__               300
 
 #define __GO_COLORMATERIAL__               297
-#define __GO_MATERIAL_SHININES__           301
+#define __GO_MATERIAL_SHININESS__          301
 
 #define __GO_LIGHTING__                    302
 #define __GO_LIGHT_TYPE__                  303
index f0d97d3..9ff3d76 100644 (file)
@@ -2369,14 +2369,14 @@ public class Axes extends GraphicObject {
     }
 
     /**
-     * @return the light's ambient color.
+     * @return the ambient color of the light.
      */
     public Double[] getLightAmbientColor() {
         return light.getAmbientColor();
     }
 
     /**
-     * @param color the new light's ambient color.
+     * @param color the new ambient color of the light.
      */
     public UpdateStatus setLightAmbientColor(Double[] color) {
         return light.setAmbientColor(color);
@@ -2390,21 +2390,21 @@ public class Axes extends GraphicObject {
     }
 
     /**
-     * @param color the new light's diffuse color.
+     * @param color the new diffuse color of the light.
      */
     public UpdateStatus setLightDiffuseColor(Double[] color) {
         return light.setDiffuseColor(color);
     }
 
     /**
-     * @return the light's specular color.
+     * @return the specular color of the light.
      */
     public Double[] getLightSpecularColor() {
         return light.getSpecularColor();
     }
 
     /**
-     * @param color the new light's specular color.
+     * @param color the new specular color of the light.
      */
     public UpdateStatus setLightSpecularColor(Double[] color) {
         return light.setSpecularColor(color);
@@ -2425,42 +2425,42 @@ public class Axes extends GraphicObject {
     }
 
     /**
-     * @return the light's type.
+     * @return the type of the light.
      */
     public Integer getLightType() {
         return light.getTypeAsInteger();
     }
 
     /**
-     * @param the new light's type.
+     * @param the new type of the light.
      */
     public UpdateStatus setLightType(Integer type) {
         return light.setTypeAsInteger(type);
     }
 
     /**
-     * @return the light's position.
+     * @return the position of the light.
      */
     public Double[] getLightPosition() {
         return light.getPosition();
     }
 
     /**
-     * @param the new light's position.
+     * @param the new position of the light.
      */
     public UpdateStatus setLightPosition(Double[] pos) {
         return light.setPosition(pos);
     }
 
     /**
-     * @return the light's direction.
+     * @return the direction of the light.
      */
     public Double[] getLightDirection() {
         return light.getDirection();
     }
 
     /**
-     * @param the new light's direction.
+     * @param the new direction of the light.
      */
     public UpdateStatus setLightDirection(Double[] dir) {
         return light.setDirection(dir);
index 815d36c..38740fc 100644 (file)
@@ -361,7 +361,7 @@ public class GraphicObjectProperties {
     public static final int __GO_SPECULARCOLOR__ =          300;
 
     public static final int __GO_COLORMATERIAL__ =          297;
-    public static final int __GO_MATERIAL_SHININES__ =      301;
+    public static final int __GO_MATERIAL_SHININESS__ =     301;
 
     public static final int __GO_LIGHTING__ =               302;
     public static final int __GO_LIGHT_TYPE__ =             303;
index fd67bca..4ffe432 100644 (file)
@@ -23,12 +23,12 @@ import org.scilab.modules.graphic_objects.graphicObject.GraphicObject.UpdateStat
 public class Material extends ColorTriplet {
 
     /** material properties */
-    public enum MaterialProperty {COLOR_MATERIAL, SHININES};
+    public enum MaterialProperty {COLOR_MATERIAL, SHININESS};
     /** Specifies if the sufarce color will be used as diffuse color */
     private Boolean useColorMaterial;
 
-    /** Specular shinines parameter*/
-    private Double shinines;
+    /** Specular shininess parameter*/
+    private Double shininess;
 
 
     public Material() {
@@ -37,7 +37,7 @@ public class Material extends ColorTriplet {
         ambient[0] = ambient[1] = ambient[2] = 0.0;
         diffuse[0] = diffuse[1] = diffuse[2] = 1.0;
         specular[0] = specular[1] = specular[2] = 1.0;
-        shinines = 2.0;
+        shininess = 2.0;
     }
 
     /**
@@ -57,18 +57,18 @@ public class Material extends ColorTriplet {
         return useColorMaterial;
     }
 
-    /** Sets shinines level*/
-    public UpdateStatus setShinines(Double s) {
-        if (shinines != s) {
-            shinines = s;
+    /** Sets shininess level*/
+    public UpdateStatus setShininess(Double s) {
+        if (shininess != s) {
+            shininess = s;
             return UpdateStatus.Success;
         }
         return UpdateStatus.NoChange;
     }
 
-    /** Gets shinines level*/
-    public Double getShinines() {
-        return shinines;
+    /** Gets shininess level*/
+    public Double getShininess() {
+        return shininess;
     }
 
 }
index 7f22c3c..f4a1465 100644 (file)
@@ -75,8 +75,8 @@ public abstract class Surface extends ClippableContouredObject {
                 return ColorTriplet.ColorTripletProperty.SPECULARCOLOR;
             case __GO_COLORMATERIAL__ :
                 return Material.MaterialProperty.COLOR_MATERIAL;
-            case __GO_MATERIAL_SHININES__ :
-                return Material.MaterialProperty.SHININES;
+            case __GO_MATERIAL_SHININESS__ :
+                return Material.MaterialProperty.SHININESS;
             default :
                 return super.getPropertyFromName(propertyName);
         }
@@ -105,8 +105,8 @@ public abstract class Surface extends ClippableContouredObject {
             switch (mp) {
                 case COLOR_MATERIAL:
                     return getColorMaterialMode();
-                case SHININES:
-                    return getMaterialShinines();
+                case SHININESS:
+                    return getMaterialShininess();
             }
         } else if (property instanceof ColorTriplet.ColorTripletProperty) {
             ColorTriplet.ColorTripletProperty cp = (ColorTriplet.ColorTripletProperty)property;
@@ -150,8 +150,8 @@ public abstract class Surface extends ClippableContouredObject {
             switch (mp) {
                 case COLOR_MATERIAL:
                     return setColorMaterialMode((Boolean)value);
-                case SHININES:
-                    return setMaterialShinines((Double)value);
+                case SHININESS:
+                    return setMaterialShininess((Double)value);
             }
         } else if (property instanceof ColorTriplet.ColorTripletProperty) {
             ColorTriplet.ColorTripletProperty cp = (ColorTriplet.ColorTripletProperty)property;
@@ -243,59 +243,59 @@ public abstract class Surface extends ClippableContouredObject {
     }
 
     /**
-     * @return the material's ambient color.
+     * @return the ambient color of the material.
      */
     public Double[] getMaterialAmbientColor() {
         return material.getAmbientColor();
     }
 
     /**
-     * @param the new material's ambient color.
+     * @param the new ambient color of the material.
      */
     public UpdateStatus setMaterialAmbientColor(Double[] color) {
         return material.setAmbientColor(color);
     }
 
     /**
-     * @return the material's diffuse color.
+     * @return the diffuse color of the material.
      */
     public Double[] getMaterialDiffuseColor() {
         return material.getDiffuseColor();
     }
 
     /**
-     * @param the new material's diffuse color.
+     * @param the new diffuse color of the material.
      */
     public UpdateStatus setMaterialDiffuseColor(Double[] color) {
         return material.setDiffuseColor(color);
     }
 
     /**
-     * @return the material's specular color.
+     * @return the specular color of the material.
      */
     public Double[] getMaterialSpecularColor() {
         return material.getSpecularColor();
     }
 
     /**
-     * @param the new material's specular color.
+     * @param the new specular color of the material.
      */
     public UpdateStatus setMaterialSpecularColor(Double[] color) {
         return material.setSpecularColor(color);
     }
 
     /**
-     * @return the material's shinines level.
+     * @return the shininess level of the material.
      */
-    public Double getMaterialShinines() {
-        return material.getShinines();
+    public Double getMaterialShininess() {
+        return material.getShininess();
     }
 
     /**
-     * @param the new material's shinines level.
+     * @param the new shininess level of the material.
      */
-    public UpdateStatus setMaterialShinines(Double s) {
-        return material.setShinines(s);
+    public UpdateStatus setMaterialShininess(Double s) {
+        return material.setShininess(s);
     }
 
     /**
index 4a4b675..79d1fb5 100644 (file)
 @DECLARE@ __GO_SPECULARCOLOR__ @EQUAL@          300 @END@
 
 @DECLARE@ __GO_COLORMATERIAL__ @EQUAL@          297 @END@
-@DECLARE@ __GO_MATERIAL_SHININES__ @EQUAL@      301 @END@
+@DECLARE@ __GO_MATERIAL_SHININESS__ @EQUAL@     301 @END@
 
 @DECLARE@ __GO_LIGHTING__ @EQUAL@               302 @END@
 @DECLARE@ __GO_LIGHT_TYPE__ @EQUAL@             303 @END@
index 43f9a9a..3551f30 100644 (file)
@@ -332,7 +332,7 @@ src/c/getHandleProperty/get_ambient_color_property.c \
 src/c/getHandleProperty/get_diffuse_color_property.c \
 src/c/getHandleProperty/get_specular_color_property.c \
 src/c/getHandleProperty/get_color_material_property.c \
-src/c/getHandleProperty/get_material_shinines_property.c \
+src/c/getHandleProperty/get_material_shininess_property.c \
 src/c/getHandleProperty/get_lighting_property.c \
 src/c/getHandleProperty/get_light_type_property.c \
 src/c/getHandleProperty/get_light_direction_property.c \
@@ -341,7 +341,7 @@ src/c/getHandleProperty/set_ambient_color_property.c \
 src/c/getHandleProperty/set_diffuse_color_property.c \
 src/c/getHandleProperty/set_specular_color_property.c \
 src/c/getHandleProperty/set_color_material_property.c \
-src/c/getHandleProperty/set_material_shinines_property.c \
+src/c/getHandleProperty/set_material_shininess_property.c \
 src/c/getHandleProperty/set_lighting_property.c \
 src/c/getHandleProperty/set_light_type_property.c \
 src/c/getHandleProperty/set_light_direction_property.c \
index 121a571..5c1d03c 100644 (file)
@@ -450,7 +450,7 @@ am__objects_1 = libscigraphics_algo_la-GetCommandArg.lo \
        libscigraphics_algo_la-get_diffuse_color_property.lo \
        libscigraphics_algo_la-get_specular_color_property.lo \
        libscigraphics_algo_la-get_color_material_property.lo \
-       libscigraphics_algo_la-get_material_shinines_property.lo \
+       libscigraphics_algo_la-get_material_shininess_property.lo \
        libscigraphics_algo_la-get_lighting_property.lo \
        libscigraphics_algo_la-get_light_type_property.lo \
        libscigraphics_algo_la-get_light_direction_property.lo \
@@ -459,7 +459,7 @@ am__objects_1 = libscigraphics_algo_la-GetCommandArg.lo \
        libscigraphics_algo_la-set_diffuse_color_property.lo \
        libscigraphics_algo_la-set_specular_color_property.lo \
        libscigraphics_algo_la-set_color_material_property.lo \
-       libscigraphics_algo_la-set_material_shinines_property.lo \
+       libscigraphics_algo_la-set_material_shininess_property.lo \
        libscigraphics_algo_la-set_lighting_property.lo \
        libscigraphics_algo_la-set_light_type_property.lo \
        libscigraphics_algo_la-set_light_direction_property.lo \
@@ -1135,7 +1135,7 @@ src/c/getHandleProperty/get_ambient_color_property.c \
 src/c/getHandleProperty/get_diffuse_color_property.c \
 src/c/getHandleProperty/get_specular_color_property.c \
 src/c/getHandleProperty/get_color_material_property.c \
-src/c/getHandleProperty/get_material_shinines_property.c \
+src/c/getHandleProperty/get_material_shininess_property.c \
 src/c/getHandleProperty/get_lighting_property.c \
 src/c/getHandleProperty/get_light_type_property.c \
 src/c/getHandleProperty/get_light_direction_property.c \
@@ -1144,7 +1144,7 @@ src/c/getHandleProperty/set_ambient_color_property.c \
 src/c/getHandleProperty/set_diffuse_color_property.c \
 src/c/getHandleProperty/set_specular_color_property.c \
 src/c/getHandleProperty/set_color_material_property.c \
-src/c/getHandleProperty/set_material_shinines_property.c \
+src/c/getHandleProperty/set_material_shininess_property.c \
 src/c/getHandleProperty/set_lighting_property.c \
 src/c/getHandleProperty/set_light_type_property.c \
 src/c/getHandleProperty/set_light_direction_property.c \
@@ -1585,7 +1585,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-get_mark_size_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-get_mark_size_unit_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-get_mark_style_property.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-get_material_shinines_property.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-get_material_shininess_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-get_old_style_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-get_outside_colors_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-get_parent_property.Plo@am__quote@
@@ -1736,7 +1736,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-set_mark_size_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-set_mark_size_unit_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-set_mark_style_property.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-set_material_shinines_property.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-set_material_shininess_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-set_old_style_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-set_outside_colors_property.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libscigraphics_algo_la-set_parent_property.Plo@am__quote@
@@ -4019,12 +4019,12 @@ libscigraphics_algo_la-get_color_material_property.lo: src/c/getHandleProperty/g
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscigraphics_algo_la-get_color_material_property.lo `test -f 'src/c/getHandleProperty/get_color_material_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/get_color_material_property.c
 
-libscigraphics_algo_la-get_material_shinines_property.lo: src/c/getHandleProperty/get_material_shinines_property.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscigraphics_algo_la-get_material_shinines_property.lo -MD -MP -MF $(DEPDIR)/libscigraphics_algo_la-get_material_shinines_property.Tpo -c -o libscigraphics_algo_la-get_material_shinines_property.lo `test -f 'src/c/getHandleProperty/get_material_shinines_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/get_material_shinines_property.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscigraphics_algo_la-get_material_shinines_property.Tpo $(DEPDIR)/libscigraphics_algo_la-get_material_shinines_property.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/c/getHandleProperty/get_material_shinines_property.c' object='libscigraphics_algo_la-get_material_shinines_property.lo' libtool=yes @AMDEPBACKSLASH@
+libscigraphics_algo_la-get_material_shininess_property.lo: src/c/getHandleProperty/get_material_shininess_property.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscigraphics_algo_la-get_material_shininess_property.lo -MD -MP -MF $(DEPDIR)/libscigraphics_algo_la-get_material_shininess_property.Tpo -c -o libscigraphics_algo_la-get_material_shininess_property.lo `test -f 'src/c/getHandleProperty/get_material_shininess_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/get_material_shininess_property.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscigraphics_algo_la-get_material_shininess_property.Tpo $(DEPDIR)/libscigraphics_algo_la-get_material_shininess_property.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/c/getHandleProperty/get_material_shininess_property.c' object='libscigraphics_algo_la-get_material_shininess_property.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscigraphics_algo_la-get_material_shinines_property.lo `test -f 'src/c/getHandleProperty/get_material_shinines_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/get_material_shinines_property.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscigraphics_algo_la-get_material_shininess_property.lo `test -f 'src/c/getHandleProperty/get_material_shininess_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/get_material_shininess_property.c
 
 libscigraphics_algo_la-get_lighting_property.lo: src/c/getHandleProperty/get_lighting_property.c
 @am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscigraphics_algo_la-get_lighting_property.lo -MD -MP -MF $(DEPDIR)/libscigraphics_algo_la-get_lighting_property.Tpo -c -o libscigraphics_algo_la-get_lighting_property.lo `test -f 'src/c/getHandleProperty/get_lighting_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/get_lighting_property.c
@@ -4082,12 +4082,12 @@ libscigraphics_algo_la-set_color_material_property.lo: src/c/getHandleProperty/s
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscigraphics_algo_la-set_color_material_property.lo `test -f 'src/c/getHandleProperty/set_color_material_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/set_color_material_property.c
 
-libscigraphics_algo_la-set_material_shinines_property.lo: src/c/getHandleProperty/set_material_shinines_property.c
-@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscigraphics_algo_la-set_material_shinines_property.lo -MD -MP -MF $(DEPDIR)/libscigraphics_algo_la-set_material_shinines_property.Tpo -c -o libscigraphics_algo_la-set_material_shinines_property.lo `test -f 'src/c/getHandleProperty/set_material_shinines_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/set_material_shinines_property.c
-@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscigraphics_algo_la-set_material_shinines_property.Tpo $(DEPDIR)/libscigraphics_algo_la-set_material_shinines_property.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/c/getHandleProperty/set_material_shinines_property.c' object='libscigraphics_algo_la-set_material_shinines_property.lo' libtool=yes @AMDEPBACKSLASH@
+libscigraphics_algo_la-set_material_shininess_property.lo: src/c/getHandleProperty/set_material_shininess_property.c
+@am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscigraphics_algo_la-set_material_shininess_property.lo -MD -MP -MF $(DEPDIR)/libscigraphics_algo_la-set_material_shininess_property.Tpo -c -o libscigraphics_algo_la-set_material_shininess_property.lo `test -f 'src/c/getHandleProperty/set_material_shininess_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/set_material_shininess_property.c
+@am__fastdepCC_TRUE@   $(am__mv) $(DEPDIR)/libscigraphics_algo_la-set_material_shininess_property.Tpo $(DEPDIR)/libscigraphics_algo_la-set_material_shininess_property.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      source='src/c/getHandleProperty/set_material_shininess_property.c' object='libscigraphics_algo_la-set_material_shininess_property.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscigraphics_algo_la-set_material_shinines_property.lo `test -f 'src/c/getHandleProperty/set_material_shinines_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/set_material_shinines_property.c
+@am__fastdepCC_FALSE@  $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libscigraphics_algo_la-set_material_shininess_property.lo `test -f 'src/c/getHandleProperty/set_material_shininess_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/set_material_shininess_property.c
 
 libscigraphics_algo_la-set_lighting_property.lo: src/c/getHandleProperty/set_lighting_property.c
 @am__fastdepCC_TRUE@   $(LIBTOOL)  --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscigraphics_algo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libscigraphics_algo_la-set_lighting_property.lo -MD -MP -MF $(DEPDIR)/libscigraphics_algo_la-set_lighting_property.Tpo -c -o libscigraphics_algo_la-set_lighting_property.lo `test -f 'src/c/getHandleProperty/set_lighting_property.c' || echo '$(srcdir)/'`src/c/getHandleProperty/set_lighting_property.c
index 41b6afe..49b6fca 100644 (file)
@@ -301,7 +301,7 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClCompile Include="src\c\getHandleProperty\get_mark_size_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_mark_size_unit_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_mark_style_property.c" />
-    <ClCompile Include="src\c\getHandleProperty\get_material_shinines_property.c" />
+    <ClCompile Include="src\c\getHandleProperty\get_material_shininess_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_old_style_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_outside_colors_property.c" />
     <ClCompile Include="src\c\getHandleProperty\get_parent_property.c" />
@@ -331,7 +331,7 @@ lib /DEF:"$(ProjectDir)elementary_functions_f_Import.def" /SUBSYSTEM:WINDOWS /MA
     <ClCompile Include="src\c\getHandleProperty\set_light_direction_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_light_position_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_light_type_property.c" />
-    <ClCompile Include="src\c\getHandleProperty\set_material_shinines_property.c" />
+    <ClCompile Include="src\c\getHandleProperty\set_material_shininess_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_specular_color_property.c" />
     <ClCompile Include="src\c\getHandleProperty\set_tag_property.c" />
     <ClCompile Include="src\c\get_ticks_utils.c" />
index 37aa46c..ae72a36 100644 (file)
     <ClCompile Include="src\c\getHandleProperty\get_lighting_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="src\c\getHandleProperty\get_material_shinines_property.c">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="src\c\getHandleProperty\get_specular_color_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="src\c\getHandleProperty\set_lighting_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="src\c\getHandleProperty\set_material_shinines_property.c">
+    <ClCompile Include="src\c\getHandleProperty\set_specular_color_property.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="src\c\getHandleProperty\get_material_shininess_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="src\c\getHandleProperty\set_specular_color_property.c">
+    <ClCompile Include="src\c\getHandleProperty\set_material_shininess_property.c">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>
diff --git a/scilab/modules/graphics/help/en_US/Lighting.xml b/scilab/modules/graphics/help/en_US/Lighting.xml
new file mode 100644 (file)
index 0000000..c958a7b
--- /dev/null
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) Pedro SOUZA
+ * 
+ * This file must be used under the terms of the CeCILL.
+ * This source file is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at    
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ *
+ -->
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org"  xml:lang="en" scilab:needs-examples="no" xml:id="Lighting">
+    <refnamediv>
+        <refname>Lighting</refname>
+        <refpurpose>Lighting overview</refpurpose>
+    </refnamediv>
+    <refsection>
+        <title>Description</title>
+        <para>
+            Lighting in scilab aproximates real world lighting where the appearence of
+            a surface is given by interactions between light rays and the material properties of the
+             surface. Because simulate real world lighting is complex
+             and computationaly expesive, one uses a simplified model.
+        </para>
+        <para>
+            A light is represented by its colors: ambient, diffuse and specular.
+        </para>
+        <para>
+            A surface material properties is represented also by its colors
+            (ambient, diffuse and specular) and it shininess level.
+            The surface contains the <literal>color_material</literal> property that enables
+            the use of the surface color as the diffuse color.
+        </para>
+        <para>
+            The final surface color is given by the product of the light and surface color.
+        </para>
+        <listitem>
+            <para>
+            Ambient color models the light received indirect by the surface and
+            is independent of the surface normal or light direction.
+            </para>
+        </listitem>
+            <listitem>
+            <para>
+            Diffuse color models the light received directly, and thus it's dependent
+            of the light ray direction and the surface normal.
+            </para>
+        </listitem>
+        <listitem>
+            <para>
+            Specular color defines the specular highlight color.
+            </para>
+        </listitem>
+
+               <para>
+                       Following one can compare the surface with and without lighting enabled:
+               </para>
+        <para>
+            <inlinemediaobject>
+                               <imageobject>
+                                       <imagedata fileref="../images/lighting_on.png"/>
+                               </imageobject>
+                       </inlinemediaobject>
+        </para>
+        <para>
+            <inlinemediaobject>
+                               <imageobject>
+                                       <imagedata fileref="../images/lighting_off.png"/>
+                               </imageobject>
+                       </inlinemediaobject>
+               </para>
+
+    </refsection>
+    <refsection>
+        <title>Lighting properties list</title>
+        <para> Axes properties </para>
+        <variablelist>
+            <varlistentry>
+                <term>lighting: </term>
+                <listitem>
+                    <para>This field is use to enable lighting. Its default
+                        value is <literal>"off"</literal> if the value is <literal>"on"</literal>
+                        all surfaces in this axes will be lit.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>light_type: </term>
+                <listitem>
+                    <para>This field defines the type of light used. There are two
+                        types avaiable:<literal>"directional"</literal> and <literal>"point"</literal>.
+                        Directional lights are positioned infinitely far from the surface
+                        thus emitting parallel rays.
+                        Point lights are defined as a point in space thus emitting rays in all
+                        directions.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>light_direction: </term>
+                <listitem>
+                    <para>This field defines the ray direction for directional light.
+                        The direction can be chaged using a 3 element vector <literal>"[x, y, z]"</literal> 
+                        representing a vector starting from the origin.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>light_position: </term>
+                <listitem>
+                    <para>This field defines the light position for point light.
+                        The position can be changed using a 3 element vector <literal>"[x, y, z]"</literal>.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>ambient_color: </term>
+                <listitem>
+                    <para>This field defines the ambient color of the light.
+                        The color is defined by a 3 element vector <literal>"[red, green, blue]"</literal> 
+                        with each element in the range [0, 1].
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>diffuse_color: </term>
+                <listitem>
+                    <para>This field defines the diffuse color of the light.
+                        The color is defined by a 3 element vector <literal>"[red, green, blue]"</literal> 
+                        with each element in the range [0, 1].
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>specular_color: </term>
+                <listitem>
+                    <para>This field defines the specular color of the light.
+                        The color is defined by a 3 element vector <literal>"[red, green, blue]"</literal> 
+                        with each element in the range [0, 1].
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+        <para>Surface properties </para>
+        <variablelist>
+            <varlistentry>
+                <term>color_material: </term>
+                <listitem>
+                    <para>This field is use to enable the use of the surface color as diffuse color.
+                        Its default value is <literal>"on"</literal>.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>material_shininess: </term>
+                <listitem>
+                    <para>This field defines the shininess level of the surface.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>ambient_color: </term>
+                <listitem>
+                    <para>This field defines the ambient color of the surface.
+                        The color is defined by a 3 element vector <literal>"[red, green, blue]"</literal> 
+                        with each element in the range [0, 1].
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>diffuse_color: </term>
+                <listitem>
+                    <para>This field defines the diffuse color of the surface.
+                        The color is defined by a 3 element vector <literal>"[red, green, blue]"</literal> 
+                        with each element in the range [0, 1]. Notice that this field is
+                        only used when color_material is disabled.
+                    </para>
+                </listitem>
+            </varlistentry>
+            <varlistentry>
+                <term>specular_color: </term>
+                <listitem>
+                    <para>This field defines the specular color of the surface.
+                        The color is defined by a 3 element vector <literal>"[red, green, blue]"</literal> 
+                        with each element in the range [0, 1].
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </refsection>
+    <refsection>
+        <title>Examples</title>
+               <para>
+                       Point light without color_material:
+               </para>
+        <programlisting role="example"><![CDATA[
+plot3d();
+a=gca();
+s=gce();
+s.color_flag=0;
+s.thickness=0;
+//enable lighting
+a.lighting="on";
+//change diffuse color to orange
+s.diffuse_color = [1, 0.6, 0];
+s.color_material="off";
+//black spots turn dark orange
+s.ambient_color = [0.3, 0.1, 0];
+         ]]></programlisting>
+                       <para>
+                               Directional light:
+                       </para>
+                   <programlisting role="example"><![CDATA[
+plot3d();
+a=gca();
+s=gce();
+s.color_flag=0;
+s.thickness=0;
+//enable lighting
+a.lighting="on";
+a.light_type = "directional";
+a.light_direction = [0 0 1];
+         ]]></programlisting>
+    </refsection>
+</refentry>
index 9b489cf..4a8d15d 100644 (file)
                                 </para>
                             </listitem>
                         </varlistentry>
+                        <varlistentry>
+                            <term>lighting: </term>
+                            <listitem>
+                                <para>This field is use to enable lighting. Its default
+                                    value is <literal>"off"</literal> if the value is <literal>"on"</literal>
+                                    all surfaces in this axes will be lit.
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>light_type: </term>
+                            <listitem>
+                                <para>This field defines the type of light used. There are two
+                                    types avaiable:<literal>"directional"</literal> and <literal>"point"</literal>.
+                                    Directional lights are positioned infinitely far from the surface
+                                    thus emitting parallel rays.
+                                    Point lights are defined as a point in space thus emitting rays in all
+                                    directions.
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>light_direction: </term>
+                            <listitem>
+                                <para>This field defines the ray direction for directional light.
+                                    The direction can be chaged using a 3 element vector <literal>"[x, y, z]"</literal> 
+                                    representing a vector starting from the origin.
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>light_position: </term>
+                            <listitem>
+                                <para>This field defines the light position for point light.
+                                    The position can be changed using a 3 element vector <literal>"[x, y, z]"</literal>.
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>ambient_color: </term>
+                            <listitem>
+                                <para>This field defines the ambient color of the light.
+                                    The color is defined by a 3 element vector <literal>"[red, green, blue]"</literal> 
+                                    with each element in the range [0, 1].
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>diffuse_color: </term>
+                            <listitem>
+                                <para>This field defines the diffuse color of the light.
+                                    The color is defined by a 3 element vector <literal>"[red, green, blue]"</literal> 
+                                    with each element in the range [0, 1].
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>specular_color: </term>
+                            <listitem>
+                                <para>This field defines the specular color of the light.
+                                    The color is defined by a 3 element vector <literal>"[red, green, blue]"</literal> 
+                                    with each element in the range [0, 1].
+                                </para>
+                            </listitem>
+                        </varlistentry>
                     </variablelist>
                 </listitem>
             </varlistentry>
diff --git a/scilab/modules/graphics/help/images/lighting_off.png b/scilab/modules/graphics/help/images/lighting_off.png
new file mode 100644 (file)
index 0000000..ddf4f36
Binary files /dev/null and b/scilab/modules/graphics/help/images/lighting_off.png differ
diff --git a/scilab/modules/graphics/help/images/lighting_on.png b/scilab/modules/graphics/help/images/lighting_on.png
new file mode 100644 (file)
index 0000000..fd04576
Binary files /dev/null and b/scilab/modules/graphics/help/images/lighting_on.png differ
index e88b635..2c45bb6 100644 (file)
                                 </para>
                             </listitem>
                         </varlistentry>
+                        <varlistentry>
+                            <term>lighting: </term>
+                            <listitem>
+                                <para>este campo abilita o uso de iluminação. Seu valor padrão
+                                    é <literal>"off"</literal>. Se seu valor for <literal>"on"</literal>
+                                    todas as superficies no eixo serão iluminadas.
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>light_type: </term>
+                            <listitem>
+                                <para>este campo define o tipo de luz usada. Existem dois tipos
+                                    disponiveis:<literal>"directional"</literal> e <literal>"point"</literal>.
+                                    O tipo direcional (directional) considera que a luz esta posiconada
+                                    infinitamente longe da superficie, assim os raios que atingem a superficie
+                                    podem ser considerados paralelos entre si.
+                                    O tipo ponto (point) considera a luz como um ponto no espaço, e portanto,
+                                    emite raios luminosos em todas as direções
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>light_direction: </term>
+                            <listitem>
+                                <para>este campo define a direção do raio da luz, para luz do tipo direcional(directional).
+                                    A direção pode ser definida usando-se um vetor de 3 elementos <literal>"[x, y, z]"</literal> 
+                                    representando uma direção partindo da origem.
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>light_position: </term>
+                            <listitem>
+                                <para>este campo define a posição da luz, para luz do tipo ponto(point).
+                                    A posição pode ser definida usando-se um vetor com 3 elementos <literal>"[x, y, z]"</literal>.
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>ambient_color: </term>
+                            <listitem>
+                                <para>este campo define a cor ambiente da luz.
+                                    A cor é definida por um vetor com 3 elementos <literal>"[vermelho, verde, azul]"</literal> 
+                                    com cada elemento entre os valores [0, 1].
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>diffuse_color: </term>
+                            <listitem>
+                                <para>este campo define a cor difusa da luz.
+                                    A cor é definida por um vetor com 3 elementos <literal>"[vermelho, verde, azul]"</literal> 
+                                    com cada elemento entre os valores [0, 1].
+                                </para>
+                            </listitem>
+                        </varlistentry>
+                        <varlistentry>
+                            <term>specular_color: </term>
+                            <listitem>
+                                <para>este campo define a cor especular da luz.
+                                    A cor é definida por um vetor com 3 elementos <literal>"[vermelho, verde, azul]"</literal> 
+                                    com cada elemento entre os valores [0, 1].
+                                </para>
+                            </listitem>
+                        </varlistentry>
                     </variablelist>
                 </listitem>
             </varlistentry>
index 622d335..bf5688f 100644 (file)
@@ -653,7 +653,7 @@ function %h_p(h)
                 "diffuse_color = "+sci2exp(h.diffuse_color)
                 "specular_color = "+sci2exp(h.specular_color)
                 "color_material = "+sci2exp(h.color_material)
-                "material_shinines = "+sci2exp(h.material_shinines)
+                "material_shininess = "+sci2exp(h.material_shininess)
                 "user_data = "+fmtuser_data(u)
                 "tag = "+h.tag
                 ]
@@ -683,7 +683,7 @@ function %h_p(h)
                 "diffuse_color = "+sci2exp(h.diffuse_color)
                 "specular_color = "+sci2exp(h.specular_color)
                 "color_material = "+sci2exp(h.color_material)
-                "material_shinines = "+sci2exp(h.material_shinines)
+                "material_shininess = "+sci2exp(h.material_shininess)
                 "user_data = "+fmtuser_data(u)
                 "tag = "+h.tag
                 ]
@@ -752,7 +752,7 @@ function %h_p(h)
                 "diffuse_color = "+sci2exp(h.diffuse_color)
                 "specular_color = "+sci2exp(h.specular_color)
                 "color_material = "+sci2exp(h.color_material)
-                "material_shinines = "+sci2exp(h.material_shinines)
+                "material_shininess = "+sci2exp(h.material_shininess)
                 "user_data = "+fmtuser_data(u)
                 "tag = "+h.tag
                 ]
@@ -782,7 +782,7 @@ function %h_p(h)
                 "diffuse_color = "+sci2exp(h.diffuse_color)
                 "specular_color = "+sci2exp(h.specular_color)
                 "color_material = "+sci2exp(h.color_material)
-                "material_shinines = "+sci2exp(h.material_shinines)
+                "material_shininess = "+sci2exp(h.material_shininess)
                 "user_data = "+fmtuser_data(u)
                 "tag = "+h.tag
                 ]
index 0f8b43c..cfa3d0b 100644 (file)
@@ -220,7 +220,7 @@ static getHashTableCouple propertyTable[NB_PROPERTIES] =
     {"diffuse_color", get_diffuse_color_property},
     {"specular_color", get_specular_color_property},
     {"color_material", get_color_material_property},
-    {"material_shinines", get_material_shinines_property},
+    {"material_shininess", get_material_shininess_property},
     {"lighting", get_lighting_property},
     {"light_type", get_light_type_property},
     {"light_direction", get_light_direction_property},
index 127f90f..e3fb137 100644 (file)
@@ -221,7 +221,7 @@ static setHashTableCouple propertyTable[NB_PROPERTIES] =
     {"diffuse_color", set_diffuse_color_property},
     {"specular_color", set_specular_color_property},
     {"color_material", set_color_material_property},
-    {"material_shinines", set_material_shinines_property},
+    {"material_shininess", set_material_shininess_property},
     {"lighting", set_lighting_property},
     {"light_type", set_light_type_property},
     {"light_direction", set_light_direction_property},
index 1e30752..8a393b1 100644 (file)
@@ -184,7 +184,7 @@ int get_ambient_color_property(void* _pvCtx, char* pobjUID);
 int get_diffuse_color_property(void* _pvCtx, char* pobjUID);
 int get_specular_color_property(void* _pvCtx, char* pobjUID);
 int get_color_material_property(void* _pvCtx, char* pobjUID);
-int get_material_shinines_property(void* _pvCtx, char* pobjUID);
+int get_material_shininess_property(void* _pvCtx, char* pobjUID);
 int get_lighting_property(void* _pvCtx, char* pobjUID);
 int get_light_type_property(void* _pvCtx, char* pobjUID);
 int get_light_direction_property(void* _pvCtx, char* pobjUID);
index 55c68e3..69f8fee 100644 (file)
@@ -20,7 +20,7 @@
 #include "graphicObjectProperties.h"
 
 /**
- * Gets the light's direction.
+ * Gets the direction of the light.
  */
 int get_light_direction_property(void* _pvCtx, char* pobjUID)
 {
index 1ae2e13..ad5fa8d 100644 (file)
@@ -20,7 +20,7 @@
 #include "graphicObjectProperties.h"
 
 /**
- * Gets the light's position.
+ * Gets the position of the light.
  */
 int get_light_position_property(void* _pvCtx, char* pobjUID)
 {
index aeae76f..bf1089e 100644 (file)
@@ -21,7 +21,7 @@
 
 
 /**
- * Gets the light's type.
+ * Gets the type of the light.
  */
 int get_light_type_property(void* _pvCtx, char* pobjUID)
 {
@@ -36,6 +36,13 @@ int get_light_type_property(void* _pvCtx, char* pobjUID)
         return -1;
     }
 
-    return sciReturnDouble(_pvCtx, type);
+    if (type == 0)
+    {
+        return sciReturnString(_pvCtx, "directional");
+    }
+    else
+    {
+        return sciReturnString(_pvCtx, "point");
+    }
 
 }
 
 
 /**
- * Gets the shinines level of the surface.
+ * Gets the shininess level of the surface.
  */
-int get_material_shinines_property(void* _pvCtx, char* pobjUID)
+int get_material_shininess_property(void* _pvCtx, char* pobjUID)
 {
-    double shinines = 0;
-    double* pShinines = &shinines;
+    double shininess = 0;
+    double* pShininess = &shininess;
 
-    getGraphicObjectProperty(pobjUID, __GO_MATERIAL_SHININES__, jni_double, (void **)&pShinines);
+    getGraphicObjectProperty(pobjUID, __GO_MATERIAL_SHININESS__, jni_double, (void **)&pShininess);
 
-    if (pShinines == NULL)
+    if (pShininess == NULL)
     {
-        Scierror(999, _("'%s' property does not exist for this handle.\n"), "material_shinines");
+        Scierror(999, _("'%s' property does not exist for this handle.\n"), "material_shininess");
         return -1;
     }
 
-    return sciReturnDouble(_pvCtx, shinines);
+    return sciReturnDouble(_pvCtx, shininess);
 
 }
index 345c550..cb8a89b 100644 (file)
@@ -184,7 +184,7 @@ int set_ambient_color_property(void* _pvCtx, char* pobj, void* _pvData, int valu
 int set_diffuse_color_property(void* _pvCtx, char* pobj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_specular_color_property(void* _pvCtx, char* pobj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_color_material_property(void* _pvCtx, char* pobj, void* _pvData, int valueType, int nbRow, int nbCol);
-int set_material_shinines_property(void* _pvCtx, char* pobj, void* _pvData, int valueType, int nbRow, int nbCol);
+int set_material_shininess_property(void* _pvCtx, char* pobj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_lighting_property(void* _pvCtx, char* pobj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_light_type_property(void* _pvCtx, char* pobj, void* _pvData, int valueType, int nbRow, int nbCol);
 int set_light_direction_property(void* _pvCtx, char* pobj, void* _pvData, int valueType, int nbRow, int nbCol);
index 5d296f3..48e3b11 100644 (file)
@@ -22,7 +22,7 @@
 #include "graphicObjectProperties.h"
 
 /**
- * Sets the light's direction.
+ * Sets the direction of the light.
  */
 int set_light_direction_property(void* _pvCtx, char* pobjUID, void* _pvData, int valueType, int nbRow, int nbCol)
 {
index d6248b9..0cce538 100644 (file)
@@ -22,7 +22,7 @@
 #include "graphicObjectProperties.h"
 
 /**
- * Sets the light's position.
+ * Sets the position of the light.
  */
 int set_light_position_property(void* _pvCtx, char* pobjUID, void* _pvData, int valueType, int nbRow, int nbCol)
 {
index 9b4854b..5e2cbd4 100644 (file)
 #include "SetPropertyStatus.h"
 #include "Scierror.h"
 #include "localization.h"
-
+#include "stricmp.h"
 
 #include "setGraphicObjectProperty.h"
 #include "graphicObjectProperties.h"
 
 /**
- * Sets the light's type.
+ * Sets the type of the light.
  */
 int set_light_type_property(void* _pvCtx, char* pobjUID, void* _pvData, int valueType, int nbRow, int nbCol)
 {
     BOOL status = FALSE;
     int val;
 
-    if (valueType != sci_matrix)
+    if (valueType != sci_strings)
     {
-        Scierror(999, _("Wrong type for '%s' property: Real matrix expected.\n"), "light_type");
+        Scierror(999, _("Wrong type for '%s' property: String expected.\n"), "light_type");
         return SET_PROPERTY_ERROR;
     }
 
-    if (nbRow * nbCol != 1)
+    if (stricmp((char*)_pvData, "directional") == 0)
+    {
+        val = 0;
+    }
+    else if (stricmp((char*)_pvData, "point") == 0)
+    {
+        val = 1;
+    }
+    else
     {
-        Scierror(999, _("Wrong size for '%s' property: %d elements expected.\n"), "light_type", 1);
+        Scierror(999, _("Wrong value for '%s' property: 'directional' or 'point' expected.\n"), "light_type");
         return SET_PROPERTY_ERROR;
     }
-    val = (int)((double*)_pvData)[0];
 
     status = setGraphicObjectProperty(pobjUID, __GO_LIGHT_TYPE__, &val, jni_int, 1);
 
 #include "graphicObjectProperties.h"
 
 /**
- * Sets the shinines level of the surface.
+ * Sets the shininess level of the surface.
  */
-int set_material_shinines_property(void* _pvCtx, char* pobjUID, void* _pvData, int valueType, int nbRow, int nbCol)
+int set_material_shininess_property(void* _pvCtx, char* pobjUID, void* _pvData, int valueType, int nbRow, int nbCol)
 {
     BOOL status = FALSE;
 
     if (valueType != sci_matrix)
     {
-        Scierror(999, _("Wrong type for '%s' property: Real matrix expected.\n"), "material_shinines");
+        Scierror(999, _("Wrong type for '%s' property: Real matrix expected.\n"), "material_shininess");
         return SET_PROPERTY_ERROR;
     }
 
     if (nbRow * nbCol != 1)
     {
-        Scierror(999, _("Wrong size for '%s' property: %d elements expected.\n"), "material_shinines", 1);
+        Scierror(999, _("Wrong size for '%s' property: %d elements expected.\n"), "material_shininess", 1);
         return SET_PROPERTY_ERROR;
     }
 
-    status = setGraphicObjectProperty(pobjUID, __GO_MATERIAL_SHININES__, _pvData, jni_double, 1);
+    status = setGraphicObjectProperty(pobjUID, __GO_MATERIAL_SHININESS__, _pvData, jni_double, 1);
 
     if (status == TRUE)
     {
@@ -48,7 +48,7 @@ int set_material_shinines_property(void* _pvCtx, char* pobjUID, void* _pvData, i
     }
     else
     {
-        Scierror(999, _("'%s' property does not exist for this handle.\n"), "material_shinines");
+        Scierror(999, _("'%s' property does not exist for this handle.\n"), "material_shininess");
         return SET_PROPERTY_ERROR;
     }
 }
index e98d982..d619618 100644 (file)
@@ -36,7 +36,7 @@ public class LightingUtils {
         color = m.getSpecularColor();
         mtl.setSpecularColor(new Color(color[0].floatValue(), color[1].floatValue(), color[2].floatValue()));
         mtl.setColorMaterialEnable(m.getColorMaterialMode().booleanValue());
-        mtl.setShinines(m.getShinines().floatValue());
+        mtl.setShinines(m.getShininess().floatValue());
 
         return mtl;
     }
@@ -48,6 +48,7 @@ public class LightingUtils {
      */
     public static void setLight(LightManager manager, org.scilab.modules.graphic_objects.lighting.Light light) {
 
+        if (manager == null) return;
         setLightingEnable(manager, light.isEnable());
 
         Light sciLight = manager.getLight(0);
@@ -76,6 +77,7 @@ public class LightingUtils {
      * @param status the status.
      */
     public static void setLightingEnable(LightManager manager, Boolean status) {
+        if (manager == null) return;
         manager.setLightningEnable(status.booleanValue());
         Light light = manager.getLight(0);
         light.setEnable(status.booleanValue());