7 #include <fwCom/Signal.hpp> 8 #include <fwCom/Signal.hxx> 10 #include "fwData/registry/macros.hpp" 11 #include "fwData/Exception.hpp" 12 #include "fwData/Material.hpp" 28 m_representationMode(SURFACE),
29 m_optionsMode(STANDARD),
30 m_ambient(
Color::New(0.05f, 0.05f, 0.05f, 1.f) ),
31 m_diffuse(
Color::New() ),
32 m_diffuseTextureFiltering(NEAREST),
33 m_diffuseTextureWrapping(REPEAT)
49 Material::csptr other = Material::dynamicConstCast(_source);
51 "Unable to copy" + (_source ? _source->getClassname() : std::string(
"<NULL>"))
70 Material::csptr other = Material::dynamicConstCast(_source);
72 "Unable to copy" + (_source ? _source->getClassname() : std::string(
"<NULL>"))
FWDATA_API Material(::fwData::Object::Key key)
Constructor.
ShadingType m_shadingMode
Shading mode (flat, Gouraud, Phong)
This class defines a material. A material is represented by an ambient color and a diffuse color...
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
Implements data exception class.
Color::sptr m_ambient
Ambient color.
virtual FWDATA_API ~Material()
Destructor.
This class defines color object.
FWDATA_API Color::sptr diffuse() const
returns editable diffuse color
FWDATA_API void fieldDeepCopy(const ::fwData::Object::csptr &source)
A deep copy of fields (objects in m_children)
FWDATA_API void setDiffuseTexture(const Image::sptr &diffuseTexture)
Setter for diffuse texture.
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)
static FWDATA_API::fwData::Object::sptr copy(const ::fwData::Object::csptr &source)
return a copy of the source. if source is a null pointer, return a null pointer.
virtual const std::string & getClassname() const override
return full object's classname with its namespace, i.e. fwCore::BaseObject
FWDATA_API void setAmbient(const Color::sptr &ambient)
Setter for ambient color.
WrappingType m_diffuseTextureWrapping
Wrapping for diffuse texture.
FWDATA_API Image::sptr getDiffuseTexture() const
returns editable diffuse texture
static FWDATA_APIconst::fwCom::Signals::SignalKeyType s_REMOVED_TEXTURE_SIG
Type of signal when a texture is added.
FWDATA_API void shallowCopy(const Object::csptr &_source) override
Defines shallow copy.
Contains the representation of the data objects used in the framework.
FWDATA_API void fieldShallowCopy(const ::fwData::Object::csptr &source)
A shallow copy of fields (objects in m_children)
FWDATA_API Color::sptr ambient() const
returns editable ambient color
FWDATA_API void cachedDeepCopy(const Object::csptr &_source, DeepCopyCacheType &cache) override
Defines deep copy.
FWDATA_API void setDiffuse(const Color::sptr &diffuse)
Setter for diffuse color.
static FWDATA_APIconst::fwCom::Signals::SignalKeyType s_ADDED_TEXTURE_SIG
Type of signal when a texture is added.