0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / IntCurve / IntCurve_PConic.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-03-04
2// Created by: Laurent BUCHARD
3// Copyright (c) 1992-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 _IntCurve_PConic_HeaderFile
18#define _IntCurve_PConic_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <gp_Ax22d.hxx>
25#include <Standard_Real.hxx>
26#include <Standard_Integer.hxx>
27#include <GeomAbs_CurveType.hxx>
28class gp_Elips2d;
29class gp_Circ2d;
30class gp_Parab2d;
31class gp_Hypr2d;
32class gp_Lin2d;
33class gp_Ax22d;
34
35
36//! This class represents a conic from gp as a
37//! parametric curve ( in order to be used by the
38//! class PConicTool from IntCurve).
39class IntCurve_PConic
40{
41public:
42
43 DEFINE_STANDARD_ALLOC
44
45
46 Standard_EXPORT IntCurve_PConic(const IntCurve_PConic& PC);
47
48 Standard_EXPORT IntCurve_PConic(const gp_Elips2d& E);
49
50 Standard_EXPORT IntCurve_PConic(const gp_Circ2d& C);
51
52 Standard_EXPORT IntCurve_PConic(const gp_Parab2d& P);
53
54 Standard_EXPORT IntCurve_PConic(const gp_Hypr2d& H);
55
56 Standard_EXPORT IntCurve_PConic(const gp_Lin2d& L);
57
58 //! EpsX is a internal tolerance used in math
59 //! algorithms, usually about 1e-10
60 //! (See FunctionAllRoots for more details)
61 Standard_EXPORT void SetEpsX (const Standard_Real EpsDist);
62
63 //! Accuracy is the number of samples used to
64 //! approximate the parametric curve on its domain.
65 Standard_EXPORT void SetAccuracy (const Standard_Integer Nb);
66
67 Standard_Integer Accuracy() const;
68
69 Standard_Real EpsX() const;
70
71 //! The Conics are manipulated as objects which only
72 //! depend on three parameters : Axis and two Real from Standards.
73 //! Type Curve is used to select the correct Conic.
74 GeomAbs_CurveType TypeCurve() const;
75
76 const gp_Ax22d& Axis2() const;
77
78 Standard_Real Param1() const;
79
80 Standard_Real Param2() const;
81
82
83
84
85protected:
86
87
88
89
90
91private:
92
93
94
95 gp_Ax22d axe;
96 Standard_Real prm1;
97 Standard_Real prm2;
98 Standard_Real TheEpsX;
99 Standard_Integer TheAccuracy;
100 GeomAbs_CurveType type;
101
102
103};
104
105
106#include <IntCurve_PConic.lxx>
107
108
109
110
111
112#endif // _IntCurve_PConic_HeaderFile