PackInt function made public
In order to make the new Ponchio's nexus work properly
This commit is contained in:
parent
77b144b796
commit
e977c746bd
|
@ -240,26 +240,6 @@ static bool PackOccupancyMulti(const std::vector<Box2x > & rectVec, /// the se
|
|||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
||||
class ComparisonFunctor
|
||||
{
|
||||
public:
|
||||
const std::vector<vcg::Point2i> & v;
|
||||
inline ComparisonFunctor( const std::vector<vcg::Point2i> & nv ) : v(nv) { }
|
||||
|
||||
inline bool operator() ( int a, int b )
|
||||
{
|
||||
const Point2i &va=v[a];
|
||||
const Point2i &vb=v[b];
|
||||
|
||||
return (va[1]!=vb[1])?(va[1]>vb[1]):
|
||||
(va[0]>vb[0]);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* This is the low level function that packs a set of int rects onto a grid.
|
||||
|
||||
Based on the criptic code written by Claudio Rocchini
|
||||
|
@ -402,6 +382,26 @@ static bool PackInt(const std::vector<vcg::Point2i> & sizes, // the sizes of the
|
|||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
|
||||
class ComparisonFunctor
|
||||
{
|
||||
public:
|
||||
const std::vector<vcg::Point2i> & v;
|
||||
inline ComparisonFunctor( const std::vector<vcg::Point2i> & nv ) : v(nv) { }
|
||||
|
||||
inline bool operator() ( int a, int b )
|
||||
{
|
||||
const Point2i &va=v[a];
|
||||
const Point2i &vb=v[b];
|
||||
|
||||
return (va[1]!=vb[1])?(va[1]>vb[1]):
|
||||
(va[0]>vb[0]);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// Versione multitexture
|
||||
static bool PackIntMulti( const std::vector<Point2i> & sizes,
|
||||
const int ntexture,
|
||||
|
|
Loading…
Reference in New Issue