Small change to the init of the simple volume class to include the correct initialization of the actual space occuped by the volume
This commit is contained in:
parent
181cef32fa
commit
211274ab04
|
@ -63,16 +63,6 @@ namespace vcg
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum Dimension {X, Y, Z};
|
enum Dimension {X, Y, Z};
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
|
||||||
typedef unsigned int size_t;
|
|
||||||
#else
|
|
||||||
#ifdef _WIN64
|
|
||||||
typedef unsigned __int64 size_t;
|
|
||||||
#else
|
|
||||||
typedef _W64 unsigned int size_t;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
typedef typename vcg::tri::Allocator< TRIMESH_TYPE > AllocatorType;
|
typedef typename vcg::tri::Allocator< TRIMESH_TYPE > AllocatorType;
|
||||||
typedef typename TRIMESH_TYPE::ScalarType ScalarType;
|
typedef typename TRIMESH_TYPE::ScalarType ScalarType;
|
||||||
typedef typename TRIMESH_TYPE::VertexType VertexType;
|
typedef typename TRIMESH_TYPE::VertexType VertexType;
|
||||||
|
|
|
@ -97,10 +97,12 @@ public:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Init(Point3i _sz)
|
void Init(Point3i _sz, Box3x bb)
|
||||||
{
|
{
|
||||||
siz=_sz;
|
siz=_sz;
|
||||||
|
this->bbox = bb;
|
||||||
Vol.resize(siz[0]*siz[1]*siz[2]);
|
Vol.resize(siz[0]*siz[1]*siz[2]);
|
||||||
|
this->ComputeDimAndVoxel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -207,7 +209,7 @@ private:
|
||||||
extractor.Finalize();
|
extractor.Finalize();
|
||||||
_volume = NULL;
|
_volume = NULL;
|
||||||
_mesh = NULL;
|
_mesh = NULL;
|
||||||
};
|
}
|
||||||
|
|
||||||
float V(int pi, int pj, int pk)
|
float V(int pi, int pj, int pk)
|
||||||
{
|
{
|
||||||
|
@ -354,6 +356,6 @@ protected:
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} // end namespace
|
} // end namespace tri
|
||||||
} // end namespace
|
} // end namespace vcg
|
||||||
#endif // __VCGTEST_WALKER
|
#endif // __VCGTEST_WALKER
|
||||||
|
|
Loading…
Reference in New Issue