The structure VertexKernelBatch is accessed (as also its

members) in some places (e.g. bilinear/catmark/loopSubdivisionTables
and Factory) but was marked as protected and as a result,
makes compilation fail (environment OSX Lion, XCode 4.5.1).

I considered the idea of moving the struct to a new file, but it
sounds like overkill for a simple structure. As an alternative,
this patch fixes the compilation error by moving the struct
declaration/definition to the public part of class FarSubdivisionTables.

Signed-off-by: Adenilson Cavalcanti <cavalcantii@gmail.com>
This commit is contained in:
Adenilson Cavalcanti 2012-10-23 16:10:59 -02:00
parent 3467673a6b
commit e9590d283b

View File

@ -151,14 +151,7 @@ public:
/// subdivision scheme.
virtual int GetNumTables() const { return 5; }
protected:
template <class X, class Y> friend class FarMeshFactory;
FarSubdivisionTables<U>( FarMesh<U> * mesh, int maxlevel );
// Returns an integer based on the order in which the kernels are applied
static int getMaskRanking( unsigned char mask0, unsigned char mask1 );
/// Made public as required by bilinearSubdivisionTablesFactory
struct VertexKernelBatch {
int kernelF; // number of face vertices
int kernelE; // number of edge vertices
@ -197,6 +190,14 @@ protected:
}
};
protected:
template <class X, class Y> friend class FarMeshFactory;
FarSubdivisionTables<U>( FarMesh<U> * mesh, int maxlevel );
// Returns an integer based on the order in which the kernels are applied
static int getMaskRanking( unsigned char mask0, unsigned char mask1 );
// Returns the range of vertex indices of each of the 3 batches of VertexPoint
// compute Kernels (kernel application order is : B / A / A)
std::vector<VertexKernelBatch> & getKernelBatches() const { return _batches; }