/////////////////////////////////////////////////////////////////////////////// // 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. /////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// // // 3dDwfExportImpl.h : definition of the C3dDwfExportImpl class // /////////////////////////////////////////////////////////////////////////////// // // MKU 08/16/05 - for exporting to 3D DWF using DWFToolkit v7.0 // #ifndef DWF_3D_EXPORTIMPL_DEFINED #define DWF_3D_EXPORTIMPL_DEFINED #include "DwfExportParams.h" #include "DwfExportImpl.h" #include "dwf/publisher/model/Model.h" #include "dwf/publisher/model/Segment.h" #include "dwf/publisher/impl/DWFPackagePublisher.h" /** \details */ namespace TD_DWF_EXPORT { /** \details This class implements a 3D DWF export. */ class C3dDwfExportImpl : public CDwfExportMeter { Dwf3dExportParams& m_Params; DWFToolkit::DWFModel* m_pModel; DWFToolkit::DWFSegment* m_pCurrentSegment; TK_Color_RGB* m_pTKColorRGB; const ODCOLORREF* m_pPalette; DWFToolkit::DWFPackagePublisher* m_pPublisher; public: C3dDwfExportImpl(Dwf3dExportParams& pParams); ~C3dDwfExportImpl() override; // Implementation /** \details Runs the export to DWF file process for the current document. */ bool run(); /** \details Gets a pointer to the current database object being exported. \returns Pointer to the base database. */ OdDbBaseDatabase* database() override; /** \details Gets the pointer to the base host services. \returns Pointer to the base host services. */ OdDbBaseHostAppServices* getBaseHostAppServices() override; // ----- C3dDwfExportImpl methods ----- // /** \details Gets a pointer to the current segment object. \returns Pointer to the current segment object. */ DWFToolkit::DWFSegment* getCurrentSegment() { return m_pCurrentSegment; } /** \details Gets a pointer to the Toolkit color. \returns Pointer to the Toolkit color. */ TK_Color_RGB* getTKColorRGB() { return m_pTKColorRGB; } protected: friend class Od3dDwfView; /** \details Gets a pointer to the model. \returns Pointer to the model. */ DWFToolkit::DWFModel* getModel() { return m_pModel; } /** \details Gets a pointer to the publisher to add properties. \returns Pointer to the publisher or NULL to avoid useless call of addDwf3dPropertyAt(). */ DWFToolkit::DWFPackagePublisher* getPublisher() { return m_Params.propertyProviderFunc() ? m_pPublisher : NULL; } /** \details Collect properties to output. \returns false if property is missing. */ bool addDwf3dPropertyAt(const OdGiDrawable* pParent, const OdGiDrawable* pDrawable, OdUInt32 drawableFlags, OdString& sLabel, OdStringArray& sPropPathNames, OdStringArray& sValues); // out }; } #endif /* DWF_3D_EXPORTIMPL_DEFINED */