/////////////////////////////////////////////////////////////////////////////// // 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 _PRCTEXTUREDEFINITION_INCLUDED_ #define _PRCTEXTUREDEFINITION_INCLUDED_ #include "PrcTextureTransformation.h" #include "PrcTextureMappingType.h" #include "PrcBase.h" SMARTPTR(OdPrcTextureDefinition); /** \details A class that represents a group of texture parameters used in a texture application. */ class PRC_TOOLKIT OdPrcTextureDefinition : public OdPrcReferencedBase { public: ODPRC_DECLARE_MEMBERS_PRCBASE(OdPrcTextureDefinition) /** \details Requests the current array of texture mapping attribute intensities. \returns An array of double values that represents the array of texture mapping attribute intensities. \remarks The array of texture mapping attribute intensities is returned as a reference to an OdGeDoubleArray object; therefore, it can be used to set a new array or modify the current one. */ OdGeDoubleArray &textureMappingAttributesIntensities(); /** \details Requests the current array of texture mapping attribute intensities. \returns An array of double values that represents the array of texture mapping attribute intensities. */ const OdGeDoubleArray &textureMappingAttributesIntensities() const; /** \details Requests the current array of texture mapping attribute components. \returns An array of character values that represents the array of texture mapping attribute components. \remarks The array of texture mapping attribute components is returned as a reference to an OdArray object; therefore, it can be used to set a new array or modify the current one. */ OdArray &textureMappingAttributesComponents(); /** \details Requests the current array of texture mapping attribute components. \returns An array of character values that represents the array of texture mapping attribute components. */ const OdArray &textureMappingAttributesComponents() const; /** \details Requests the current texture mapping type value. \returns An object that represents the texture mapping type. \remarks The texture mapping type is returned as a reference to an object; therefore, it can be used to set a new texture mapping type value. */ OdPrcTextureMappingType &textureMappingType(); /** \details Requests the current texture mapping type value. \returns An object that represents the texture mapping type. */ const OdPrcTextureMappingType &textureMappingType() const; /** \details Sets a new texture dimension value. The integer value 2 is supported. Values 1 and 3 are reserved for future use. \param texture_dimension [in] A signed byte value that contains the new texture dimension value to be set. */ void setTextureDimension(OdInt8 texture_dimension); /** \details Requests the current texture dimension value. \returns A signed byte value that contains the texture dimension value. */ OdInt8 textureDimension() const; /** \details Sets a new texture apply mode. \param texture_applying_mode [in] A signed byte value that contains the new texture apply mode to be set. */ void setTextureApplyingMode(OdInt8 texture_applying_mode); /** \details Requests the current texture apply mode. \returns A signed byte value that contains the texture apply mode. */ OdInt8 textureApplyingMode() const; /** \details Requests the current picture of the texture definition. \returns A smart pointer to the object. \remarks The picture is returned as a reference to an object; therefore, it can be used to set a new picture. */ OdPrcPicturePtr & picture(); /** \details Requests the current picture of the texture definition. \returns A smart pointer to the object. */ const OdPrcPicturePtr & picture() const; /** \details Sets new texture mapping attributes. Texture mapping attributes are stored in a bit field that is used to represent an apply procedure for the texture. \param texture_mapping_attributes [in] An unsigned 32-bit integer value that contains the new texture mapping attributes to be set. */ void setTextureMappingAttributes(OdUInt32 texture_mapping_attributes); /** \details Requests the current texture mapping attributes. \returns An unsigned 32-bit integer value that contains texture mapping attributes. */ OdUInt32 textureMappingAttributes() const; /** \details Sets a new texture function value. \param texture_function [in] An unsigned 32-bit integer value that contains the new texture function value to be set. */ void setTextureFunction(OdUInt32 texture_function); /** \details Requests the current texture function value. \returns An unsigned 32-bit integer value that contains the current texture function. */ OdUInt32 textureFunction() const; /** \details Sets a new value for the blend source of RGB color components. \param blend_src_rgb [in] A new value of the blend source to be set. \remarks Reserved for future use. */ void setBlendSrcRgb(OdUInt32 blend_src_rgb); /** \details Requests the current value of the blend source of RGB color components. \returns An unsigned 32-bit integer value that contains the value of the blend source of RGB color components. \remarks Reserved for future use. */ OdUInt32 blendSrcRgb() const; /** \details Sets a new value for the blend destination of RGB color components. \param blend_dst_rgb [in] A new value of the blend destination to be set. \remarks Reserved for future use. */ void setBlendDstRgb(OdUInt32 blend_dst_rgb); /** \details Requests the current value of the blend destination of RGB color components. \returns An unsigned 32-bit integer value that contains the value of the blend destination of RGB color components. \remarks Reserved for future use. */ OdUInt32 blendDstRgb() const; /** \details Sets a new value for the blend source of alpha color components. \param blend_src_alpha [in] A new value of the blend destination to be set. \remarks Reserved for future use. */ void setBlendSrcAlpha(OdUInt32 blend_src_alpha); /** \details Requests the current value of the blend source of alpha color components. \returns An unsigned 32-bit integer value that contains the value of the blend source of alpha color components. \remarks Reserved for future use. */ OdUInt32 blendSrcAlpha() const; /** \details Sets a new value for the blend destination alpha color components. \param blend_dst_alpha [in] A new value of the blend destination to be set. \remarks Reserved for future use. */ void setBlendDstAlpha(OdUInt32 blend_dst_alpha); /** \details Requests the current value of the blend destination of alpha color components. \returns An unsigned 32-bit integer value that contains the value of the blend destination of alpha color components. \remarks Reserved for future use. */ OdUInt32 blendDstAlpha() const; /** \details Sets a new value for the alpha test. Reserved for future use. \param alpha_test [in] A new value of the alpha test. */ void setAlphaTest(OdUInt32 alpha_test); /** \details Requests the current value of the alpha test. \returns An unsigned 32-bit integer that contains the current value of the alpha test. */ OdUInt32 alphaTest() const; /** \details Sets a new value for the repeat mode in the U direction. \param texture_wrapping_mode_S [in] A new value of the repeat mode in the U direction. */ void setTextureWrappingModeS(OdUInt32 texture_wrapping_mode_S); /** \details Requests the current value of the repeat mode in the U direction. \returns An unsigned 32-bit integer value that contains the the repeat mode in the U direction. */ OdUInt32 textureWrappingModeS() const; /** \details Sets a new value for the repeat mode in the V direction. \param texture_wrapping_mode_T [in] A new value of the repeat mode in the V direction. */ void setTextureWrappingModeT(OdUInt32 texture_wrapping_mode_T); /** \details Requests the current value of the repeat mode in the V direction. \returns An unsigned 32-bit integer value that contains the the repeat mode in the V direction. */ OdUInt32 textureWrappingModeT() const; /** \details Sets a new value for the repeat mode in the W direction. \param texture_wrapping_mode_R [in] A new value of the repeat mode in the W direction. */ void setTextureWrappingModeR(OdUInt32 texture_wrapping_mode_R); /** \details Requests the current value of the repeat mode in the W direction. \returns An unsigned 32-bit integer value that contains the the repeat mode in the W direction. */ OdUInt32 textureWrappingModeR() const; /** \details Sets a new red color component value. \param red [in] A new value to be set. */ void setRed(OdUInt32 red); /** \details Requests the current red color component value. \returns An unsigned 32-bit integer value that represents the red color component. */ OdUInt32 red() const; /** \details Sets a new green color component value. \param green [in] A new value to be set. */ void setGreen(OdUInt32 green); /** \details Requests the current green color component value. \returns An unsigned 32-bit integer value that represents the green color component. */ OdUInt32 green() const; /** \details Sets a new blue color component value. \param blue [in] A new value to be set. */ void setBlue(OdUInt32 blue); /** \details Requests the current blue color component value. \returns An unsigned 32-bit integer value that represents the blue color component. */ OdUInt32 blue() const; /** \details Sets a new alpha value. \param alpha [in] A new alpha value to be set. */ void setAlpha(OdUInt32 alpha); /** \details Requests the current alpha value. \returns An unsigned 32-bit integer value that represents the current alpha value. */ OdUInt32 alpha() const; /** \details Sets a new threshold value for the alpha test. \param alpha_test_reference [in] A new threshold value to be set. */ void setAlphaTestReference(OdUInt32 alpha_test_reference); /** \details Requests the current threshold value for the alpha test. \returns An unsigned 32-bit integer value that represents the current threshold value for the alpha test. */ OdUInt32 alphaTestReference() const; /** \details Requests the current transformation data used in the texture definition. \returns An object. \remarks Transformation data is returned as a reference to an object; therefore, it can be used to set new transformation data. */ OdPrcTextureTransformation &textureTransformation(); /** \details Requests the current transformation data used in the texture definition. \returns An object. */ const OdPrcTextureTransformation &textureTransformation() const; /** \details Checks whether there is transformation data used in the texture definition. \returns The true value if there is transformation data used in the texture definition, or returns false in the other case. */ bool hasTextureTransformation() const; /** \details Removes transformation data from the texture definition. */ void removeTextureTransformation(); /** \details Destroys the texture definition object. */ virtual ~OdPrcTextureDefinition(); }; #endif // _PRCTEXTUREDEFINITION_INCLUDED_