/////////////////////////////////////////////////////////////////////////////// // 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 _PRCSURFACE_INCLUDED_ #define _PRCSURFACE_INCLUDED_ #include "PrcUVParameterization.h" #include "PrcContentSurface.h" #include "PrcTransformation3d.h" SMARTPTR(OdPrcSurface); class OdPrcSurfaceImpl; /** \details A base class of surfaces. */ class PRC_TOOLKIT OdPrcSurface : public OdRxObject { protected: OdPrcSurface(OdPrcSurfaceImpl *pImpl); public: ODPRCRX_DECLARE_BASE_NOTYPE(OdPrcSurface) /** \details Destroys the surface object. */ virtual ~OdPrcSurface(); /** \details Requests the current matrix of the 3D transformation. \returns An OdGeMatrix3d object that represents the 3D transformation. */ const OdGeMatrix3d & getGeMatrix3d() const; /** \details Sets a position for the surface in model space. \param trans [in] A pointer to the new surface position in model space to be set. \returns The eOk value if the new position is successfully set, or an appropriate error code in the other case. */ OdResult setTransformation(const OdPrcTransformation3d* trans); /** \details Requests the current surface position in model space. \returns A pointer to the OdPrcTransformation3d object that represents the current surface position in model space. */ const OdPrcTransformation3d *transformation() const; /** \details Requests the current surface geometry data. \param pGeSurface [out] A pointer to a surface object to store surface geometry data. \param tol [in] A topological context. \returns The eOk value if surface geometry data is successfully returned to the calling subroutine, or an appropriate error code in the other case. */ OdResult getOdGeSurface(OdGeSurface*& pGeSurface, const OdGeTol& tol = OdGeContext::gTol) const; /** \details Sets new surface data for the surface entity. \param geSurface [in] The surface entity that contains the surface data to be set. \param tol [in] A topological context. \returns The eOk value if surface data is successfully set, or an appropriate error code in the other case. */ OdResult setFromOdGeSurface(const OdGeSurface& geSurface, const OdGeTol& tol = OdGeContext::gTol); /** \details Creates new from an OdGeSurface entity. \param geSurface [in] A reference to the OdGeSurface object that contains data for the new object. \param pPrcSurface [in/out] A placeholder for the smart pointer to the created object. \param tol [in] A tolerance value. \returns The eOk value if surface data is successfully set, or an appropriate error code in the other case. */ static OdResult createFromOdGeSurface(const OdGeSurface& geSurface, OdPrcSurfacePtr& pPrcSurface, const OdGeTol& tol = OdGeContext::gTol); /** \details Requests the current uv-parametrization of the object. \returns An object that contains the uv-parametrization. */ const OdPrcUVParameterization& uVParameterization() const; /** \details Sets a new parametrization for the object. \param uvparameterization [in] A new uv-parametrization to be set. \returns The eOk value if a new uv-parameterization is successfully applied to the surface, or an appropriate error code in the other case. */ OdResult setUVParameterization(const OdPrcUVParameterization& uvparameterization); /** \details Requests the current from a , creates a new , and returns a smart pointer to the created surface. \param pStream [in] A pointer to a to read data from. \returns A smart pointer to the created object. */ static OdPrcSurfacePtr readPtr(OdPrcCompressedFiler *pStream); /** \details Writes surface data to a specified . \param pSurface [in] A pointer to a object that contains data to write to the stream. \param pStream [in] A pointer to a to write data to. */ static void writePtr(const OdPrcSurface *pSurface, OdPrcCompressedFiler *pStream); /** \details Reads surface array data from a specified , creates , and returns an array of smart pointers to the created surfaces. \param array [out] A reference to an to fill after reading data from the stream. \param pStream [in] A pointer to a to read data from. */ static void readArray(OdPrcSurfacePtrArray &array, OdPrcCompressedFiler *pStream); /** \details Writes an to a specified . \param array [in] An that contains surface data. \param pStream [in] A pointer to a to write data to. */ static void writeArray(const OdPrcSurfacePtrArray &array, OdPrcCompressedFiler *pStream); /** \details Reads surface data from a specified , creates a , and returns a smart pointer to the created surface. \param pStream [in] A pointer to a to read data from. \returns A smart pointer to the created object. */ static OdPrcSurfacePtr read(OdPrcCompressedFiler *pStream); /** \details Requests the current common data from a object. \returns An object that contains the common data of the surface. \remarks Common data is returned as a reference to an object; therefore, it can be used to set new data. */ OdPrcContentSurface &contentSurface(); /** \details Requests the current common data from a object. \returns An object that contains the common data of the surface. */ const OdPrcContentSurface &contentSurface() const; }; #endif // _PRCSURFACE_INCLUDED_