/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef __TNW_MATERIAL_ATTRIBUTE_H__ #define __TNW_MATERIAL_ATTRIBUTE_H__ #include "NwAttribute.h" class OdNwColor; /** \details This class represents an attribute with material data. */ class NWDBEXPORT OdNwMaterialAttribute : public OdNwAttribute { //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdNwMaterialAttribute); //DOM-IGNORE-END public: /** \details Default constructor. Creates a new object of the OdNwMaterialAttribute class. */ OdNwMaterialAttribute(); public: /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwMaterialAttribute(); public: /** \details Receives the ambient color of this material attribute. \returns Ambient color of this material as an OdNwColor object. */ OdNwColor getAmbient() const; /** \details Receives the diffuse color of this material attribute. \returns Diffuse color of this material as an OdNwColor object. */ OdNwColor getDiffuse() const; /** \details Receives the specular color of this material attribute. \returns Specular color of this material as an OdNwColor object. */ OdNwColor getSpecular() const; /** \details Receives the emissive color of this material attribute. \returns Emissive color of this material as an OdNwColor object. */ OdNwColor getEmissive() const; /** \details Receives the shininess of this material attribute. \returns Shininess of the material as a double value. */ double getShininess() const; /** \details Receives the transparency of this material. \returns Transparency of the material as a double value. */ double getTransparency() const; /** \details Sets the ambient color of this material attribute. \param clr [in] Reference to ambient color of this material attribute. */ void setAmbient(const OdNwColor& clr); /** \details Set the ambient color of this material attribute. \param clr [in] The rvalue reference to ambient color of this material attribute. */ void setAmbient(OdNwColor&& clr); /** \details Sets the diffuse color of this material attribute. \param clr [in] Reference to diffuse color of this material attribute. */ void setDiffuse(const OdNwColor& clr); /** \details Sets the diffuse color of this material attribute. \param clr [in] The rvalue reference to diffuse color of this material attribute. */ void setDiffuse(OdNwColor&& clr); /** \details Sets the specular color of this material attribute. \param clr [in] Reference to specular color of this material attribute. */ void setSpecular(const OdNwColor& clr); /** \details Sets the specular color of this material attribute. \param clr [in] The rvalue reference to specular color of this material attribute. */ void setSpecular(OdNwColor&& clr); /** \details Sets the emissive color of this material attribute. \param clr [in] Reference to emissive color of this material attribute. */ void setEmissive(const OdNwColor& clr); /** \details Sets the emissive color of this material attribute. \param clr [in] The rvalue reference to emissive color of this material attribute. */ void setEmissive(OdNwColor&& clr); /** \details Sets the shininess of this material attribute. \param value [in] Double value with the shininess of this material attribute. */ void setShininess(double value); /** \details Sets the transparency of this material attribute. \param value [in] Double value with the transparency of this material attribute. */ void setTransparency(double value); }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwMaterialAttribute object pointers. */ typedef OdSmartPtr OdNwMaterialAttributePtr; #endif //__TNW_MATERIAL_ATTRIBUTE_H__