Ignition Rendering

API Reference

0.1.0
Material.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef IGNITION_RENDERING_MATERIAL_HH_
18 #define IGNITION_RENDERING_MATERIAL_HH_
19 
20 #include <string>
21 #include <ignition/math/Color.hh>
22 #include <ignition/common/Material.hh>
26 #include "ignition/rendering/Export.hh"
27 
28 namespace ignition
29 {
30  namespace rendering
31  {
34  class IGNITION_RENDERING_VISIBLE Material :
35  public virtual Object
36  {
38  public: virtual ~Material() { }
39 
42  public: virtual bool LightingEnabled() const = 0;
43 
46  public: virtual void SetLightingEnabled(const bool _enabled) = 0;
47 
50  public: virtual math::Color Ambient() const = 0;
51 
57  public: virtual void SetAmbient(const double _r, const double _g,
58  const double _b, const double _a = 1.0) = 0;
59 
62  public: virtual void SetAmbient(const math::Color &_color) = 0;
63 
66  public: virtual math::Color Diffuse() const = 0;
67 
73  public: virtual void SetDiffuse(const double _r, const double _g,
74  const double _b, const double _a = 1.0) = 0;
75 
78  public: virtual void SetDiffuse(const math::Color &_color) = 0;
79 
82  public: virtual math::Color Specular() const = 0;
83 
89  public: virtual void SetSpecular(const double _r, const double _g,
90  const double _b, const double _a = 1.0) = 0;
91 
94  public: virtual void SetSpecular(const math::Color &_color) = 0;
95 
98  public: virtual math::Color Emissive() const = 0;
99 
105  public: virtual void SetEmissive(const double _r, const double _g,
106  const double _b, const double _a = 1.0) = 0;
107 
110  public: virtual void SetEmissive(const math::Color &_color) = 0;
111 
114  public: virtual double Shininess() const = 0;
115 
118  public: virtual void SetShininess(const double _shininess) = 0;
119 
122  public: virtual double Transparency() const = 0;
123 
126  public: virtual void SetTransparency(const double _transparency) = 0;
127 
130  public: virtual double Reflectivity() const = 0;
131 
134  public: virtual void SetReflectivity(const double _reflectivity) = 0;
135 
138  public: virtual bool CastShadows() const = 0;
139 
142  public: virtual void SetCastShadows(const bool _castShadows) = 0;
143 
146  public: virtual bool ReceiveShadows() const = 0;
147 
150  public: virtual void SetReceiveShadows(const bool _receiveShadows) = 0;
151 
154  public: virtual bool ReflectionEnabled() const = 0;
155 
158  public: virtual void SetReflectionEnabled(const bool _enabled) = 0;
159 
162  public: virtual bool HasTexture() const = 0;
163 
166  public: virtual std::string Texture() const = 0;
167 
170  public: virtual void SetTexture(const std::string &_name) = 0;
171 
173  public: virtual void ClearTexture() = 0;
174 
177  public: virtual bool HasNormalMap() const = 0;
178 
181  public: virtual std::string NormalMap() const = 0;
182 
185  public: virtual void SetNormalMap(const std::string &_name) = 0;
186 
188  public: virtual void ClearNormalMap() = 0;
189 
192  public: virtual enum ShaderType ShaderType() const = 0;
193 
196  public: virtual void SetShaderType(enum ShaderType _type) = 0;
197 
200  public: virtual MaterialPtr Clone(const std::string &_name = "")
201  const = 0;
202 
205  public: virtual void CopyFrom(ConstMaterialPtr _material) = 0;
206 
209  public: virtual void CopyFrom(const common::Material &_material) = 0;
210  };
211  }
212 }
213 #endif
STL class.
virtual ~Material()
Deconstructor.
Definition: Material.hh:38
ShaderType
Available types of shaders. Note that not all rendering-engines will be able to use each type...
Definition: ShaderType.hh:31
Definition: ArrowVisual.hh:22
Represents a surface material of a Geometry.
Definition: Material.hh:34
Represents an object present in the scene graph. This includes sub-meshes, materials, render targets, as well as posable nodes.
Definition: Object.hh:31