7fd59977 |
1 | // File: Bnd_Box.lxx |
2 | // Created: 14.02.05 12:38:11 |
3 | // Author: Alexey MORENOV |
4 | // Copyright: Open CASCADE 2005 |
5 | |
6 | //======================================================================= |
7 | //function : SquareExtent |
8 | //purpose : Computes the squared diagonal |
9 | //======================================================================= |
10 | |
11 | inline Standard_Real Bnd_Box::SquareExtent() const |
12 | { |
13 | if ( IsVoid() ) return 0.; |
14 | Standard_Real dx = Xmax-Xmin+Gap; |
15 | Standard_Real dy = Ymax-Ymin+Gap; |
16 | Standard_Real dz = Zmax-Zmin+Gap; |
17 | return dx*dx + dy*dy + dz*dz; |
18 | } |