0028449: Data Exchange - Wrong orientation of Annotation Plane in GD&T
[occt.git] / src / TestTopOpeDraw / TestTopOpeDraw_DrawableP3D.cxx
CommitLineData
b311480e 1// Created on: 1994-11-17
2// Created by: Jean Yves LEBEY
3// Copyright (c) 1994-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
42cf5bc1 17
18#include <Draw_Color.hxx>
19#include <Draw_Display.hxx>
20#include <Draw_Text3D.hxx>
21#include <gp_Pnt.hxx>
22#include <Standard_Type.hxx>
23#include <TestTopOpeDraw_DrawableP3D.hxx>
7fd59977 24
92efcf78 25IMPLEMENT_STANDARD_RTTIEXT(TestTopOpeDraw_DrawableP3D,Draw_Marker3D)
26
7fd59977 27//=======================================================================
28//function : TestTopOpeDraw_DrawableP3D
29//purpose :
30//=======================================================================
7fd59977 31TestTopOpeDraw_DrawableP3D::TestTopOpeDraw_DrawableP3D
32(const gp_Pnt& P,
33 const Draw_Color& PColor,
34 const Standard_Real MoveX,
35 const Standard_Real MoveY) :
36 Draw_Marker3D(P,Draw_Square,PColor,2), // Size
37 myPnt(P),
38 myText(" "),
39 myTextColor(PColor),
40 myMoveX(MoveX),
41 myMoveY(MoveY)
42{
43 myText3D = new Draw_Text3D(myPnt,myText,myTextColor, myMoveX, myMoveY);
44}
45
46//=======================================================================
47//function : TestTopOpeDraw_DrawableP3D
48//purpose :
49//=======================================================================
50
51TestTopOpeDraw_DrawableP3D::TestTopOpeDraw_DrawableP3D
52(const gp_Pnt& P, const Draw_Color& PColor,
53 const Standard_CString Text, const Draw_Color& TextColor,
54 const Standard_Real MoveX,
55 const Standard_Real MoveY) :
56 Draw_Marker3D(P,Draw_Square,PColor,2), // Size
57 myPnt(P),
58 myText(Text),
59 myTextColor(TextColor),
60 myMoveX(MoveX),
61 myMoveY(MoveY)
62{
63 myText3D = new Draw_Text3D(myPnt,myText,myTextColor, myMoveX, myMoveY);
64}
65
66//=======================================================================
67//function : TestTopOpeDraw_DrawableP3D
68//purpose :
69//=======================================================================
70
71TestTopOpeDraw_DrawableP3D::TestTopOpeDraw_DrawableP3D
72(const gp_Pnt& P, const Draw_MarkerShape T, const Draw_Color& PColor,
73 const Standard_CString Text, const Draw_Color& TextColor,
74 const Standard_Integer Size,
75 const Standard_Real MoveX,
76 const Standard_Real MoveY) :
77 Draw_Marker3D(P,T,PColor,Size),
78 myPnt(P),
79 myText(Text),
80 myTextColor(TextColor),
81 myMoveX(MoveX),
82 myMoveY(MoveY)
83{
84 myText3D = new Draw_Text3D(myPnt,myText,myTextColor, myMoveX, myMoveY);
85}
86
87//=======================================================================
88//function : TestTopOpeDraw_DrawableP3D
89//purpose :
90//=======================================================================
91
92TestTopOpeDraw_DrawableP3D::TestTopOpeDraw_DrawableP3D
93(const gp_Pnt& P, const Draw_MarkerShape T,
94 const Draw_Color& PColor, const Standard_CString Text,
95 const Draw_Color& TextColor, const Standard_Real Tol,
96 const Standard_Real MoveX, const Standard_Real MoveY) :
97 Draw_Marker3D(P, T, PColor, Tol),
98 myPnt(P),
99 myText(Text),
100 myTextColor(TextColor),
101 myMoveX(MoveX),
102 myMoveY(MoveY)
103{
104 myText3D = new Draw_Text3D(myPnt,myText,myTextColor, myMoveX, myMoveY);
105}
106
107//=======================================================================
108//function : ChangePnt
109//purpose :
110//=======================================================================
111
112void TestTopOpeDraw_DrawableP3D::ChangePnt(const gp_Pnt& P)
113{
114 myPnt = P;
115 myText3D = new Draw_Text3D(myPnt, myText, myTextColor, myMoveX, myMoveY);
116 ChangePos() = P;
117
118}
119
120//=======================================================================
121//function : DrawOn
122//purpose :
123//=======================================================================
124
125void TestTopOpeDraw_DrawableP3D::DrawOn(Draw_Display& dis) const
126{
127 Draw_Marker3D::DrawOn(dis);
128 myText3D->DrawOn(dis);
129}