summaryrefslogtreecommitdiff
path: root/src/Draw/Draw_Drawable3D.cxx
blob: 76815c2f9477bbd19a56c06653842a86efedff14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// Copyright: 	Matra-Datavision 1991
// File:	Draw_Drawable3D.cxx
// Created:	Wed Apr 24 15:44:04 1991
// Author:	Arnaud BOUZY
//		<adn>


#include <Draw_Drawable3D.ixx>

//=======================================================================
//function : Draw_Drawable3D
//purpose  : 
//=======================================================================

Draw_Drawable3D::Draw_Drawable3D() :
  isVisible(Standard_False),
  isProtected(Standard_False),
  myName(NULL)
{
}

//=======================================================================
//function : PickReject
//purpose  : 
//=======================================================================

Standard_Boolean Draw_Drawable3D::PickReject(const Standard_Real X,
					     const Standard_Real Y,
					     const Standard_Real Prec) const
{
  return ((X+Prec < myXmin) || (X-Prec > myXmax) ||
	  (Y+Prec < myYmin) || (Y-Prec > myYmax));
}
 

//=======================================================================
//function : Copy
//purpose  : 
//=======================================================================

Handle(Draw_Drawable3D)  Draw_Drawable3D::Copy() const
{
  return this;
}


//=======================================================================
//function : Dump
//purpose  : 
//=======================================================================

void  Draw_Drawable3D::Dump(Standard_OStream& S) const
{
  S << myXmin << " " << myXmax << "\n";
  S << myYmin << " " << myYmax << "\n";
}


//=======================================================================
//function : Whatis
//purpose  : 
//=======================================================================

void  Draw_Drawable3D::Whatis(Draw_Interpretor& S) const
{
  S << "drawable 3d";
}

//=======================================================================
//function : Is3D
//purpose  : 
//=======================================================================

Standard_Boolean Draw_Drawable3D::Is3D() const
{
  return Standard_True;
}

//=======================================================================
//function : SetBounds
//purpose  : 
//=======================================================================

void  Draw_Drawable3D::SetBounds(const Standard_Real xmin, 
				 const Standard_Real xmax, 
				 const Standard_Real ymin, 
				 const Standard_Real ymax)
{
  myXmin = xmin;
  myXmax = xmax;
  myYmin = ymin;
  myYmax = ymax;
}


//=======================================================================
//function : Bounds
//purpose  : 
//=======================================================================

void  Draw_Drawable3D::Bounds(Standard_Real& xmin, 
			      Standard_Real& xmax, 
			      Standard_Real& ymin, 
			      Standard_Real& ymax) const
{
  xmin = myXmin;
  xmax = myXmax;
  ymin = myYmin;
  ymax = myYmax;
}