2 // Created: Fri Mar 10 14:43:04 1995
3 // Author: Remi LEQUETTE
7 #include <Draw_Box.ixx>
9 //=======================================================================
12 //=======================================================================
14 Draw_Box::Draw_Box(const gp_Pnt& p1, const gp_Pnt& p2, const Draw_Color& col) :
15 myFirst(p1), myLast(p2),myColor(col)
18 if (myLast.X() < myFirst.X()) {
20 myFirst.SetX(myLast.X());
23 if (myLast.Y() < myFirst.Y()) {
25 myFirst.SetY(myLast.Y());
28 if (myLast.Z() < myFirst.Z()) {
30 myFirst.SetZ(myLast.Z());
35 //=======================================================================
38 //=======================================================================
40 void Draw_Box::DrawOn(Draw_Display& dis) const
42 dis.SetColor(myColor);
84 //=======================================================================
87 //=======================================================================
89 const gp_Pnt& Draw_Box::First() const
94 //=======================================================================
97 //=======================================================================
99 void Draw_Box::First(const gp_Pnt& P)
104 //=======================================================================
107 //=======================================================================
109 const gp_Pnt& Draw_Box::Last() const
114 //=======================================================================
117 //=======================================================================
119 void Draw_Box::Last(const gp_Pnt& P)