42cf5bc1 |
1 | // Created on: 1995-03-09 |
2 | // Created by: Laurent PAINNOT |
3 | // Copyright (c) 1995-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _BRep_GCurve_HeaderFile |
18 | #define _BRep_GCurve_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Standard_Real.hxx> |
24 | #include <BRep_CurveRepresentation.hxx> |
25 | class TopLoc_Location; |
26 | class gp_Pnt; |
27 | |
28 | |
29 | class BRep_GCurve; |
30 | DEFINE_STANDARD_HANDLE(BRep_GCurve, BRep_CurveRepresentation) |
31 | |
32 | //! Root class for the geometric curves |
33 | //! representation. Contains a range. |
34 | //! Contains a first and a last parameter. |
35 | class BRep_GCurve : public BRep_CurveRepresentation |
36 | { |
37 | |
38 | public: |
39 | |
40 | |
41 | void SetRange (const Standard_Real First, const Standard_Real Last); |
42 | |
43 | void Range (Standard_Real& First, Standard_Real& Last) const; |
44 | |
45 | Standard_Real First() const; |
46 | |
47 | Standard_Real Last() const; |
48 | |
49 | void First (const Standard_Real F); |
50 | |
51 | void Last (const Standard_Real L); |
52 | |
53 | //! Computes the point at parameter U. |
54 | Standard_EXPORT virtual void D0 (const Standard_Real U, gp_Pnt& P) const = 0; |
55 | |
56 | //! Recomputes any derived data after a modification. |
57 | //! This is called when the range is modified. |
58 | Standard_EXPORT virtual void Update(); |
59 | |
60 | |
61 | |
62 | |
92efcf78 |
63 | DEFINE_STANDARD_RTTIEXT(BRep_GCurve,BRep_CurveRepresentation) |
42cf5bc1 |
64 | |
65 | protected: |
66 | |
67 | |
68 | Standard_EXPORT BRep_GCurve(const TopLoc_Location& L, const Standard_Real First, const Standard_Real Last); |
69 | |
70 | |
71 | |
72 | private: |
73 | |
74 | |
75 | Standard_Real myFirst; |
76 | Standard_Real myLast; |
77 | |
78 | |
79 | }; |
80 | |
81 | |
82 | #include <BRep_GCurve.lxx> |
83 | |
84 | |
85 | |
86 | |
87 | |
88 | #endif // _BRep_GCurve_HeaderFile |