Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:15

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 
0029   DEFINE_INC_ALLOC
0030 
0031   //! Constructor.
0032   Standard_EXPORT BRepMeshData_Curve (const Handle (NCollection_IncAllocator)& theAllocator);
0033 
0034   //! Destructor.
0035   Standard_EXPORT virtual ~BRepMeshData_Curve ();
0036 
0037   //! Inserts new discretization point at the given position.
0038   Standard_EXPORT virtual void InsertPoint(
0039     const Standard_Integer thePosition,
0040     const gp_Pnt&          thePoint,
0041     const Standard_Real    theParamOnPCurve) Standard_OVERRIDE;
0042 
0043   //! Adds new discretization point to pcurve.
0044   Standard_EXPORT virtual void AddPoint (
0045     const gp_Pnt&       thePoint,
0046     const Standard_Real theParamOnCurve) Standard_OVERRIDE;
0047 
0048   //! Returns discretization point with the given index.
0049   Standard_EXPORT virtual gp_Pnt& GetPoint (const Standard_Integer theIndex) Standard_OVERRIDE;
0050 
0051   //! Removes point with the given index.
0052   Standard_EXPORT virtual void RemovePoint (const Standard_Integer theIndex) Standard_OVERRIDE;
0053 
0054   //! Returns parameter with the given index.
0055   Standard_EXPORT virtual Standard_Real& GetParameter (const Standard_Integer theIndex) Standard_OVERRIDE;
0056 
0057   //! Returns number of parameters stored in curve.
0058   Standard_EXPORT virtual Standard_Integer ParametersNb() const Standard_OVERRIDE;
0059 
0060   //! Clears parameters list.
0061   Standard_EXPORT virtual void Clear(const Standard_Boolean isKeepEndPoints) Standard_OVERRIDE;
0062 
0063   DEFINE_STANDARD_RTTIEXT(BRepMeshData_Curve, IMeshData_Curve)
0064 
0065 protected:
0066 
0067   //! Removes parameter with the given index.
0068   Standard_EXPORT virtual void removeParameter (const Standard_Integer theIndex) Standard_OVERRIDE;
0069 
0070 private:
0071 
0072   IMeshData::Model::SequenceOfPnt  myPoints;
0073   IMeshData::Model::SequenceOfReal myParameters;
0074 };
0075 
0076 #endif