0027961: Visualization - remove unused and no more working OpenGl_AVIWriter
[occt.git] / src / IGESGeom / IGESGeom_SplineCurve.hxx
1 // Created on: 1993-01-09
2 // Created by: CKY / Contract Toubro-Larsen ( Kiran )
3 // Copyright (c) 1993-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 _IGESGeom_SplineCurve_HeaderFile
18 #define _IGESGeom_SplineCurve_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
23 #include <Standard_Integer.hxx>
24 #include <TColStd_HArray1OfReal.hxx>
25 #include <TColStd_HArray2OfReal.hxx>
26 #include <IGESData_IGESEntity.hxx>
27 #include <Standard_Real.hxx>
28 class Standard_DimensionMismatch;
29 class Standard_OutOfRange;
30
31
32 class IGESGeom_SplineCurve;
33 DEFINE_STANDARD_HANDLE(IGESGeom_SplineCurve, IGESData_IGESEntity)
34
35 //! Defines IGESSplineCurve, Type <112> Form <0>
36 //! in package IGESGeom
37 //! The parametric spline is a sequence of parametric
38 //! polynomial segments. The curve could be of the type
39 //! Linear, Quadratic, Cubic, Wilson-Fowler, Modified
40 //! Wilson-Fowler, B-Spline. The N polynomial segments
41 //! are delimited by the break points  T(1), T(2), T(3),
42 //! ..., T(N+1).
43 class IGESGeom_SplineCurve : public IGESData_IGESEntity
44 {
45
46 public:
47
48   
49   Standard_EXPORT IGESGeom_SplineCurve();
50   
51   //! This method is used to set the fields of the class
52   //! SplineCurve
53   //! - aType           : Spline Type
54   //! 1 = Linear
55   //! 2 = Quadratic
56   //! 3 = Cubic
57   //! 4 = Wilson-Fowler
58   //! 5 = Modified Wilson-Fowler
59   //! 6 = B Spline
60   //! - aDegree         : Degree of continuity w.r.t. arc length
61   //! - nbDimensions    : Number of dimensions
62   //! 2 = Planar
63   //! 3 = Non-planar
64   //! - allBreakPoints  : Array of break points
65   //! - allXPolynomials : X coordinate polynomials of segments
66   //! - allYPolynomials : Y coordinate polynomials of segments
67   //! - allZPolynomials : Z coordinate polynomials of segments
68   //! - allXValues      : Values of 1st, 2nd, 3rd derivatives of
69   //! X polynomials at the terminate point
70   //! and values of X at terminate point
71   //! - allYValues      : Values of 1st, 2nd, 3rd derivatives of
72   //! Y polynomials at the terminate point
73   //! and values of Y at terminate point
74   //! - allZvalues      : Values of 1st, 2nd, 3rd derivatives of
75   //! Z polynomials at the terminate point
76   //! and values of Z at terminate point
77   //! raises exception if allXPolynomials, allYPolynomials
78   //! & allZPolynomials are not of same size OR allXValues, allYValues
79   //! & allZValues are not of size 4
80   Standard_EXPORT void Init (const Standard_Integer aType, const Standard_Integer aDegree, const Standard_Integer nbDimensions, const Handle(TColStd_HArray1OfReal)& allBreakPoints, const Handle(TColStd_HArray2OfReal)& allXPolynomials, const Handle(TColStd_HArray2OfReal)& allYPolynomials, const Handle(TColStd_HArray2OfReal)& allZPolynomials, const Handle(TColStd_HArray1OfReal)& allXvalues, const Handle(TColStd_HArray1OfReal)& allYvalues, const Handle(TColStd_HArray1OfReal)& allZvalues);
81   
82   //! returns the type of Spline curve
83   Standard_EXPORT Standard_Integer SplineType() const;
84   
85   //! returns the degree of the curve
86   Standard_EXPORT Standard_Integer Degree() const;
87   
88   //! returns the number of dimensions
89   //! 2 = Planar
90   //! 3 = Non-planar
91   Standard_EXPORT Standard_Integer NbDimensions() const;
92   
93   //! returns the number of segments
94   Standard_EXPORT Standard_Integer NbSegments() const;
95   
96   //! returns breakpoint of piecewise polynomial
97   //! raises exception if Index <= 0 or Index > NbSegments() + 1
98   Standard_EXPORT Standard_Real BreakPoint (const Standard_Integer Index) const;
99   
100   //! returns X coordinate polynomial for segment referred to by Index
101   //! raises exception if Index <= 0 or Index > NbSegments()
102   Standard_EXPORT void XCoordPolynomial (const Standard_Integer Index, Standard_Real& AX, Standard_Real& BX, Standard_Real& CX, Standard_Real& DX) const;
103   
104   //! returns Y coordinate polynomial for segment referred to by Index
105   //! raises exception if Index <= 0 or Index > NbSegments()
106   Standard_EXPORT void YCoordPolynomial (const Standard_Integer Index, Standard_Real& AY, Standard_Real& BY, Standard_Real& CY, Standard_Real& DY) const;
107   
108   //! returns Z coordinate polynomial for segment referred to by Index
109   //! raises exception if Index <= 0 or Index > NbSegments()
110   Standard_EXPORT void ZCoordPolynomial (const Standard_Integer Index, Standard_Real& AZ, Standard_Real& BZ, Standard_Real& CZ, Standard_Real& DZ) const;
111   
112   //! returns the value of X polynomial, the values of 1st, 2nd and
113   //! 3rd derivatives of the X polynomial at the terminate point
114   Standard_EXPORT void XValues (Standard_Real& TPX0, Standard_Real& TPX1, Standard_Real& TPX2, Standard_Real& TPX3) const;
115   
116   //! returns the value of Y polynomial, the values of 1st, 2nd and
117   //! 3rd derivatives of the Y polynomial at the termminate point
118   Standard_EXPORT void YValues (Standard_Real& TPY0, Standard_Real& TPY1, Standard_Real& TPY2, Standard_Real& TPY3) const;
119   
120   //! returns the value of Z polynomial, the values of 1st, 2nd and
121   //! 3rd derivatives of the Z polynomial at the termminate point
122   Standard_EXPORT void ZValues (Standard_Real& TPZ0, Standard_Real& TPZ1, Standard_Real& TPZ2, Standard_Real& TPZ3) const;
123
124
125
126
127   DEFINE_STANDARD_RTTIEXT(IGESGeom_SplineCurve,IGESData_IGESEntity)
128
129 protected:
130
131
132
133
134 private:
135
136
137   Standard_Integer theType;
138   Standard_Integer theDegree;
139   Standard_Integer theNbDimensions;
140   Handle(TColStd_HArray1OfReal) theBreakPoints;
141   Handle(TColStd_HArray2OfReal) theXCoordsPolynomial;
142   Handle(TColStd_HArray2OfReal) theYCoordsPolynomial;
143   Handle(TColStd_HArray2OfReal) theZCoordsPolynomial;
144   Handle(TColStd_HArray1OfReal) theXvalues;
145   Handle(TColStd_HArray1OfReal) theYvalues;
146   Handle(TColStd_HArray1OfReal) theZvalues;
147
148
149 };
150
151
152
153
154
155
156
157 #endif // _IGESGeom_SplineCurve_HeaderFile