Added Material::operator =
This commit is contained in:
parent
b73d3c3e7f
commit
ebbf92e43c
@ -77,6 +77,8 @@ class SG_EXPORT Material : public StateAttribute
|
||||
return 0; // passed all the above comparison macro's, must be equal.
|
||||
}
|
||||
|
||||
Material& operator = (const Material& rhs);
|
||||
|
||||
virtual void getAssociatedModes(std::vector<GLMode>& modes) const
|
||||
{
|
||||
// Have to think about the role of _colorMode
|
||||
|
@ -45,6 +45,30 @@ Material::~Material()
|
||||
{
|
||||
}
|
||||
|
||||
Material& Material:: operator = (const Material& rhs)
|
||||
{
|
||||
if (&rhs==this) return *this;
|
||||
|
||||
_colorMode= rhs._colorMode;
|
||||
_ambientFrontAndBack= rhs._ambientFrontAndBack;
|
||||
_ambientFront= rhs._ambientFront;
|
||||
_ambientBack= rhs._ambientBack;
|
||||
_diffuseFrontAndBack= rhs._diffuseFrontAndBack;
|
||||
_diffuseFront= rhs._diffuseFront;
|
||||
_diffuseBack= rhs._diffuseBack;
|
||||
_specularFrontAndBack= rhs._specularFrontAndBack;
|
||||
_specularFront= rhs._specularFront;
|
||||
_specularBack= rhs._specularBack;
|
||||
_emissionFrontAndBack= rhs._emissionFrontAndBack;
|
||||
_emissionFront= rhs._emissionFront;
|
||||
_emissionBack= rhs._emissionBack;
|
||||
_shininessFrontAndBack= rhs._shininessFrontAndBack;
|
||||
_shininessFront= rhs._shininessFront;
|
||||
_shininessBack= rhs._shininessBack;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
void Material::setAmbient(Face face, const Vec4& ambient )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user