/////////////////////////////////////////////////////////////////////////////// // 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_GRIDLINE_H__ #define __TNW_GRIDLINE_H__ #include "NwObject.h" #include "NwGridTypes.h" class OdNwGridLineSegment; class OdGePoint2d; class OdGeInterval; /** \details This template class is a specialization of the OdArray class for OdGePoint2d objects. */ typedef OdArray > OdGePoint2dArray; /** \details This template class is a specialization of the OdSmartPtr class for OdNwGridLineSegment object pointers. */ typedef OdSmartPtr OdNwGridLineSegmentPtr; /** \details This class represents a grid line. */ class NWDBEXPORT OdNwGridLine : public OdNwObject { //DOM-IGNORE-BEGIN ODRX_DECLARE_MEMBERS(OdNwGridLine); //DOM-IGNORE-END public: /** \details Default constructor. */ OdNwGridLine(); public: /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwGridLine(); /** \details Gets an array of the grid line segments contained in the grid line. \param gridLineSegmentList [out] OdArray with OdNwGridLineSegment smart pointers as values. \returns eOk if the sceneRefs are retrieved successfully, or an appropriate error code otherwise. */ OdResult getGridLineSegmentList(OdArray & gridLineSegmentList) const; /** \details Adds a Grid Line Segment object. \param type [in] Type of the grid line segement (type of NwGridLineSegmentType::Enum). \param points [in] Points of the grid line segement primitive. \param pRes [out] Pointer to the OdResult object with the error code. \returns Smart pointer to created OdNwGridLineSegment object. \remarks Creates an OdNwGridLineSegment object and add it to array of OdNwGridLineSegmentPtr objects in current object. */ OdNwGridLineSegmentPtr addLineSegment(NwGridLineSegmentType::Enum type, OdGePoint2dArray points, OdResult *pRes = nullptr); /** \details Returns the display name of the grid line. \returns Grid line display name. */ const OdString getName() const; /** \details Returns the point of the grid line. \returns Grid line point. \remarks The method is deprecated. For getting Grid Line interval use the getInterval() method. */ const OdGePoint2d getPoint() const; /** \details Returns the interval of the grid line. \returns Interval grid line. */ OdGeInterval getInterval() const; }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwGridLine object pointers. */ typedef OdSmartPtr OdNwGridLinePtr; #endif