1 /*
2  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3  * Copyright (C) 2013 - Pedro SOUZA
4  *
5  * Copyright (C) 2012 - 2016 - Scilab Enterprises
6  *
7  * This file is hereby licensed under the terms of the GNU GPL v2.0,
8  * pursuant to article 5.3.4 of the CeCILL v.2.1.
9  * This file was originally licensed under the terms of the CeCILL v2.1,
10  * and continues to be available under such terms.
11  * For more information, see the COPYING file which you should have received
12  * along with this program.
13  *
14  */
15 
16 
17 #include "getHandleProperty.h"
18 #include "returnProperty.h"
19 #include "Scierror.h"
20 #include "localization.h"
21 
22 #include "getGraphicObjectProperty.h"
23 #include "graphicObjectProperties.h"
24 
25 /**
26  * Gets the specular color of the light/material.
27  */
get_specular_color_property(void * _pvCtx,int iObjUID)28 void* get_specular_color_property(void* _pvCtx, int iObjUID)
29 {
30     double* color = NULL;
31 
32     getGraphicObjectProperty(iObjUID, __GO_SPECULARCOLOR__, jni_double_vector, (void **)&color);
33 
34     if (color == NULL)
35     {
36         Scierror(999, _("'%s' property does not exist for this handle.\n"), "specular_color");
37         return NULL;
38     }
39 
40     return sciReturnMatrix(color, 1, 3);
41 }
42