Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-02 08:33:07

0001 // Created on: 2016-04-07
0002 // Copyright (c) 2016 OPEN CASCADE SAS
0003 // Created by: Oleg AGASHIN
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _BRepMeshData_Curve_HeaderFile
0017 #define _BRepMeshData_Curve_HeaderFile
0018 
0019 #include <IMeshData_Curve.hxx>
0020 #include <Standard_Type.hxx>
0021 #include <NCollection_IncAllocator.hxx>
0022 #include <IMeshData_Types.hxx>
0023 
0024 //! Default implementation of curve data model entity.
0025 class BRepMeshData_Curve : public IMeshData_Curve
0026 {
0027 public:
0028   DEFINE_INC_ALLOC
0029 
0030   //! Constructor.
0031   Standard_EXPORT BRepMeshData_Curve(const Handle(NCollection_IncAllocator)& theAllocator);
0032 
0033   //! Destructor.
0034   Standard_EXPORT virtual ~BRepMeshData_Curve();
0035 
0036   //! Inserts new discretization point at the given position.
0037   Standard_EXPORT virtual void InsertPoint(const Standard_Integer thePosition,
0038                                            const gp_Pnt&          thePoint,
0039                                            const Standard_Real theParamOnPCurve) Standard_OVERRIDE;
0040 
0041   //! Adds new discretization point to pcurve.
0042   Standard_EXPORT virtual void AddPoint(const gp_Pnt&       thePoint,
0043                                         const Standard_Real theParamOnCurve) Standard_OVERRIDE;
0044 
0045   //! Returns discretization point with the given index.
0046   Standard_EXPORT virtual gp_Pnt& GetPoint(const Standard_Integer theIndex) Standard_OVERRIDE;
0047 
0048   //! Removes point with the given index.
0049   Standard_EXPORT virtual void RemovePoint(const Standard_Integer theIndex) Standard_OVERRIDE;
0050 
0051   //! Returns parameter with the given index.
0052   Standard_EXPORT virtual Standard_Real& GetParameter(const Standard_Integer theIndex)
0053     Standard_OVERRIDE;
0054 
0055   //! Returns number of parameters stored in curve.
0056   Standard_EXPORT virtual Standard_Integer ParametersNb() const Standard_OVERRIDE;
0057 
0058   //! Clears parameters list.
0059   Standard_EXPORT virtual void Clear(const Standard_Boolean isKeepEndPoints) Standard_OVERRIDE;
0060 
0061   DEFINE_STANDARD_RTTIEXT(BRepMeshData_Curve, IMeshData_Curve)
0062 
0063 protected:
0064   //! Removes parameter with the given index.
0065   Standard_EXPORT virtual void removeParameter(const Standard_Integer theIndex) Standard_OVERRIDE;
0066 
0067 private:
0068   IMeshData::Model::SequenceOfPnt  myPoints;
0069   IMeshData::Model::SequenceOfReal myParameters;
0070 };
0071 
0072 #endif