/////////////////////////////////////////////////////////////////////////////// // 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 __EX_NW_REACP_MODULE_H__ #define __EX_NW_REACP_MODULE_H__ #include "NwRecapImportExport.h" #include "RxModule.h" #include "Ge/GePoint3dArray.h" #include "CmEntityColorArray.h" #include "SharedPtr.h" #define STL_USING_FUNCTIONAL #define STL_USING_MAP #include "OdaSTL.h" #define RECAP_IMPORT_MODULE_NAME L"NwRecapImport" class OdRxRcsFileServices; class OdPointCloudScanDatabase; class OdPointCloudProjectDatabase; class OdRcsDataManager; struct OdNwPointCloudData; /** \details This template class is a specialization of the OdSmartPtr class for OdRxRcsFileServices object pointers. */ typedef OdSmartPtr OdRxRcsFileServicesPtr; /** \details This template class is a specialization of the OdSmartPtr class for OdPointCloudScanDatabase object pointers. */ typedef OdSharedPtr OdPointCloudScanDatabasePtr; /** \details This template class is a specialization of the OdSmartPtr class for OdPointCloudProjectDatabase object pointers. */ typedef OdSharedPtr OdPointCloudProjectDatabasePtr; /** \details This template class is a specialization of the OdSmartPtr class for OdRcsDataManager object pointers. */ typedef OdSharedPtr OdRcsDataManagerPtr; /** \details This class implements retrieving Point Cloud data. */ class ODRX_ABSTRACT NWRECAPIMPORTEXPORT OdNwPointCloud : public OdRxObject { ODRX_DECLARE_MEMBERS(OdNwPointCloud); public: /** \details Setter of the map of streams. \param streamMap [in] const object of map of streams. \remarks Should to call before getPointCloud calling. The method is deprecated since release/25.9. Use method setFindReferenceCallback with 'lazy' map initialization instead. */ virtual void setStreamMap(const std::map& streamMap) = 0; /** \details Check if map of stream is empty \returns true if stream of map is empty false otherwise. \remarks The method is deprecated since release/25.9. Use method setFindReferenceCallback with 'lazy' map initialization instead. */ virtual bool isStreamMapEmpty() = 0; /** \details Setter of the find reference callback which is needed for lazy initialization of stream map. \param findPointCloudClbk [in] funtion with to inner parameters where first is inner key-path and in succesful case it will change inner path or init stream buf pointer with embedded file. */ virtual void setFindReferenceCallback(std::function findPointCloudClbk) = 0; /** \details Setter of rcs service. \param pRcsSrv [in] object OdSmartPtr class for OdRxRcsFileServices object pointer. \remarks Should to call before getPointCloud calling. The method is deprecated since release/25.9. */ virtual void setRcsService(OdRxRcsFileServicesPtr pRcsSrv) = 0; /** \details Returns the point cloud data from specified stream. \param refName [in] Name of stream. \param scanGuid [in] scan guid. \param voxIdx [in] voxel cube id. \param coords [out] OdArray with OdGePoint3d as coordinates of points values. \param colors [out] OdArray with OdCmEntityColor as color values. \returns eOk if the operation is successful, or an appropriate error code otherwise. */ virtual OdResult getPointCloud(const OdString& refName, const OdGUID& scanGuid, OdUInt64 voxIdx, OdGePoint3dArray& coords, OdCmEntityColorArray& colors) = 0; /** \details Returns the all assigned point cloud data from specified stream. \param refName [in] Name of stream. \param coords [out] OdArray with OdGePoint3d as coordinates of points values. \param colors [out] OdArray with OdCmEntityColor as color values. \returns eOk if the operation is successful, or an appropriate error code otherwise. \remarks Method reads all points from rcs file or from all rcs files indexed by rcp file project */ virtual OdResult getPointCloud(const OdString& refName, OdGePoint3dArray& coords, OdCmEntityColorArray& colors) = 0; /** \details Returns the point cloud data from the specified stream. \param refName [in] Name of stream. \param scanGuid [in] scan guid. It may be as default value. \param pScanDb [out] A reference to shared pointer to scan database (.rcs). \param pProjDb [out] A reference to shared pointer to host project database (.rcp). It may be NULL. \returns eOk if the operation is successful, or an appropriate error code otherwise. */ virtual OdResult getPointCloud(const OdString& refName, const OdGUID& scanGuid, OdPointCloudScanDatabasePtr& pScanDb, OdPointCloudProjectDatabasePtr& pProjDb) = 0; /** \details Returns the point cloud data from the specified stream. \param refName [in] Name of stream. \param scanGuid [in] scan guid. It may be as default value. \param pcData [out] structure contained three parametres using call Gs API with RCS. \returns eOk if the operation is successful, or an appropriate error code otherwise. */ virtual OdResult getPointCloud(const OdString& refName, const OdGUID& scanGuid, OdNwPointCloudData& pcData) = 0; /** \details Returns embedded stream buffer for the specified reference name. \param refName [in] Name of the reference. \param findReferenceCallback [in] Function callback for finding references. \param create [in] Flag indicating whether to create the stream if not found. \returns Smart pointer to the stream buffer if successful, or null pointer otherwise. */ virtual OdStreamBufPtr getEmbeddedStreamBuffer(const OdString& refName, const std::function& findReferenceCallback, bool create) = 0; /** \details Clean cache than filled during all time process interaction with it module. */ virtual void resetCache() = 0; }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwPointCloud object pointers. */ typedef OdSmartPtr OdNwPointCloudPtr; /** \details This class implements the Point Cloud import module. */ class ODRX_ABSTRACT NWRECAPIMPORTEXPORT OdNwRecapModule : public OdRxModule { public: /** \details Initializes export module. */ void initApp() = 0; /** \details Uninitializes export module. */ void uninitApp() = 0; /** \details Create new OdNwPointCloud object. \returns SmartPtr to OdNwPintCloudObject. \remarks Method will return nullptr if service RcsFileServices is not available. */ virtual OdNwPointCloudPtr getNwPointCloud() = 0; }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwRecapModule object pointers. */ typedef OdSmartPtr OdNwRecapModulePtr; #endif //__EX_NW_REACP_MODULE_H__