/////////////////////////////////////////////////////////////////////////////// // 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 __TNW_GEOMETRY_EXTERNAL_PE_H__ #define __TNW_GEOMETRY_EXTERNAL_PE_H__ #include "RxObject.h" #include "NwExport.h" #define STL_USING_MAP #include "OdaSTL.h" #include "CmEntityColorArray.h" #include "Ge/GeGbl.h" class OdNwGeometryExternal; class OdRxRcsFileServices; class OdPointCloudScanDatabase; class OdPointCloudProjectDatabase; class OdRcsDataManager; /** \details This template class is a specialization of the OdSharedPtr class for OdRxRcsFileServices object pointers. */ typedef OdSmartPtr OdRxRcsFileServicesPtr; /** \details This template class is a specialization of the OdSharedPtr class for OdPointCloudScanDatabase object pointers. */ typedef OdSharedPtr OdPointCloudScanDatabasePtr; /** \details This template class is a specialization of the OdSharedPtr class for OdPointCloudProjectDatabase object pointers. */ typedef OdSharedPtr OdPointCloudProjectDatabasePtr; /** \details This template class is a specialization of the OdSharedPtr class for OdRcsDataManager object pointers. */ typedef OdSharedPtr OdRcsDataManagerPtr; /** \details * This struct serves as an unified data transfer object for point cloud operations, grouping the three essential database/manager components needed for RCS/RCP file processing. */ struct OdNwPointCloudData { //!< This is OdSharedPtr pointer for the point cloud scan database. OdPointCloudScanDatabasePtr pScanDb; //!< This is OdSharedPtr pointer for the point cloud project database. OdPointCloudProjectDatabasePtr pProjDb; //!< This is OdSharedPtr pointer class to calculate view-dependent LOD and to process visible voxels. OdRcsDataManagerPtr pRcsDataManager; /** \details Default constructor. Creates a new object of the OdNwPointCloudData class. */ OdNwPointCloudData() = default; }; /** \details This class represents external geometry protocol extension. */ class NWDBEXPORT OdNwAbstractExternalGeometryPE : public OdRxObject { //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdNwAbstractExternalGeometryPE); //DOM-IGNORE-END public: OdNwAbstractExternalGeometryPE() = default; virtual ~OdNwAbstractExternalGeometryPE() = default; /** \details Setter of the map of streams. \remarks Should to call before getPointCloud calling. \param streamMap [in] const object of map of streams. \returns eOk if setting was done and eNullObjectPointer code if something went wrong. \remarks The method is deprecated since release 25.9. Use the setFindReferenceCallback method with 'lazy' map initialization instead. */ virtual OdResult setStreamMap(const std::map& streamMap) = 0; /** \details Setter of rcs service. \remarks Should to call before getPointCloud calling. \param pRcsSrv [in] object OdSmartPtr class for OdRxRcsFileServices object pointer. \returns eOk if setting was done and eNullObjectPointer code if something went wrong. \remarks Should to call before getPointCloud calling. The method is deprecated since release 25.9. */ virtual OdResult 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. \remarks The method is deprecated since release 25.9. Use the getPointCloud(const OdNwGeometryExternal* pGeomExternal, OdGePoint3dArray& coords, OdCmEntityColorArray& colors) method instead. */ virtual OdResult getPointCloud(const OdString& refName, const OdGUID& scanGuid, OdUInt64 voxIdx, OdGePoint3dArray& coords, OdCmEntityColorArray& colors) = 0; /** \details Returns the point cloud data from the specified stream. \param pGeomExternal [in] External geometry object from which to get data. \param coords [out] Receives an OdArray with OdGePoint3d as coordinates of points values. \param colors [out] Receives an OdArray with OdCmEntityColor as color values. \returns eOk if the operation is successful, or an appropriate error code otherwise. */ virtual OdResult getPointCloud(const OdNwGeometryExternal* pGeomExternal, OdGePoint3dArray& coords, OdCmEntityColorArray& colors) = 0; /** \details Returns the point cloud data from the specified stream. \param pGeomExternal [in] External geometry object from which to get data. \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 OdNwGeometryExternal* pGeomExternal, OdPointCloudScanDatabasePtr& pScanDb, OdPointCloudProjectDatabasePtr& pProjDb) = 0; /** \details Returns the point cloud data from the specified stream. \param pGeomExternal [in] External geometry object from which to get data. \param pcData [out] A reference to shared pointer to class contained rcs data. \returns eOk if the operation is successful, or an appropriate error code otherwise. */ virtual OdResult getPointCloud(const OdNwGeometryExternal* pGeomExternal, OdNwPointCloudData& pcData) = 0; /** \details Check if map of stream is empty. \param result [out] set true if stream of map is empty false otherwise. \returns eOk if setting was done and eNullObjectPointer code if something went wrong. \remarks The method is deprecated since release 25.9. Use the setFindReferenceCallback method with 'lazy' map initialization instead. */ virtual OdResult isStreamMapEmpty(bool& result) = 0; /** \details Setter for the find reference callback that is needed for lazy initialization of stream map. \param findPointCloudClbk [in] Function with two inner parameters where the first one is inner key-path. In successful case it will change the inner path or initialize stream buffer pointer with embedded file. \returns eOk if the method executes successfully, and eNullObjectPointer code if something went wrong. \remarks The method is deprecated since release 26.10. Use OdNwAbstractDBExternalGeometryPE::setFindReferenceCallback instead */ virtual OdResult setFindReferenceCallback(std::function findReferenceCallback) = 0; }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwAbstractExternalGeometryPE object pointers. */ typedef OdSmartPtr OdNwAbstractExternalGeometryPEPtr; #endif //__TNW_GEOMETRY_EXTERNAL_PE_H__