/////////////////////////////////////////////////////////////////////////////// // 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_GRIDSYSTEM_H__ #define __TNW_GRIDSYSTEM_H__ #include "NwObject.h" class OdNwGridLine; class OdNwGridLevel; class OdGeMatrix3d; class OdGePoint3d; class OdGeVector3d; class OdGePoint2d; /** \details This template class is a specialization of the OdSmartPtr class for OdNwGridLine object pointers. */ typedef OdSmartPtr OdNwGridLinePtr; /** \details This template class is a specialization of the OdSmartPtr class for OdNwGridLevel object pointers. */ typedef OdSmartPtr OdNwGridLevelPtr; /** \details This class represents a system of grid lines and levels. */ class NWDBEXPORT OdNwGridSystem : public OdNwObject { //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdNwGridSystem); //DOM-IGNORE-END public: /** \details Default constructor. */ OdNwGridSystem(); public: /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwGridSystem(); /** \details Gets the origin of the geometry data. \returns OdGePoint3d object with the origin of the geometry data. */ OdGePoint3d getOrigin() const; /** \details Gets the direction to the top orthogonal view of a model. \returns Instance of the OdGeVector3d as the direction to the top orthogonal view of a model. */ OdGeVector3d getUpVector() const; /** \details Gets the transformation matrix for grid system. \returns Instance of the OdGeMatrix3d object. */ OdGeMatrix3d getTransform() const; /** \details Receives the display name of the grid system element item. \returns Display name of the grid system. */ OdString getName() const; /** \details Gets an array of the grid lines contained in the grid system element item. \param gridLineList [out] OdArray with OdNwGridLine smart pointers as values. \returns The eOk value if the sceneRefs are retrieved successfully, or an appropriate error code otherwise. */ OdResult getGridLineList(OdArray & gridLineList) const; /** \details Gets an array of the grid levels contained in the grid system element item. \param gridLevelList [out] OdArray with OdNwGridLevel smart pointers as values. \returns The eOk value if the sceneRefs are retrieved successfully, or an appropriate error code otherwise. */ OdResult getGridLevelList(OdArray & gridLevelList) const; /** \details Gets a Grid lock level. \returns Index current locked grid. \remarks Index is position in OdArray array that should get from ::getGridLevelList method. */ OdInt32 getGridLockLevel() const; /** \details Adds a Grid Line object. \param name [in] Name of Grid Line. \param pRes [out] Pointer to the OdResult object with the error code. \returns Smart pointer to created OdNwGridLine object. \remarks Creates an OdNwGridLine object and add it to array of OdNwGridLinePtr objects in current object. */ OdNwGridLinePtr addGridLine(OdString name, OdResult *pRes = nullptr); /** \details Adds a Grid Line object. \param name [in] Name of Grid Level. \param level [in] Elevation of Grid Level. \param pRes [out] Pointer to the OdResult object with the error code. \returns Smart pointer to created OdNwGridLine object. \remarks Creates an OdNwGridLevel object and add it to array of OdNwGridLevelPtr objects in current object. */ OdNwGridLevelPtr addGridLevel(OdString name, double level, OdResult *pRes = nullptr); }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwGridSystem object pointers. */ typedef OdSmartPtr OdNwGridSystemPtr; #endif /* NwGridSystem_h */