summaryrefslogtreecommitdiff
path: root/inc/Bnd_Box.lxx
blob: 746153dd16056e93fa8a33f315351064a9f2b4f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// File:      Bnd_Box.lxx
// Created:   14.02.05 12:38:11
// Author:    Alexey MORENOV
// Copyright: Open CASCADE  2005

//=======================================================================
//function : SquareExtent
//purpose  : Computes the squared diagonal
//=======================================================================

inline Standard_Real Bnd_Box::SquareExtent() const 
{
  if ( IsVoid() ) return 0.;
  Standard_Real dx = Xmax-Xmin+Gap;
  Standard_Real dy = Ymax-Ymin+Gap;
  Standard_Real dz = Zmax-Zmin+Gap;
  return dx*dx + dy*dy + dz*dz;
}