1 // Created on: 1991-04-24
2 // Created by: Arnaud BOUZY
3 // Copyright (c) 1991-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
18 #include <Draw_Display.hxx>
19 #include <Draw_Drawable3D.hxx>
20 #include <Standard_Type.hxx>
22 IMPLEMENT_STANDARD_RTTIEXT(Draw_Drawable3D,MMgt_TShared)
24 //=======================================================================
25 //function : Draw_Drawable3D
27 //=======================================================================
28 Draw_Drawable3D::Draw_Drawable3D() :
29 isVisible(Standard_False),
30 isProtected(Standard_False),
35 //=======================================================================
36 //function : PickReject
38 //=======================================================================
40 Standard_Boolean Draw_Drawable3D::PickReject(const Standard_Real X,
41 const Standard_Real Y,
42 const Standard_Real Prec) const
44 return ((X+Prec < myXmin) || (X-Prec > myXmax) ||
45 (Y+Prec < myYmin) || (Y-Prec > myYmax));
49 //=======================================================================
52 //=======================================================================
54 Handle(Draw_Drawable3D) Draw_Drawable3D::Copy() const
60 //=======================================================================
63 //=======================================================================
65 void Draw_Drawable3D::Dump(Standard_OStream& S) const
67 S << myXmin << " " << myXmax << "\n";
68 S << myYmin << " " << myYmax << "\n";
72 //=======================================================================
75 //=======================================================================
77 void Draw_Drawable3D::Whatis(Draw_Interpretor& S) const
82 //=======================================================================
85 //=======================================================================
87 Standard_Boolean Draw_Drawable3D::Is3D() const
92 //=======================================================================
93 //function : SetBounds
95 //=======================================================================
97 void Draw_Drawable3D::SetBounds(const Standard_Real xmin,
98 const Standard_Real xmax,
99 const Standard_Real ymin,
100 const Standard_Real ymax)
109 //=======================================================================
112 //=======================================================================
114 void Draw_Drawable3D::Bounds(Standard_Real& xmin,
117 Standard_Real& ymax) const