From Colin McDonald, "There is a duplicate class definition in the obj & dxf plugins trunk,
causing static builds to fail."
This commit is contained in:
@@ -58,10 +58,10 @@ class ValueVisitor : public osg::ValueVisitor {
|
||||
*/
|
||||
|
||||
/** writes all primitives of a primitive-set out to a stream, decomposes quads to triangles, line-strips to lines etc */
|
||||
class PrimitiveIndexWriter : public osg::PrimitiveIndexFunctor {
|
||||
class DxfPrimitiveIndexWriter : public osg::PrimitiveIndexFunctor {
|
||||
|
||||
public:
|
||||
PrimitiveIndexWriter(std::ostream& fout,osg::Geometry* geo,const Layer &layer,AcadColor &acad,const osg::Matrix& m = osg::Matrix::identity()) :
|
||||
DxfPrimitiveIndexWriter(std::ostream& fout,osg::Geometry* geo,const Layer &layer,AcadColor &acad,const osg::Matrix& m = osg::Matrix::identity()) :
|
||||
osg::PrimitiveIndexFunctor(),
|
||||
_fout(fout),
|
||||
_geo(geo),
|
||||
@@ -312,7 +312,7 @@ class PrimitiveIndexWriter : public osg::PrimitiveIndexFunctor {
|
||||
|
||||
private:
|
||||
|
||||
PrimitiveIndexWriter& operator = (const PrimitiveIndexWriter&) { return *this; }
|
||||
DxfPrimitiveIndexWriter& operator = (const DxfPrimitiveIndexWriter&) { return *this; }
|
||||
|
||||
std::ostream& _fout;
|
||||
GLenum _modeCache;
|
||||
@@ -325,7 +325,7 @@ class PrimitiveIndexWriter : public osg::PrimitiveIndexFunctor {
|
||||
};
|
||||
|
||||
|
||||
void PrimitiveIndexWriter::drawArrays(GLenum mode,GLint first,GLsizei count)
|
||||
void DxfPrimitiveIndexWriter::drawArrays(GLenum mode,GLint first,GLsizei count)
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
@@ -501,7 +501,7 @@ void DXFWriterNodeVisitor::processGeometry(osg::Geometry* geo, osg::Matrix& m)
|
||||
for(unsigned int i = 0; i < geo->getNumPrimitiveSets(); ++i)
|
||||
{
|
||||
osg::PrimitiveSet* ps = geo->getPrimitiveSet(i);
|
||||
PrimitiveIndexWriter pif(_fout, geo,_layer,_acadColor,m);
|
||||
DxfPrimitiveIndexWriter pif(_fout, geo,_layer,_acadColor,m);
|
||||
ps->accept(pif);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -80,10 +80,10 @@ class ValueVisitor : public osg::ValueVisitor {
|
||||
};
|
||||
|
||||
/** writes all primitives of a primitive-set out to a stream, decomposes quads to triangles, line-strips to lines etc */
|
||||
class PrimitiveIndexWriter : public osg::PrimitiveIndexFunctor {
|
||||
class ObjPrimitiveIndexWriter : public osg::PrimitiveIndexFunctor {
|
||||
|
||||
public:
|
||||
PrimitiveIndexWriter(std::ostream& fout,osg::Geometry* geo, unsigned int normalIndex, unsigned int lastVertexIndex, unsigned int lastNormalIndex, unsigned int lastTexIndex) :
|
||||
ObjPrimitiveIndexWriter(std::ostream& fout,osg::Geometry* geo, unsigned int normalIndex, unsigned int lastVertexIndex, unsigned int lastNormalIndex, unsigned int lastTexIndex) :
|
||||
osg::PrimitiveIndexFunctor(),
|
||||
_fout(fout),
|
||||
_lastVertexIndex(lastVertexIndex),
|
||||
@@ -306,7 +306,7 @@ class PrimitiveIndexWriter : public osg::PrimitiveIndexFunctor {
|
||||
|
||||
private:
|
||||
|
||||
PrimitiveIndexWriter& operator = (const PrimitiveIndexWriter&) { return *this; }
|
||||
ObjPrimitiveIndexWriter& operator = (const ObjPrimitiveIndexWriter&) { return *this; }
|
||||
|
||||
std::ostream& _fout;
|
||||
GLenum _modeCache;
|
||||
@@ -318,7 +318,7 @@ class PrimitiveIndexWriter : public osg::PrimitiveIndexFunctor {
|
||||
};
|
||||
|
||||
|
||||
void PrimitiveIndexWriter::drawArrays(GLenum mode,GLint first,GLsizei count)
|
||||
void ObjPrimitiveIndexWriter::drawArrays(GLenum mode,GLint first,GLsizei count)
|
||||
{
|
||||
switch(mode)
|
||||
{
|
||||
@@ -534,7 +534,7 @@ void OBJWriterNodeVisitor::processGeometry(osg::Geometry* geo, osg::Matrix& m) {
|
||||
{
|
||||
osg::PrimitiveSet* ps = geo->getPrimitiveSet(i);
|
||||
|
||||
PrimitiveIndexWriter pif(_fout, geo, normalIndex, _lastVertexIndex, _lastNormalIndex, _lastTexIndex);
|
||||
ObjPrimitiveIndexWriter pif(_fout, geo, normalIndex, _lastVertexIndex, _lastNormalIndex, _lastTexIndex);
|
||||
ps->accept(pif);
|
||||
|
||||
if(geo->getNormalArray() && geo->getNormalBinding() == osg::Geometry::BIND_PER_PRIMITIVE_SET)
|
||||
|
||||
Reference in New Issue
Block a user