1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : Material_Model.h
21 // Author : Margarita KARPUNINA, Open CASCADE S.A.S. (margarita.karpunina@opencascade.com)
23 #ifndef MATERIAL_MODEL_H
24 #define MATERIAL_MODEL_H
33 #include <Graphic3d_MaterialAspect.hxx>
35 class Material_ResourceMgr;
36 class GEOM_VTKPropertyMaterial;
38 class MATERIAL_SALOME_EXPORT Material_Model
45 Specular, //!< Specular
46 Emissive //!< Emissive
50 virtual ~Material_Model();
52 void fromProperties( const QString& );
53 QString toProperties();
54 void fromResources( const QString& = QString(), Material_ResourceMgr* = 0 );
55 void toResources( const QString&, Material_ResourceMgr* );
57 bool isPhysical() const;
58 void setPhysical( bool );
60 bool hasReflection( ReflectionType ) const;
61 void setReflection( ReflectionType, bool );
63 QColor color( ReflectionType ) const;
64 void setColor( ReflectionType, const QColor& );
66 double reflection( ReflectionType, bool = true ) const;
67 void setReflection( ReflectionType, double, bool = true );
69 double shininess( bool = true) const;
70 void setShininess( double, bool = true );
72 double transparency() const;
73 void setTransparency( double );
75 Graphic3d_MaterialAspect getMaterialOCCAspect( bool = true );
76 GEOM_VTKPropertyMaterial* getMaterialVTKProperty( bool = true );
80 void read( const QString&, Material_ResourceMgr* );
90 typedef QVector<ReflectionData> ReflectionList;
93 double myFrontShininess;
94 double myBackShininess;
95 double myTransparency;
96 ReflectionList myReflection;
99 #endif // MATERIAL_MODEL_H