/////////////////////////////////////////////////////////////////////////////// // 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 _ODTV_SECTIONGEOMETRYTRAITS_H_INCLUDED_ #define _ODTV_SECTIONGEOMETRYTRAITS_H_INCLUDED_ #include "Tv.h" #include "TvTraitsDef.h" #include "TvVisualStyle.h" #include "TvIObject.h" /** \details This template class is a specialization of the OdTvSmartPtr class for OdTvSectionGeometryTraits object pointers. */ class OdTvSectionGeometryTraits; typedef OdTvSmartPtr OdTvSectionGeometryTraitsPtr; /** \details Traits class for section geometry customization. */ class ODTV_EXPORT OdTvSectionGeometryTraits : public OdTvIObject { protected: /** \details Default constructor for the OdTvSectionGeometryTraits class. Sets the following data members: */ OdTvSectionGeometryTraits(); public: /** \details Traits changed flags. */ enum ChangedTraits { /** Color is changed. */ kColorChanged = 1 << 1, /** Lineweight is changed. */ kLineWeightChanged = 1 << 2, /** Material is changed. */ kMaterialChanged = 1 << 3, /** Transparency is changed. */ kTransparencyChanged = 1 << 4, /** Fill has changed. */ kFillChanged = 1 << 5 }; /** \details Retrieves section geometry traits true color as a reference to OdTvColorDef. \returns Returns section geometry traits true color as a reference to OdTvColorDef. */ virtual const OdTvColorDef& getColor() const = 0; /** \details Retrieves lineweight for this section geometry traits. \returns Returns lineweight for this section geometry traits. */ virtual const OdTvLineWeightDef& getLineWeight() const = 0; /** \details Retrieves material identifier for this section geometry traits. \returns Returns material identifier for this section geometry traits. */ virtual OdTvMaterialDef getMaterial() const = 0; /** \details Retrieves transparency for this section geometry traits as reference to OdTvTransparencyDef. \returns Returns transparency for this section geometry traits as reference to OdTvTransparencyDef. */ virtual const OdTvTransparencyDef& getTransparency() const = 0; /** \details Retrieves the fill for this section geometry traits \returns Returns the fill for this section geometry traits */ virtual const OdTvHatchPatternDef getFill() const = 0; /** \details Retrieves the flags that determine which traits were changed. It is a combination of Use OdTvSectionGeometryTraits::ChangedTraits flags. \returns Returns the flags that determine which traits were changed. */ virtual OdUInt16 getChangedTraits() const = 0; /** \details Sets true color for this section geometry traits. \param trueColor [in] Color object to set. */ virtual void setColor(const OdTvColorDef& trueColor) = 0; /** \details Sets the lineweight for this section geometry traits. \param lineWeight [in] LineWeight. */ virtual void setLineWeight(const OdTvLineWeightDef& lineWeight) = 0; /** \details Sets the material for this section geometry traits. \param materialId [in] Pointer to the material identifier. */ virtual void setMaterial(OdTvMaterialDef materialId) = 0; /** \details Sets the transparency object for this section geometry traits. \param transparency [in] Transparency data. */ virtual void setTransparency(const OdTvTransparencyDef& transparency) = 0; /** \details Sets the fill for this section geometry traits. \param fill [in] Pointer to the section geometry traits fill. */ virtual void setFill(const OdTvHatchPatternDef fill) = 0; /** \details Checks whether processing is enabled. \returns Returns the flags that indicates that processing enabled or not. */ virtual bool isProcessingEnabled() const = 0; /** \details Specifies whether processing is enabled. \param bEnable [in] A flags that indicates that processing enabled or not. */ virtual void setProcessingEnabled( bool bEnabled ) = 0; /** \details Creates a new section geometry traits object. \returns Returns a smart pointer to the created clipped geometry output object. */ static OdTvSectionGeometryTraitsPtr createObject(); }; #endif // _ODTV_SECTIONGEOMETRYTRAITS_H_INCLUDED_