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,Standard_Transient)
24 //=======================================================================
25 //function : Draw_Drawable3D
27 //=======================================================================
28 Draw_Drawable3D::Draw_Drawable3D() :
33 isVisible(Standard_False),
34 isProtected(Standard_False),
39 //=======================================================================
40 //function : PickReject
42 //=======================================================================
44 Standard_Boolean Draw_Drawable3D::PickReject(const Standard_Real X,
45 const Standard_Real Y,
46 const Standard_Real Prec) const
48 return ((X+Prec < myXmin) || (X-Prec > myXmax) ||
49 (Y+Prec < myYmin) || (Y-Prec > myYmax));
53 //=======================================================================
56 //=======================================================================
58 Handle(Draw_Drawable3D) Draw_Drawable3D::Copy() const
64 //=======================================================================
67 //=======================================================================
69 void Draw_Drawable3D::Dump(Standard_OStream& S) const
71 S << myXmin << " " << myXmax << "\n";
72 S << myYmin << " " << myYmax << "\n";
76 //=======================================================================
79 //=======================================================================
81 void Draw_Drawable3D::Whatis(Draw_Interpretor& S) const
86 //=======================================================================
89 //=======================================================================
91 Standard_Boolean Draw_Drawable3D::Is3D() const
96 //=======================================================================
97 //function : SetBounds
99 //=======================================================================
101 void Draw_Drawable3D::SetBounds(const Standard_Real xmin,
102 const Standard_Real xmax,
103 const Standard_Real ymin,
104 const Standard_Real ymax)
113 //=======================================================================
116 //=======================================================================
118 void Draw_Drawable3D::Bounds(Standard_Real& xmin,
121 Standard_Real& ymax) const