0026912: CLang 3.6.2 compiler warning [-Winconsistent-missing-override]
[occt.git] / src / Geom / Geom_Conic.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-03-10
2// Created by: JCV
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 _Geom_Conic_HeaderFile
18#define _Geom_Conic_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <gp_Ax2.hxx>
24#include <Geom_Curve.hxx>
25#include <Standard_Real.hxx>
26#include <GeomAbs_Shape.hxx>
27#include <Standard_Boolean.hxx>
28#include <Standard_Integer.hxx>
29class Standard_ConstructionError;
30class Standard_RangeError;
31class Standard_DomainError;
32class gp_Ax1;
33class gp_Pnt;
34class gp_Ax2;
35
36
37class Geom_Conic;
38DEFINE_STANDARD_HANDLE(Geom_Conic, Geom_Curve)
39
40//! The abstract class Conic describes the common
41//! behavior of conic curves in 3D space and, in
42//! particular, their general characteristics. The Geom
43//! package provides four concrete classes of conics:
44//! Geom_Circle, Geom_Ellipse, Geom_Hyperbola and Geom_Parabola.
45//! A conic is positioned in space with a right-handed
46//! coordinate system (gp_Ax2 object), where:
47//! - the origin is the center of the conic (or the apex in
48//! the case of a parabola),
49//! - the origin, "X Direction" and "Y Direction" define the
50//! plane of the conic.
51//! This coordinate system is the local coordinate
52//! system of the conic.
53//! The "main Direction" of this coordinate system is the
54//! vector normal to the plane of the conic. The axis, of
55//! which the origin and unit vector are respectively the
56//! origin and "main Direction" of the local coordinate
57//! system, is termed the "Axis" or "main Axis" of the conic.
58//! The "main Direction" of the local coordinate system
59//! gives an explicit orientation to the conic, determining
60//! the direction in which the parameter increases along
61//! the conic. The "X Axis" of the local coordinate system
62//! also defines the origin of the parameter of the conic.
63class Geom_Conic : public Geom_Curve
64{
65
66public:
67
68
69 //! Changes the orientation of the conic's plane. The normal
70 //! axis to the plane is A1. The XAxis and the YAxis are recomputed.
71 //!
72 //! raised if the A1 is parallel to the XAxis of the conic.
73 Standard_EXPORT void SetAxis (const gp_Ax1& A1);
74
75 //! changes the location point of the conic.
76 Standard_EXPORT void SetLocation (const gp_Pnt& P);
77
78 //! changes the local coordinate system of the conic.
79 Standard_EXPORT void SetPosition (const gp_Ax2& A2);
80
81 //! Returns the "main Axis" of this conic. This axis is
82 //! normal to the plane of the conic.
83 Standard_EXPORT gp_Ax1 Axis() const;
84
85
86 //! Returns the eccentricity value of the conic e.
87 //! e = 0 for a circle
88 //! 0 < e < 1 for an ellipse (e = 0 if MajorRadius = MinorRadius)
89 //! e > 1 for a hyperbola
90 //! e = 1 for a parabola
91 //! Exceptions
92 //! Standard_DomainError in the case of a hyperbola if
93 //! its major radius is null.
94 Standard_EXPORT virtual Standard_Real Eccentricity() const = 0;
95
96
97 //! Returns the location point of the conic.
98 //! For the circle, the ellipse and the hyperbola it is the center of
99 //! the conic. For the parabola it is the Apex of the parabola.
100 Standard_EXPORT gp_Pnt Location() const;
101
102
103 //! Returns the local coordinates system of the conic.
104 //! The main direction of the Axis2Placement is normal to the
105 //! plane of the conic. The X direction of the Axis2placement
106 //! is in the plane of the conic and corresponds to the origin
107 //! for the conic's parametric value u.
108 Standard_EXPORT const gp_Ax2& Position() const;
109
110
111 //! Returns the XAxis of the conic.
112 //! This axis defines the origin of parametrization of the conic.
113 //! This axis is perpendicular to the Axis of the conic.
114 //! This axis and the Yaxis define the plane of the conic.
115 Standard_EXPORT gp_Ax1 XAxis() const;
116
117
118 //! Returns the YAxis of the conic.
119 //! The YAxis is perpendicular to the Xaxis.
120 //! This axis and the Xaxis define the plane of the conic.
121 Standard_EXPORT gp_Ax1 YAxis() const;
122
123
124 //! Reverses the direction of parameterization of <me>.
125 //! The local coordinate system of the conic is modified.
79104795 126 Standard_EXPORT void Reverse() Standard_OVERRIDE;
42cf5bc1 127
128 //! Returns the parameter on the reversed curve for
129 //! the point of parameter U on <me>.
79104795 130 Standard_EXPORT virtual Standard_Real ReversedParameter (const Standard_Real U) const Standard_OVERRIDE = 0;
42cf5bc1 131
132 //! The continuity of the conic is Cn.
79104795 133 Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE;
42cf5bc1 134
135 //! Returns True.
136 //! Raised if N < 0.
79104795 137 Standard_EXPORT Standard_Boolean IsCN (const Standard_Integer N) const Standard_OVERRIDE;
42cf5bc1 138
139
140
141
142 DEFINE_STANDARD_RTTI(Geom_Conic,Geom_Curve)
143
144protected:
145
146
147 gp_Ax2 pos;
148
149
150private:
151
152
153
154
155};
156
157
158
159
160
161
162
163#endif // _Geom_Conic_HeaderFile