Added a templated version of SetBBox
This commit is contained in:
parent
f82f32c6a7
commit
3259439f67
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.14 2005/08/02 11:18:36 pietroni
|
||||||
|
exetended form BasicGrid, changed type of t in class Link (from Iterator to Pointer to the object)
|
||||||
|
|
||||||
Revision 1.13 2005/04/14 17:23:08 ponchio
|
Revision 1.13 2005/04/14 17:23:08 ponchio
|
||||||
*** empty log message ***
|
*** empty log message ***
|
||||||
|
|
||||||
|
|
@ -251,9 +254,10 @@ namespace vcg {
|
||||||
|
|
||||||
/// Set the bounding box of the grid
|
/// Set the bounding box of the grid
|
||||||
///We need some extra space for numerical precision.
|
///We need some extra space for numerical precision.
|
||||||
void SetBBox( const Box3x & b )
|
template <class Box3Type>
|
||||||
|
void SetBBox( const Box3Type & b )
|
||||||
{
|
{
|
||||||
bbox = b;
|
bbox.Import( b );
|
||||||
ScalarType t = bbox.Diag()/100.0;
|
ScalarType t = bbox.Diag()/100.0;
|
||||||
if(t == 0) t = ScalarType(1e20); // <--- Some doubts on this (Cigno 5/1/04)
|
if(t == 0) t = ScalarType(1e20); // <--- Some doubts on this (Cigno 5/1/04)
|
||||||
bbox.Offset(t);
|
bbox.Offset(t);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue