changed Set functions, added possibility to pass the bbox as parameter
This commit is contained in:
parent
ab2aa78c54
commit
418bf58a24
|
@ -24,6 +24,12 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.10 2005/09/30 13:14:59 pietroni
|
||||||
|
added wrapping to functions defined in GridClosest:
|
||||||
|
- GetClosest
|
||||||
|
- GetKClosest
|
||||||
|
- DoRay
|
||||||
|
|
||||||
Revision 1.9 2005/09/21 14:22:49 pietroni
|
Revision 1.9 2005/09/21 14:22:49 pietroni
|
||||||
Added DynamicSpatialHAshTable class
|
Added DynamicSpatialHAshTable class
|
||||||
|
|
||||||
|
@ -331,29 +337,15 @@ namespace vcg{
|
||||||
return bb;
|
return bb;
|
||||||
}
|
}
|
||||||
|
|
||||||
///// Insert a mesh in the grid.SetBBox() function must be called before
|
|
||||||
///// Hash space is cardinality of hash key set
|
|
||||||
//void Set( ContainerType & s)
|
|
||||||
//{
|
|
||||||
// Set(s,s.size());
|
|
||||||
//}
|
|
||||||
|
|
||||||
///// Insert a mesh in the grid.SetBBox() function must be called before
|
|
||||||
//void Set( ContainerType & s,int _size )
|
|
||||||
//{
|
|
||||||
// Point3i _siz;
|
|
||||||
// BestDim( _size, dim, _siz );
|
|
||||||
// Set(s,_siz);
|
|
||||||
//}
|
|
||||||
|
|
||||||
/// Insert a mesh in the grid.SetBBox() function must be called before
|
/// Insert a mesh in the grid.SetBBox() function must be called before
|
||||||
template <class OBJITER>
|
template <class OBJITER>
|
||||||
void Set(const OBJITER & _oBegin, const OBJITER & _oEnd)
|
void Set(const OBJITER & _oBegin, const OBJITER & _oEnd,const Box3x &_bbox=Box3x() )
|
||||||
{
|
{
|
||||||
OBJITER i;
|
OBJITER i;
|
||||||
bbox.min=Point3<FLT>(0,0,0);
|
|
||||||
bbox.max=Point3<FLT>(0,0,0);
|
|
||||||
Box3<FLT> b;
|
Box3<FLT> b;
|
||||||
|
if(!_bbox.IsNull()) bbox=_bbox;
|
||||||
|
else
|
||||||
for(i = _oBegin; i!= _oEnd; ++i)
|
for(i = _oBegin; i!= _oEnd; ++i)
|
||||||
{
|
{
|
||||||
(*i).GetBBox(b);
|
(*i).GetBBox(b);
|
||||||
|
|
Loading…
Reference in New Issue