/////////////////////////////////////////////////////////////////////////////// // 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. /////////////////////////////////////////////////////////////////////////////// #pragma once #include "OdAppearanceSchemaBaseHelper.h" /** \details A helper class to work with transparency part of Generic appearance schema. */ class MATERIALREADER_EXPORT OdGenericAppearanceSchemaTransparency : public OdAppearanceSchemaBaseHelper { public: using OdAppearanceSchemaBaseHelper::OdAppearanceSchemaBaseHelper; /** \details Retrieves an amount of material transparency. When Transparency is 0, Translucency and Index of Refraction are not available. \param double [out] Output double value between 0 (completely opaque) and 1 (completely transparent). \returns An OdResult value: eOk if schema contains transparency, eNotApplicable if not. */ OdResult getAmount(double&) const; /** \details Sets an amount of material transparency. \param double [in] Input highlight value. */ void setAmount(const double&); /** \details Retrieves material transparency pattern. \param OdAssetPtr [out] Output material transparency pattern. \returns An OdResult value: eOk if schema contains a transparency pattern, eNotApplicable if not. */ OdResult getTransparencyMap(OdAssetPtr&) const; /** \details Sets the transparency pattern. \param OdAssetPtr [in] Input transparency pattern. */ void setTransparencyMap(const OdAssetPtr&); /** \details Retrieves a composite between the base color and the transparency image. \param double [out] Output double value that contains a value of a composite. \returns An OdResult value: eOk if schema contains texture, eNotApplicable if not. */ OdResult getImageFade(double&) const; /** \details Sets the composite between the base color and the transparency image. \param double [in] Input composite value. */ void setImageFade(const double&); /** \details Retrieves a percent (as factor) of the light which is scattered by the material, so that objects behind the material cannot be seen clearly. \param double [out] Output value of translucency: 0 (not translucent) and 1 (completely translucent, such as frosted glass). \returns An OdResult value: eOk if schema contains a translucency, eNotApplicable if not. */ OdResult getTranslucency(double&) const; /** \details Sets the translucency value. \param double [in] Input composite value. */ void setTranslucency(const double&); /** \details Retrieves a translucency pattern. \param OdAssetPtr [out] Output material translucency pattern. \returns An OdResult value: eOk if schema contains translucency pattern, eNotApplicable if not. */ OdResult getTranslucencyMap(OdAssetPtr&) const; /** \details Sets the translucency factor of the scattered light. \param OdAssetPtr [in] Input material translucency pattern. */ void setTranslucencyMap(const OdAssetPtr&); /** \details Retrieves a light bends factor when the light passes through the material. \param double [out] Output value of refraction: 0 (no refraction) and 5 (most refraction). \returns An OdResult value: eOk if schema contains a refraction, eNotApplicable if not. */ OdResult getRefraction(double&) const; /** \details Sets the light bends factor. \param double [in] Input composite value. */ void setRefraction(const double&); };