/////////////////////////////////////////////////////////////////////////////// // 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_FRAGMENT_H__ #define __TNW_FRAGMENT_H__ #include "NwObject.h" #include "NwExport.h" #include "Ge/GeMatrix3d.h" /** \details This class represents fragment geometry of a geometry component. */ class NWDBEXPORT OdNwFragment : public OdNwObject { //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdNwFragment); //DOM-IGNORE-END public: /** \details Default constructor. Creates a new OdNwFragment object. */ OdNwFragment(); public: /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwFragment(); public: /** \details Gets the low bound of geometry data. \returns OdGePoint3d object with the low bound of geometry data. */ OdGePoint3d getLowBound() const; /** \details Gets the high bound of geometry data. \returns OdGePoint3d object with the high bound of geometry data. */ OdGePoint3d getHighBound() const; /** \details Gets the transformation matrix of geometry data. \returns OdGeMatrix3d object with the transformation matrix of geometry data. */ OdGeMatrix3d getTransformation() const; /** \details Sets the transformation matrix for geometry data. \param trm [in] OdGeMatrix3d object with tranformation for geometry data. \returns The eOk value if the transformation is set successfully, or an appropriate error code otherwise. \remarks The method is deprecated. Use the method OdNwModelItem::addTransform(OdNwAttributePtr pTransform) for setting model's node transformation. */ OdResult setTransformation(const OdGeMatrix3d& trm); /** \details Receives an object ID of geometry. \returns Object ID of the base class OdNwGeometry object with geometry data. */ OdNwObjectId getGeometryId() const; /** \details Sets geometry for this fragment. \param geometryId [in] Object ID of the object with geometry. \remarks The method is deprecated. Use the OdNwModelItem::addReusedModelItem(const OdNwObjectId& nwModelItemId, OdResult* pResCode) method for setting reused geometry data. */ void setGeometry(const OdNwObjectId& geometryId); /** \details Receives an object ID of model item. \returns Object ID of the model item which own this fragment. */ OdNwObjectId getModelItem() const; /** \details Receives the object ID of the material of this component's fragment. \returns Object ID of the OdNwMaterial object with the material of this component's fragment. If the component does not have a material, the returned object ID is empty. \remarks Method will be thread safe in following cases: 1. A database was opened in multithread loading mode. In this case MT-loading mode must be set by OdNwHostAppServices::setMtMode () method before user starts database reading. 2. A database was visualized in multithread rendering mode. Note: MT-rendering mode must be set with "EnableMultithread" GsDevice property before the rendering starts. */ OdNwObjectId getMaterial() const; /** \details Indicates whether there is geometry is solid. \returns The true value if the fragment has solid geometry, or false otherwise. */ bool isSolid() const; }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwFragment object pointers. */ typedef OdSmartPtr OdNwFragmentPtr; #endif //__TNW_FRAGMENT_H__