/////////////////////////////////////////////////////////////////////////////// // 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 _ODCOLLADAMODULEIMPL_INCLUDED_ #define _ODCOLLADAMODULEIMPL_INCLUDED_ #pragma once #include "OdaCommon.h" #include "ColladaExportDef.h" #include "RxDynamicModule.h" //static build #include "DbBaseDatabase.h" #define STL_USING_MAP #include class OdGiDrawable; class OdStreamBuf; /** \details */ namespace TD_COLLADA_EXPORT { /** \details This class implements the Collada export module. */ class COLLADAEXPORT_DLL ColladaModule : public OdRxModule { protected: /** \details Initializes the Collada export module. */ void initApp() override; /** \details Uninitializes the Collada export module. */ void uninitApp() override; public: /** \details Exports to the Collada all entities in the active space of a given database pDb \param pDb [in] Pointer to the database. \param pFileName [in] Full path of the exported file. \param pPallete [in] Pointer to the color palette used with export. \param numColors [in] Number of colors in palette. \param matTransform [in] Transformation matrix of exported objects. \param pMapDeviations [in] Map of the use of deviations for different objects. \param useDoublePrecision [in] Flag to use double precision. \param exportWires [in] Flag for exporting curved line variations. Used in OdColladaOut class \param pHostApp [in] A pointer to a database application services object. \param bUseInstances [in] Flag to use entities instances without duplicating geometry. Used in OdColladaOut class \param bIncludeXRefs [in] Flag for inclusion in export of blocks from external references \remarks pPallete. Not NULL. An array of colors of size [numColors], for specifying colors of objects via color index. numColors must be 256. To apply deviation to the whole drawing, you need to add 1 pair to pMapDeviations with a NULL key and a deviation value pHostApp. May be NULL. Needed for texture export, for working with the file system for searching images. In case of NULL, odrxSystemServices()->accessFile is used to search for files */ virtual OdResult exportCollada(OdDbBaseDatabase* pDb, const OdString& pFileName, const ODCOLORREF* pPallete, int numColors = 256, const OdGeMatrix3d& matTransform = OdGeMatrix3d::kIdentity, const std::map* pMapDeviations = NULL, bool useDoublePrecision = false, bool exportWires = false, OdDbBaseHostAppServices* pHostApp = NULL, bool bUseInstances = false, bool bIncludeXRefs = true); /** \details Exports to the Collada a single entity defined by pEntity of a given database pDb \param pDb [in] Pointer to the database. \param pEntity [in] Pointer to the entity for export. \param pFileName [in] Full path of the exported file. \param pPallete [in] Pointer to the color palette used with export. \param numColors [in] Number of colors in palette. \param matTransform [in] Transformation matrix of exported objects. \param pMapDeviations [in] Map of the use of deviations for different objects. \param useDoublePrecision [in] Flag to use double precision. \param exportWires [in] for exporting curved line variations. Used in OdColladaOut class \param pHostApp [in] A pointer to a database application services object. \param bUseInstances [in] Flag to use entities instances without duplicating geometry. Used in OdColladaOut class \param bIncludeXRefs [in] Flag for inclusion in export of blocks from external references \remarks pPallete. Not NULL. An array of colors of size [numColors], for specifying colors of objects via color index. numColors must be 256. To apply deviation to the whole drawing, you need to add 1 pair to pMapDeviations with a NULL key and a deviation value pHostApp. May be NULL. Needed for texture export, for working with the file system for searching images. In case of NULL, odrxSystemServices()->accessFile is used to search for files */ virtual OdResult exportCollada(OdDbBaseDatabase* pDb, const OdGiDrawable& pEntity, const OdString& pFileName, const ODCOLORREF* pPallete, int numColors = 256, const OdGeMatrix3d& matTransform = OdGeMatrix3d::kIdentity, const std::map* pMapDeviations = NULL, bool useDoublePrecision = false, bool exportWires = false, OdDbBaseHostAppServices* pHostApp = NULL, bool bUseInstances = false, bool bIncludeXRefs = true); }; /** \details This template class is a specialization of the OdSmartPtr class for STLModule object pointers. */ typedef OdSmartPtr ColladaModulePtr; } #endif //_ODCOLLADAMODULEIMPL_INCLUDED_