0022627: Change OCCT memory management defaults
[occt.git] / src / TestTopOpeDraw / TestTopOpeDraw_Displayer.hxx
CommitLineData
7fd59977 1// File: TestTopOpeDraw_Displayer.hxx
2// Created: Mon Sep 9 15:31:31 1996
3// Author: Jean Yves LEBEY
4// <jyl@bistrox.paris1.matra-dtv.fr>
5
6#ifndef _TestTopOpeDraw_Displayer_HeaderFile
7#define _TestTopOpeDraw_Displayer_HeaderFile
8
9#include <TCollection_AsciiString.hxx>
10#include <TopoDS_Shape.hxx>
11#include <TopoDS.hxx>
12#include <TopAbs_Orientation.hxx>
13#include <Draw_Color.hxx>
14#include <gp_Pnt.hxx>
15#include <Geom2d_Curve.hxx>
16#include <Geom_Curve.hxx>
17#include <Geom_Surface.hxx>
18#include <TopOpeBRepTool_define.hxx>
19
20class TestTopOpeDraw_Displayer {
21
22 public:
23
24 Standard_EXPORT TestTopOpeDraw_Displayer();
25 Standard_EXPORT TestTopOpeDraw_Displayer(const TCollection_AsciiString&,const TopoDS_Shape&);
26 Standard_EXPORT TestTopOpeDraw_Displayer(const TCollection_AsciiString&,const TCollection_AsciiString&,const TopoDS_Shape&);
27 Standard_EXPORT void DisplayShape(const TCollection_AsciiString&,const TopoDS_Shape&);
28 Standard_EXPORT void DisplayShape(const TCollection_AsciiString&,const TCollection_AsciiString&,const TopoDS_Shape&);
29 Standard_EXPORT void InitDisplayer();
30 void SetShape(const TCollection_AsciiString&,const TopoDS_Shape&);
31
32 TCollection_AsciiString& NameDBRep() { return myNameDBRep; }
33 TCollection_AsciiString& NameDisplay() { return myNameDisplay; }
34 void DisplayGeometry(const Standard_Boolean b) { myDisplayGeometry = b; }
35 Standard_Boolean DisplayGeometry(void) { return myDisplayGeometry; }
36 void DisplayNameWithGeometry(const Standard_Boolean b) { myDisplayNameWithGeometry = b; }
37 void DisplayNameWithOrientation(const Standard_Boolean b) { myDisplayNameWithOrientation = b; }
38 void NbIsos(const Standard_Integer n) { mySnbisos = n; }
39 void NbIsosDef(const Standard_Boolean b) { mySnbisosdef = b; }
40 void Discret(const Standard_Integer n) { mySdiscret = n; }
41 void DiscretDef(const Standard_Boolean b) { mySdiscretdef = b; }
42 void SetTol(const Standard_Real Tol) { myTol = Tol;}
43 void GetTol(Standard_Real Tol) { Tol = myTol;}
44 Standard_Boolean TolIs(void) {return myTolIs;}
45 void TolIs(Standard_Boolean TolIs) { myTolIs = TolIs;}
46 void SetPar(const Standard_Real Par) { myPar = Par; myParIs = Standard_True;}
47 void GetPar(Standard_Real Par) { Par = myPar;}
48 Standard_Boolean ParIs(void) {return myParIs;}
49 void SetColor(const Draw_Color Col) { myCol = Col; myColIs = Standard_True;}
50 void SetNameColor(const Draw_Color Col) { myNameColor = Col; myNameColorIs = Standard_True;}
51 void AllColors(const Draw_Color Col) { SetColor(Col); SetNameColor(Col); }
52
53 protected:
54 TCollection_AsciiString myNameDBRep;
55 TCollection_AsciiString myNameDisplay;
56 Standard_Boolean myDisplayGeometry;
57 Standard_Boolean myDisplayNameWithGeometry;
58 Standard_Boolean myDisplayNameWithOrientation;
59 Draw_Color myNameColor; Standard_Boolean myNameColorIs;
60 Draw_Color myCol; Standard_Boolean myColIs;
61
62 private:
63 // Shape
64 void DisplayShapePrivate();
65 TopoDS_Shape myShape;
66 Standard_Real mySsize;
67 Standard_Integer mySnbisos;
68 Standard_Boolean mySnbisosdef;
69 Standard_Integer mySdiscret;
70 Standard_Boolean mySdiscretdef;
71 Standard_Real myTol; Standard_Boolean myTolIs;
72 Standard_Real myPar; Standard_Boolean myParIs;
73};
74
75class TestTopOpeDraw_C3DDisplayer : public TestTopOpeDraw_Displayer {
76public:
77 TestTopOpeDraw_C3DDisplayer();
78 TestTopOpeDraw_C3DDisplayer(const Handle(Geom_Curve)& C);
79 void InitC3DDisplayer();
80 void DisplayC3D(const Handle(Geom_Curve)& C);
81private:
82 Standard_Integer myCDdiscret;
83 Standard_Real myCDdeflect;
84 Standard_Integer myCDdrawmod;
85 Standard_Boolean myCDdisplayorigin;
86};
87
88class TestTopOpeDraw_C2DDisplayer : public TestTopOpeDraw_Displayer {
89public:
90 TestTopOpeDraw_C2DDisplayer();
91 TestTopOpeDraw_C2DDisplayer(const Handle(Geom2d_Curve)& C);
92 void InitC2DDisplayer();
93 void DisplayC2D(const Handle(Geom2d_Curve)& C);
94 void DisplayC2D(const TCollection_AsciiString&,const TCollection_AsciiString&,const Handle(Geom2d_Curve)& C);
95private:
96 Standard_Integer myC2Ddiscret;
97 Standard_Boolean myC2Ddisplayorigin;
98 Standard_Boolean myC2Ddisplaycurvradius;
99 Standard_Real myC2Dradiusmax;
100 Standard_Real myC2Dradiusratio;
101};
102
103class TestTopOpeDraw_SurfaceDisplayer : public TestTopOpeDraw_Displayer {
104public:
105 TestTopOpeDraw_SurfaceDisplayer();
106 TestTopOpeDraw_SurfaceDisplayer(const Handle(Geom_Surface)& S);
107 void InitSurfaceDisplayer();
108 void DisplaySurface(const Handle(Geom_Surface)& S);
109private:
110 Draw_Color mySDBoundColor,mySDIsoColor,mySDNormalColor;
111 Standard_Integer mySDnu,mySDnv;
112 Standard_Integer mySDdiscret;
113 Standard_Real mySDdeflect;
114 Standard_Integer mySDdrawmod;
115 Standard_Boolean mySDdisplayorigin;
116};
117
118class TestTopOpeDraw_P3DDisplayer : public TestTopOpeDraw_Displayer {
119public:
120 TestTopOpeDraw_P3DDisplayer();
121 TestTopOpeDraw_P3DDisplayer(const TCollection_AsciiString&,const gp_Pnt& P);
122 TestTopOpeDraw_P3DDisplayer(const TCollection_AsciiString&,const Standard_Real x, const Standard_Real y, const Standard_Real z);
123 void DisplayP3D(const TCollection_AsciiString&,const Standard_Real x, const Standard_Real y, const Standard_Real z);
124 void DisplayP3D(const TCollection_AsciiString&,const gp_Pnt& P);
125};
126
127class TestTopOpeDraw_P2DDisplayer : public TestTopOpeDraw_Displayer {
128public:
129 TestTopOpeDraw_P2DDisplayer();
130 TestTopOpeDraw_P2DDisplayer(const TCollection_AsciiString&,const gp_Pnt2d& P);
131 TestTopOpeDraw_P2DDisplayer(const TCollection_AsciiString&,const Standard_Real x, const Standard_Real y);
132 void DisplayP2D(const TCollection_AsciiString&,const Standard_Real x, const Standard_Real y);
133 void DisplayP2D(const TCollection_AsciiString&,const gp_Pnt2d& P);
134};
135
136#endif