fw4spl
amp/src/fwDataCamp/Material.cpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2016.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #include <fwCamp/UserObject.hpp>
8 #include "fwDataCamp/Material.hpp"
9 
10 fwCampImplementDataMacro((fwData)(Material))
11 {
12  builder
13  .tag("object_version", "4")
14  .tag("lib_name", "fwData")
15  .base< ::fwData::Object>()
16  .property("shading_mode",&::fwData::Material::m_shadingMode)
17  .property("representation_mode",&::fwData::Material::m_representationMode)
18  .property("options_mode", &::fwData::Material::m_optionsMode)
19  .property("ambient",&::fwData::Material::m_ambient)
20  .property("diffuse", &::fwData::Material::m_diffuse)
21  .property("diffuse_texture", &::fwData::Material::m_diffuseTexture)
22  .property("diffuse_texture_filtering", &::fwData::Material::m_diffuseTextureFiltering)
23  .property("diffuse_texture_wrapping", &::fwData::Material::m_diffuseTextureWrapping)
24  ;
25 }
26 
27 fwCampImplementEnumMacro((fwData)(Material)(OptionsType))
28 {
29  builder
30  .value("STANDARD", ::fwData::Material::STANDARD)
31  .value("NORMALS", ::fwData::Material::NORMALS)
32  .value("CELLS_NORMALS", ::fwData::Material::CELLS_NORMALS)
33  ;
34 }
35 
36 fwCampImplementEnumMacro((fwData)(Material)(ShadingType))
37 {
38  builder
39  .value("AMBIENT", ::fwData::Material::AMBIENT)
40  .value("FLAT", ::fwData::Material::FLAT)
41  .value("GOURAUD", ::fwData::Material::GOURAUD)
42  .value("PHONG", ::fwData::Material::PHONG)
43  ;
44 }
45 
46 fwCampImplementEnumMacro((fwData)(Material)(RepresentationType))
47 {
48  builder
49  .value("SURFACE", ::fwData::Material::SURFACE)
50  .value("POINT", ::fwData::Material::POINT )
51  .value("WIREFRAME", ::fwData::Material::WIREFRAME)
52  .value("EDGE", ::fwData::Material::EDGE)
53  ;
54 }
55 
56 fwCampImplementEnumMacro((fwData)(Material)(FilteringType))
57 {
58  builder
59  .value("NEAREST", ::fwData::Material::NEAREST)
60  .value("LINEAR", ::fwData::Material::LINEAR)
61  ;
62 }
63 
64 fwCampImplementEnumMacro((fwData)(Material)(WrappingType))
65 {
66  builder
67  .value("CLAMP", ::fwData::Material::CLAMP)
68  .value("REPEAT", ::fwData::Material::REPEAT)
69  ;
70 }
ShadingType m_shadingMode
Shading mode (flat, Gouraud, Phong)
Color::sptr m_ambient
Ambient color.
OptionsType m_optionsMode
Options mode (display normals or not)
Color::sptr m_diffuse
Diffuse color.
FilteringType m_diffuseTextureFiltering
Filtering for diffuse texture.
Image::sptr m_diffuseTexture
Diffuse texture.
RepresentationType m_representationMode
Fill mode (flat, wireframe, point)
Base class for each data object.
WrappingType m_diffuseTextureWrapping
Wrapping for diffuse texture.
Contains the representation of the data objects used in the framework.