Fixes to Windows build in liu of the move to using just std::streams.

This commit is contained in:
Robert Osfield
2001-12-14 23:18:28 +00:00
parent b1f478e5d2
commit 478274ae7d
67 changed files with 533 additions and 528 deletions

View File

@@ -117,12 +117,12 @@ bool FltFile::readFile(const std::string& fileName)
if (!fin.open(newFileName)) return NULL;
}
osg::notify(osg::INFO) << "Loading " << fileName << " ... " << endl;
osg::notify(osg::INFO) << "Loading " << fileName << " ... " << std::endl;
Record* pRec = fin.readCreateRecord(this);
if (pRec == NULL)
{
osg::notify(osg::WARN) << "File not found " << fileName << endl;
osg::notify(osg::WARN) << "File not found " << fileName << std::endl;
return false;
}
@@ -161,7 +161,7 @@ void FltFile::readExternals()
MaterialPool* pMaterialPool = NULL;
std::string filename(pSExternal->szPath);
osg::notify(osg::INFO) << "External=" << filename << endl;
osg::notify(osg::INFO) << "External=" << filename << std::endl;
if (rec.getFlightVersion() > 13)
{

View File

@@ -169,7 +169,7 @@ Record* Input::readCreateRecord(FltFile* pFltFile)
if (pProto == NULL)
{
// Should not be possible to end up here!
osg::notify(osg::INFO) << "UnknownRecord not in registry!" << endl;
osg::notify(osg::INFO) << "UnknownRecord not in registry!" << std::endl;
::free(pData);
return NULL;
}
@@ -178,7 +178,7 @@ Record* Input::readCreateRecord(FltFile* pFltFile)
Record* pRec = pProto->cloneRecord(pData);
if (pRec == NULL)
{
osg::notify(osg::INFO) << "Can't clone record!" << endl;
osg::notify(osg::INFO) << "Can't clone record!" << std::endl;
::free(pData);
return NULL;
}
@@ -189,7 +189,7 @@ Record* Input::readCreateRecord(FltFile* pFltFile)
osg::notify(osg::ALWAYS) << "class=" << pRec->className();
osg::notify(osg::ALWAYS) << " op=" << pRec->getOpcode();
osg::notify(osg::ALWAYS) << " name=" << pRec->getName();
osg::notify(osg::ALWAYS) << " offset=" << offset() << endl;
osg::notify(osg::ALWAYS) << " offset=" << offset() << std::endl;
#endif
if (isLittleEndianMachine()) // From Intel with love :-(

View File

@@ -702,7 +702,7 @@ class ReaderWriterATTR : public osgDB::ReaderWriter
StateSet* stateset = attr.createOsgStateSet();
notify(INFO) << "texture attribute read ok" << endl;
notify(INFO) << "texture attribute read ok" << std::endl;
return stateset;
}

View File

@@ -72,7 +72,7 @@ void Record::ascend(RecordVisitor& rv)
}
*/
ostream& operator << (ostream& output, const Record& rec)
std::ostream& operator << (std::ostream& output, const Record& rec)
{
output << rec.className()
<< " op=" << rec.getOpcode()
@@ -177,7 +177,7 @@ bool PrimNodeRecord::readLevel(Input& fr)
if (!pRec->isPrimaryNode())
{
osg::notify(osg::WARN) << "Non primary record found as child. op="
<< pRec->getOpcode() << endl;
<< pRec->getOpcode() << std::endl;
return false;
}

View File

@@ -34,7 +34,7 @@ void VertexPaletteRecord::endian()
}
ostream& operator << (ostream& output, const VertexPaletteRecord& rec)
std::ostream& operator << (std::ostream& output, const VertexPaletteRecord& rec)
{
output << rec.className();
return output; // to enable cascading
@@ -72,7 +72,7 @@ void VertexRecord::endian()
}
ostream& operator << (ostream& output, const VertexRecord& rec)
std::ostream& operator << (std::ostream& output, const VertexRecord& rec)
{
output << rec.className() << " "
<< rec.getData()->swFlags << " "
@@ -114,7 +114,7 @@ void NormalVertexRecord::endian()
}
ostream& operator << (ostream& output, const NormalVertexRecord& rec)
std::ostream& operator << (std::ostream& output, const NormalVertexRecord& rec)
{
output << rec.className() << " "
<< rec.getData()->swFlags << " "
@@ -156,7 +156,7 @@ void TextureVertexRecord::endian()
}
ostream& operator << (ostream& output, const TextureVertexRecord& rec)
std::ostream& operator << (std::ostream& output, const TextureVertexRecord& rec)
{
output << rec.className() << " "
<< rec.getData()->swFlags << " "
@@ -199,7 +199,7 @@ void NormalTextureVertexRecord::endian()
}
ostream& operator << (ostream& output, const NormalTextureVertexRecord& rec)
std::ostream& operator << (std::ostream& output, const NormalTextureVertexRecord& rec)
{
output << rec.className() << " "
<< rec.getData()->swFlags << " "

View File

@@ -85,7 +85,7 @@ class VertexRecord : public AncillaryRecord
virtual void accept(RecordVisitor& rv) { rv.apply(*this); }
// virtual void traverse(RecordVisitor& rv);
virtual SVertex* getData() const { return (SVertex*)_pData; }
friend ostream& operator << (ostream& output, const VertexRecord& rec);
friend std::ostream& operator << (std::ostream& output, const VertexRecord& rec);
protected:
virtual ~VertexRecord();
@@ -129,7 +129,7 @@ class NormalVertexRecord : public AncillaryRecord
virtual void accept(RecordVisitor& rv) { rv.apply(*this); }
// virtual void traverse(RecordVisitor& rv);
virtual SNormalVertex* getData() const { return (SNormalVertex*)_pData; }
friend ostream& operator << (ostream& output, const NormalVertexRecord& rec);
friend std::ostream& operator << (std::ostream& output, const NormalVertexRecord& rec);
protected:
virtual ~NormalVertexRecord();
@@ -172,7 +172,7 @@ class TextureVertexRecord : public AncillaryRecord
virtual void accept(RecordVisitor& rv) { rv.apply(*this); }
// virtual void traverse(RecordVisitor& rv);
virtual STextureVertex* getData() const { return (STextureVertex*)_pData; }
friend ostream& operator << (ostream& output, const TextureVertexRecord& rec);
friend std::ostream& operator << (std::ostream& output, const TextureVertexRecord& rec);
protected:
virtual ~TextureVertexRecord();
@@ -216,7 +216,7 @@ class NormalTextureVertexRecord : public AncillaryRecord
virtual void accept(RecordVisitor& rv) { rv.apply(*this); }
// virtual void traverse(RecordVisitor& rv);
virtual SNormalTextureVertex* getData() const { return (SNormalTextureVertex*)_pData; }
friend ostream& operator << (ostream& output, const NormalTextureVertexRecord& rec);
friend std::ostream& operator << (std::ostream& output, const NormalTextureVertexRecord& rec);
protected:
virtual ~NormalTextureVertexRecord();

View File

@@ -202,7 +202,7 @@ osg::Node* ConvertFromFLT::visitHeader(osg::Group* osgParent, HeaderRecord* rec)
// Version
_diOpenFlightVersion = pSHeader->diFormatRevLev;
osg::notify(osg::INFO) << "Version " << _diOpenFlightVersion << endl;
osg::notify(osg::INFO) << "Version " << _diOpenFlightVersion << std::endl;
// Unit scale
switch (pSHeader->swVertexCoordUnit)

View File

@@ -91,7 +91,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriter3DS::readNode(const std::string& fil
if (materialFaceMap.empty())
{
osg::notify(osg::NOTICE)<<"Warning : no triangles assigned to mesh '"<<mesh->name<<"'"<<endl;
osg::notify(osg::NOTICE)<<"Warning : no triangles assigned to mesh '"<<mesh->name<<"'"<< std::endl;
}
else
{
@@ -164,28 +164,28 @@ osg::Texture* ReaderWriter3DS::createTexture(Lib3dsTextureMap *texture,const ch
std::string fileName = osgDB::findFileInDirectory(texture->name,_directory,true);
if (fileName.empty())
{
osg::notify(osg::WARN) << "texture '"<<texture->name<<"' not found"<<endl;
osg::notify(osg::WARN) << "texture '"<<texture->name<<"' not found"<< std::endl;
return NULL;
}
if (label) osg::notify(osg::DEBUG_INFO) << label;
else osg::notify(osg::DEBUG_INFO) << "texture name";
osg::notify(osg::DEBUG_INFO) << " '"<<texture->name<<"'"<<endl;
osg::notify(osg::DEBUG_INFO) << " texture flag "<<texture->flags<<endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_DECALE "<<((texture->flags)&LIB3DS_DECALE)<<endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_MIRROR "<<((texture->flags)&LIB3DS_MIRROR)<<endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_NEGATE "<<((texture->flags)&LIB3DS_NEGATE)<<endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_NO_TILE "<<((texture->flags)&LIB3DS_NO_TILE)<<endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_SUMMED_AREA "<<((texture->flags)&LIB3DS_SUMMED_AREA)<<endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_ALPHA_SOURCE "<<((texture->flags)&LIB3DS_ALPHA_SOURCE)<<endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_TINT "<<((texture->flags)&LIB3DS_TINT)<<endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_IGNORE_ALPHA "<<((texture->flags)&LIB3DS_IGNORE_ALPHA)<<endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_RGB_TINT "<<((texture->flags)&LIB3DS_RGB_TINT)<<endl;
osg::notify(osg::DEBUG_INFO) << " '"<<texture->name<<"'"<< std::endl;
osg::notify(osg::DEBUG_INFO) << " texture flag "<<texture->flags<< std::endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_DECALE "<<((texture->flags)&LIB3DS_DECALE)<< std::endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_MIRROR "<<((texture->flags)&LIB3DS_MIRROR)<< std::endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_NEGATE "<<((texture->flags)&LIB3DS_NEGATE)<< std::endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_NO_TILE "<<((texture->flags)&LIB3DS_NO_TILE)<< std::endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_SUMMED_AREA "<<((texture->flags)&LIB3DS_SUMMED_AREA)<< std::endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_ALPHA_SOURCE "<<((texture->flags)&LIB3DS_ALPHA_SOURCE)<< std::endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_TINT "<<((texture->flags)&LIB3DS_TINT)<< std::endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_IGNORE_ALPHA "<<((texture->flags)&LIB3DS_IGNORE_ALPHA)<< std::endl;
osg::notify(osg::DEBUG_INFO) << " LIB3DS_RGB_TINT "<<((texture->flags)&LIB3DS_RGB_TINT)<< std::endl;
osg::Image* osg_image = osgDB::readImageFile(fileName.c_str());
if (osg_image==NULL)
{
osg::notify(osg::NOTICE) << "Warning: Cannot create texture "<<texture->name<<endl;
osg::notify(osg::NOTICE) << "Warning: Cannot create texture "<<texture->name<< std::endl;
return NULL;
}
@@ -335,7 +335,7 @@ osg::GeoSet* ReaderWriter3DS::createGeoSet(Lib3dsMesh *m,FaceList& faceList)
}
else
{
osg::notify(osg::WARN)<<"Warning: in 3ds loader m->texels ("<<m->texels<<") != m->points ("<<m->points<<")"<<endl;
osg::notify(osg::WARN)<<"Warning: in 3ds loader m->texels ("<<m->texels<<") != m->points ("<<m->points<<")"<< std::endl;
}
}

View File

@@ -60,9 +60,9 @@ osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode(const std::string& fil
if (!lw)
return ReadResult::FILE_NOT_HANDLED;
osg::notify(osg::INFO) << "faces " << lw->face_cnt << endl;
osg::notify(osg::INFO) << "materials " << lw->material_cnt << endl;
osg::notify(osg::INFO) << "vertices " << lw->vertex_cnt << endl;
osg::notify(osg::INFO) << "faces " << lw->face_cnt << std::endl;
osg::notify(osg::INFO) << "materials " << lw->material_cnt << std::endl;
osg::notify(osg::INFO) << "vertices " << lw->vertex_cnt << std::endl;
// shared coordinates
typedef std::map<int,osgUtil::Tesselator::IndexVec> MaterialTriangles;

View File

@@ -69,17 +69,17 @@ osgDB::ReaderWriter::ReadResult ReaderWriterOBJ::readNode(const std::string& fil
std::string directory = osgDB::getFilePath(fileName);
osg::notify(osg::INFO) << "vertices " << obj->numvertices << endl;
osg::notify(osg::INFO) << "normals " << obj->numnormals << endl;
osg::notify(osg::INFO) << "texcoords " << obj->numtexcoords << endl;
osg::notify(osg::INFO) << "face normals " << obj->numfacetnorms << endl;
osg::notify(osg::INFO) << "tris " << obj->numtriangles << endl;
osg::notify(osg::INFO) << "materials " << obj->nummaterials << endl;
osg::notify(osg::INFO) << "groups " << obj->numgroups << endl;
osg::notify(osg::INFO) << "vertices " << obj->numvertices << std::endl;
osg::notify(osg::INFO) << "normals " << obj->numnormals << std::endl;
osg::notify(osg::INFO) << "texcoords " << obj->numtexcoords << std::endl;
osg::notify(osg::INFO) << "face normals " << obj->numfacetnorms << std::endl;
osg::notify(osg::INFO) << "tris " << obj->numtriangles << std::endl;
osg::notify(osg::INFO) << "materials " << obj->nummaterials << std::endl;
osg::notify(osg::INFO) << "groups " << obj->numgroups << std::endl;
if (obj->numnormals==0)
{
osg::notify(osg::NOTICE) << "No normals in .obj file, automatically calculating normals..."<<endl;
osg::notify(osg::NOTICE) << "No normals in .obj file, automatically calculating normals..."<< std::endl;
glmFacetNormals(obj);
glmVertexNormals(obj,90.0f);
}
@@ -94,7 +94,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterOBJ::readNode(const std::string& fil
osg_mtl = new osg::StateSet*[obj->nummaterials];
for (i = 0; i < obj->nummaterials; i++) {
GLMmaterial* omtl = &(obj->materials[i]);
osg::notify(osg::DEBUG_INFO) << "mtl: " << omtl->name << endl;
osg::notify(osg::DEBUG_INFO) << "mtl: " << omtl->name << std::endl;
osg::StateSet* stateset = new osg::StateSet;
osg_mtl[i] = stateset;
@@ -139,12 +139,12 @@ osgDB::ReaderWriter::ReadResult ReaderWriterOBJ::readNode(const std::string& fil
}
else
{
osg::notify(osg::NOTICE) << "Warning: Cannot create texture "<<omtl->textureName<<endl;
osg::notify(osg::NOTICE) << "Warning: Cannot create texture "<<omtl->textureName<< std::endl;
}
}
else
{
osg::notify(osg::WARN) << "texture '"<<omtl->textureName<<"' not found"<<endl;
osg::notify(osg::WARN) << "texture '"<<omtl->textureName<<"' not found"<< std::endl;
}
}
}
@@ -396,7 +396,7 @@ osg::Drawable* ReaderWriterOBJ::makeDrawable(GLMmodel* obj,
gset->setStateSet(mtl[grp->material]);
}
else
osg::notify(osg::INFO) << "Group " << grp->name << " has no material" << endl;
osg::notify(osg::INFO) << "Group " << grp->name << " has no material" << std::endl;
return gset;
}

View File

@@ -54,8 +54,8 @@ bool AlphaFunc_writeLocalData(const Object& obj,Output& fw)
{
const AlphaFunc& alphaFunc = static_cast<const AlphaFunc&>(obj);
fw.indent() << "comparisonFunc " << AlphaFunc_getFuncStr(alphaFunc.getFunction()) << endl;
fw.indent() << "referenceValue " << alphaFunc.getReferenceValue() << endl;
fw.indent() << "comparisonFunc " << AlphaFunc_getFuncStr(alphaFunc.getFunction()) << std::endl;
fw.indent() << "referenceValue " << alphaFunc.getReferenceValue() << std::endl;
return true;
}

View File

@@ -111,15 +111,15 @@ bool Billboard_writeLocalData(const Object& obj, Output& fw)
switch(billboard.getMode())
{
case(Billboard::AXIAL_ROT): fw.indent() << "Mode AXIAL_ROT"<<endl; break;
case(Billboard::POINT_ROT_EYE): fw.indent() << "Mode POINT_ROT_EYE"<<endl; break;
case(Billboard::POINT_ROT_WORLD): fw.indent() << "Mode POINT_ROT_WORLD"<<endl; break;
case(Billboard::AXIAL_ROT): fw.indent() << "Mode AXIAL_ROT"<<std::endl; break;
case(Billboard::POINT_ROT_EYE): fw.indent() << "Mode POINT_ROT_EYE"<<std::endl; break;
case(Billboard::POINT_ROT_WORLD): fw.indent() << "Mode POINT_ROT_WORLD"<<std::endl; break;
}
const Vec3& axis = billboard.getAxis();
fw.indent() << "Axis " << axis[0] << " "<<axis[1]<<" "<<axis[2]<<endl;
fw.indent() << "Axis " << axis[0] << " "<<axis[1]<<" "<<axis[2]<<std::endl;
fw.indent() << "Positions {"<<endl;
fw.indent() << "Positions {"<<std::endl;
fw.moveIn();
Billboard::PositionList positionList = billboard.getPositionList();
@@ -127,10 +127,10 @@ bool Billboard_writeLocalData(const Object& obj, Output& fw)
piter != positionList.end();
++piter)
{
fw.indent() << (*piter)[0] << " "<<(*piter)[1]<<" "<<(*piter)[2]<<endl;
fw.indent() << (*piter)[0] << " "<<(*piter)[1]<<" "<<(*piter)[2]<<std::endl;
}
fw.moveOut();
fw.indent() << "}"<<endl;
fw.indent() << "}"<<std::endl;
return true;
}

View File

@@ -64,11 +64,11 @@ bool ClipPlane_writeLocalData(const Object& obj,Output& fw)
{
const ClipPlane& clipplane = static_cast<const ClipPlane&>(obj);
fw.indent() << "clipPlaneNum " << clipplane.getClipPlaneNum() <<endl;
fw.indent() << "clipPlaneNum " << clipplane.getClipPlaneNum() <<std::endl;
double plane[4];
clipplane.getClipPlane(plane);
fw.indent() << "plane " << plane[0] << ' ' << plane[1] << ' ' << plane[2] << ' ' << plane[3] << endl;
fw.indent() << "plane " << plane[0] << ' ' << plane[1] << ' ' << plane[2] << ' ' << plane[3] << std::endl;
return true;
}

View File

@@ -71,10 +71,10 @@ bool ColorMask_writeLocalData(const Object& obj,Output& fw)
{
const ColorMask& colormask = static_cast<const ColorMask&>(obj);
fw.indent() << "redMask " << ColorMask_getModeStr(colormask.getRedMask()) << endl;
fw.indent() << "greenMask " << ColorMask_getModeStr(colormask.getGreenMask()) << endl;
fw.indent() << "blueMask " << ColorMask_getModeStr(colormask.getBlueMask()) << endl;
fw.indent() << "alphaMask " << ColorMask_getModeStr(colormask.getAlphaMask()) << endl;
fw.indent() << "redMask " << ColorMask_getModeStr(colormask.getRedMask()) <<std::endl;
fw.indent() << "greenMask " << ColorMask_getModeStr(colormask.getGreenMask()) <<std::endl;
fw.indent() << "blueMask " << ColorMask_getModeStr(colormask.getBlueMask()) <<std::endl;
fw.indent() << "alphaMask " << ColorMask_getModeStr(colormask.getAlphaMask()) <<std::endl;
return true;
}

View File

@@ -61,9 +61,9 @@ bool CullFace_writeLocalData(const Object& obj, Output& fw)
switch(cullface.getMode())
{
case(CullFace::FRONT): fw.indent() << "mode FRONT" << endl; break;
case(CullFace::BACK): fw.indent() << "mode BACK" << endl; break;
case(CullFace::FRONT_AND_BACK): fw.indent() << "mode FRONT_AND_BACK" << endl; break;
case(CullFace::FRONT): fw.indent() << "mode FRONT" <<std::endl; break;
case(CullFace::BACK): fw.indent() << "mode BACK" <<std::endl; break;
case(CullFace::FRONT_AND_BACK): fw.indent() << "mode FRONT_AND_BACK" <<std::endl; break;
}
return true;
}

View File

@@ -72,13 +72,13 @@ bool Depth_writeLocalData(const Object& obj,Output& fw)
{
const Depth& depth = static_cast<const Depth&>(obj);
fw.indent() << "function " << Depth_getFuncStr(depth.getFunction()) << endl;
fw.indent() << "function " << Depth_getFuncStr(depth.getFunction()) << std::endl;
fw.indent() << "writeMask ";
if (depth.getWriteMask()) fw << "TRUE" << endl;
else fw << "TRUE" << endl;
if (depth.getWriteMask()) fw << "TRUE" << std::endl;
else fw << "TRUE" << std::endl;
fw.indent() << "range " << depth.getZNear() << " " << depth.getZFar() << endl;
fw.indent() << "range " << depth.getZNear() << " " << depth.getZFar() << std::endl;
return true;
}

View File

@@ -82,13 +82,13 @@ bool Drawable_writeLocalData(const Object& obj, Output& fw)
if (!drawable.getSupportsDisplayList())
{
fw.indent()<<"supportsDisplayList ";
if (drawable.getSupportsDisplayList()) fw << "TRUE" <<endl;
else fw << "FALSE" <<endl;
if (drawable.getSupportsDisplayList()) fw << "TRUE" << std::endl;
else fw << "FALSE" << std::endl;
}
fw.indent()<<"useDisplayList ";
if (drawable.getUseDisplayList()) fw << "TRUE" <<endl;
else fw << "FALSE" <<endl;
if (drawable.getUseDisplayList()) fw << "TRUE" << std::endl;
else fw << "FALSE" << std::endl;
return true;
}

View File

@@ -67,14 +67,14 @@ bool EarthSky_writeLocalData(const Object& obj, Output& fw)
fw.indent() << "requiresClear ";
if (es.getRequiresClear())
{
fw<<"TRUE"<<endl;
fw<<"TRUE"<< std::endl;
}
else
{
fw<<"FALSE"<<endl;
fw<<"FALSE"<< std::endl;
}
fw.indent() << "clearColor "<<es.getClearColor()<<endl;
fw.indent() << "clearColor "<<es.getClearColor()<< std::endl;
return true;
}

View File

@@ -84,11 +84,11 @@ bool Fog_writeLocalData(const Object& obj,Output& fw)
{
const Fog& fog = static_cast<const Fog&>(obj);
fw.indent() << "mode " << Fog_getModeStr(fog.getMode()) << endl;
fw.indent() << "density " << fog.getDensity() << endl;
fw.indent() << "start " << fog.getStart() << endl;
fw.indent() << "end " << fog.getEnd() << endl;
fw.indent() << "color " << fog.getColor() << endl;
fw.indent() << "mode " << Fog_getModeStr(fog.getMode()) << std::endl;
fw.indent() << "density " << fog.getDensity() << std::endl;
fw.indent() << "start " << fog.getStart() << std::endl;
fw.indent() << "end " << fog.getEnd() << std::endl;
fw.indent() << "color " << fog.getColor() << std::endl;
return true;
}

View File

@@ -53,8 +53,8 @@ bool FrontFace_writeLocalData(const Object& obj, Output& fw)
switch(frontface.getMode())
{
case(FrontFace::CLOCKWISE): fw.indent() << "mode CLOCKWISE" << endl; break;
case(FrontFace::COUNTER_CLOCKWISE): fw.indent() << "mode COUNTER_CLOCKWISE" << endl; break;
case(FrontFace::CLOCKWISE): fw.indent() << "mode CLOCKWISE" << std::endl; break;
case(FrontFace::COUNTER_CLOCKWISE): fw.indent() << "mode COUNTER_CLOCKWISE" << std::endl; break;
}
return true;
}

View File

@@ -661,57 +661,57 @@ bool GeoSet_writeLocalData(const Object& obj, Output& fw)
switch(geoset.getPrimType())
{
case (GeoSet::TRIANGLE_STRIP):
fw.indent()<<"tstrips "<< geoset.getNumPrims() << endl;
fw.indent()<<"tstrips "<< geoset.getNumPrims() << std::endl;
writeOutPrimitiveLengths = true;
break;
case (GeoSet::FLAT_TRIANGLE_STRIP):
fw.indent()<<"flat_tstrips "<< geoset.getNumPrims() << endl;
fw.indent()<<"flat_tstrips "<< geoset.getNumPrims() << std::endl;
writeOutPrimitiveLengths = true;
break;
case (GeoSet::POLYGON):
fw.indent()<<"polys "<< geoset.getNumPrims() << endl;
fw.indent()<<"polys "<< geoset.getNumPrims() << std::endl;
writeOutPrimitiveLengths = true;
break;
case (GeoSet::QUAD_STRIP):
fw.indent()<<"quadstrip "<< geoset.getNumPrims() << endl;
fw.indent()<<"quadstrip "<< geoset.getNumPrims() << std::endl;
writeOutPrimitiveLengths = true;
break;
case (GeoSet::LINE_LOOP):
fw.indent()<<"lineloops "<< geoset.getNumPrims() << endl;
fw.indent()<<"lineloops "<< geoset.getNumPrims() << std::endl;
writeOutPrimitiveLengths = true;
break;
case (GeoSet::LINE_STRIP):
fw.indent()<<"linestrip "<< geoset.getNumPrims() << endl;
fw.indent()<<"linestrip "<< geoset.getNumPrims() << std::endl;
writeOutPrimitiveLengths = false;
break;
case (GeoSet::FLAT_LINE_STRIP):
fw.indent()<<"flat_linestrip "<< geoset.getNumPrims() << endl;
fw.indent()<<"flat_linestrip "<< geoset.getNumPrims() << std::endl;
writeOutPrimitiveLengths = false;
break;
case (GeoSet::TRIANGLE_FAN):
fw.indent()<<"tfans "<< geoset.getNumPrims() << endl;
fw.indent()<<"tfans "<< geoset.getNumPrims() << std::endl;
writeOutPrimitiveLengths = true;
case (GeoSet::FLAT_TRIANGLE_FAN):
fw.indent()<<"flat_tfans "<< geoset.getNumPrims() << endl;
fw.indent()<<"flat_tfans "<< geoset.getNumPrims() << std::endl;
writeOutPrimitiveLengths = true;
break;
case (GeoSet::LINES):
fw.indent()<<"lines "<< geoset.getNumPrims() << endl;
fw.indent()<<"lines "<< geoset.getNumPrims() << std::endl;
writeOutPrimitiveLengths = false;
break;
case (GeoSet::TRIANGLES):
fw.indent()<<"triangles "<< geoset.getNumPrims() << endl;
fw.indent()<<"triangles "<< geoset.getNumPrims() << std::endl;
writeOutPrimitiveLengths = false;
break;
case (GeoSet::QUADS):
fw.indent()<<"quads "<< geoset.getNumPrims() << endl;
fw.indent()<<"quads "<< geoset.getNumPrims() << std::endl;
writeOutPrimitiveLengths = false;
break;
case (GeoSet::POINTS) :
fw.indent()<<"points "<< geoset.getNumPrims() << endl;
fw.indent()<<"points "<< geoset.getNumPrims() << std::endl;
break;
default:
notify(WARN) << "GeoSet::writeLocalData() - unhandled primitive type = "<<(int)geoset.getPrimType()<<endl;
notify(WARN) << "GeoSet::writeLocalData() - unhandled primitive type = "<<(int)geoset.getPrimType()<< std::endl;
}
if (writeOutPrimitiveLengths)
{
@@ -724,16 +724,16 @@ bool GeoSet_writeLocalData(const Object& obj, Output& fw)
if (geoset.getCoords())
{
// write out _coords.
fw.indent() << "Coords " << geoset.getNumCoords()<<endl;
fw.indent() << "{"<<endl;
fw.indent() << "Coords " << geoset.getNumCoords()<< std::endl;
fw.indent() << "{"<< std::endl;
fw.moveIn();
const Vec3* coords = geoset.getCoords();
for(i=0;i<geoset.getNumCoords();++i)
{
fw.indent() << coords[i][0] << ' ' << coords[i][1] << ' ' << coords[i][2] << endl;
fw.indent() << coords[i][0] << ' ' << coords[i][1] << ' ' << coords[i][2] << std::endl;
}
fw.moveOut();
fw.indent()<<"}"<<endl;
fw.indent()<<"}"<< std::endl;
}
if (geoset.getCoordIndices()._size)
@@ -744,25 +744,25 @@ bool GeoSet_writeLocalData(const Object& obj, Output& fw)
if (geoset.getNormals())
{
// write out _normals.
fw.indent() << "Normal_Binding "<<GeoSet_getBindingTypeStr(geoset.getNormalBinding())<<endl;
fw.indent() << "Normal_Binding "<<GeoSet_getBindingTypeStr(geoset.getNormalBinding())<< std::endl;
fw.indent() << "Normals " << geoset.getNumNormals()<<endl;
fw.indent() << "{"<<endl;
fw.indent() << "Normals " << geoset.getNumNormals()<< std::endl;
fw.indent() << "{"<< std::endl;
fw.moveIn();
const Vec3* norms = geoset.getNormals();
for(i=0;i<geoset.getNumNormals();++i)
{
fw.indent() << norms[i][0] << ' ' << norms[i][1] << ' ' << norms[i][2] << endl;
fw.indent() << norms[i][0] << ' ' << norms[i][1] << ' ' << norms[i][2] << std::endl;
}
fw.moveOut();
fw.indent()<<"}"<<endl;
fw.indent()<<"}"<< std::endl;
}
if (geoset.getNormalIndices()._size)
{
if (geoset.getNormalIndices()==geoset.getCoordIndices())
{
fw.indent() << "NIndex Use_CIndex"<<endl;
fw.indent() << "NIndex Use_CIndex"<< std::endl;
}
else
{
@@ -774,24 +774,24 @@ bool GeoSet_writeLocalData(const Object& obj, Output& fw)
if (geoset.getColors())
{
// write out _colors.
fw.indent() << "Color_Binding "<<GeoSet_getBindingTypeStr(geoset.getColorBinding())<<endl;
fw.indent() << "Color_Binding "<<GeoSet_getBindingTypeStr(geoset.getColorBinding())<< std::endl;
fw.indent() << "Colors " << geoset.getNumColors()<<endl;
fw.indent() << "{"<<endl;
fw.indent() << "Colors " << geoset.getNumColors()<< std::endl;
fw.indent() << "{"<< std::endl;
fw.moveIn();
const Vec4* colors = geoset.getColors();
for(i=0;i<geoset.getNumColors();++i)
{
fw.indent() << colors[i][0] << ' ' << colors[i][1] << ' ' << colors[i][2] << ' ' << colors[i][3] << endl;
fw.indent() << colors[i][0] << ' ' << colors[i][1] << ' ' << colors[i][2] << ' ' << colors[i][3] << std::endl;
}
fw.moveOut();
fw.indent()<<"}"<<endl;
fw.indent()<<"}"<< std::endl;
}
if (geoset.getColorIndices()._size)
{
if (geoset.getColorIndices()==geoset.getCoordIndices())
{
fw.indent() << "ColIndex Use_CIndex"<<endl;
fw.indent() << "ColIndex Use_CIndex"<< std::endl;
}
else
{
@@ -802,24 +802,24 @@ bool GeoSet_writeLocalData(const Object& obj, Output& fw)
if (geoset.getTextureCoords())
{
// write out _tcoords.
fw.indent() << "Texture_Binding "<<GeoSet_getBindingTypeStr(geoset.getTextureBinding())<<endl;
fw.indent() << "Texture_Binding "<<GeoSet_getBindingTypeStr(geoset.getTextureBinding())<< std::endl;
fw.indent() << "TCoords " << geoset.getNumTextureCoords()<<endl;
fw.indent() << "{"<<endl;
fw.indent() << "TCoords " << geoset.getNumTextureCoords()<< std::endl;
fw.indent() << "{"<< std::endl;
fw.moveIn();
const Vec2* tcoords = geoset.getTextureCoords();
for(i=0;i<geoset.getNumTextureCoords();++i)
{
fw.indent() << tcoords[i][0] << ' ' << tcoords[i][1] << endl;
fw.indent() << tcoords[i][0] << ' ' << tcoords[i][1] << std::endl;
}
fw.moveOut();
fw.indent()<<"}"<<endl;
fw.indent()<<"}"<< std::endl;
}
if (geoset.getTextureIndices()._size)
{
if (geoset.getTextureIndices()==geoset.getCoordIndices())
{
fw.indent() << "TIndex Use_CIndex"<<endl;
fw.indent() << "TIndex Use_CIndex"<< std::endl;
}
else
{
@@ -854,8 +854,8 @@ bool GeoSet_writeLocalData(const Object& obj, Output& fw)
default: fw << "IA_OFF"; break;
}
fw << " " << geoset.getNumInterleavedCoords()<<endl;
fw.indent() << "{"<<endl;
fw << " " << geoset.getNumInterleavedCoords()<< std::endl;
fw.indent() << "{"<< std::endl;
fw.moveIn();
const unsigned char* itrRowData = (const unsigned char*)geoset.getInterleavedArray();
@@ -878,11 +878,11 @@ bool GeoSet_writeLocalData(const Object& obj, Output& fw)
}
itrRowComp++;
}
fw << endl;
fw << std::endl ;
}
fw.moveOut();
fw.indent()<<"}"<<endl;
fw.indent()<<"}"<< std::endl;
}
@@ -1007,13 +1007,13 @@ bool GeoSet_writeIndexData(Output& fw, const char* IndexName,const GeoSet::Index
if (ip._is_ushort)
{
// write our CoordIndex
fw.indent() << IndexName << " ushort " << ip._size<<endl;
fw.indent() << IndexName << " ushort " << ip._size<< std::endl;
writeArrayBlock(fw,ip._ptr._ushort,ip._ptr._ushort+ip._size);
}
else
{
// write our CoordIndex
fw.indent() << IndexName << " uint " << ip._size<<endl;
fw.indent() << IndexName << " uint " << ip._size<< std::endl;
writeArrayBlock(fw,ip._ptr._uint,ip._ptr._uint+ip._size);
}
return true;

View File

@@ -51,7 +51,7 @@ bool Geode_writeLocalData(const osg::Object& obj, Output& fw)
{
const Geode& geode = static_cast<const Geode&>(obj);
fw.indent() << "num_drawables " << geode.getNumDrawables() << endl;
fw.indent() << "num_drawables " << geode.getNumDrawables() << std::endl;
for(int i=0;i<geode.getNumDrawables();++i)
{

View File

@@ -51,7 +51,7 @@ bool Group_writeLocalData(const Object& obj, Output& fw)
{
const Group& group = static_cast<const Group&>(obj);
fw.indent() << "num_children " << group.getNumChildren() << endl;
fw.indent() << "num_children " << group.getNumChildren() << std::endl;
for(int i=0;i<group.getNumChildren();++i)
{
fw.writeObject(*group.getChild(i));

View File

@@ -45,7 +45,7 @@ bool Impostor_writeLocalData(const Object& obj, Output& fw)
{
const Impostor& impostor = static_cast<const Impostor&>(obj);
fw.indent() << "ImpostorThreshold "<< impostor.getImpostorThreshold() <<endl;
fw.indent() << "ImpostorThreshold "<< impostor.getImpostorThreshold() << std::endl;
return true;
}

View File

@@ -85,17 +85,17 @@ bool LOD_writeLocalData(const Object& obj, Output& fw)
{
const LOD& lod = static_cast<const LOD&>(obj);
fw.indent() << "Center "<< lod.getCenter() <<endl;
fw.indent() << "Center "<< lod.getCenter() << std::endl;
fw.indent() << "Ranges {"<<endl;
fw.indent() << "Ranges {"<< std::endl;
fw.moveIn();
for(int i=0; i<lod.getNumRanges();++i)
{
fw.indent() << lod.getRange(i) <<endl;
fw.indent() << lod.getRange(i) << std::endl;
}
fw.moveOut();
fw.indent() << "}"<<endl;
fw.indent() << "}"<< std::endl;
return true;
}

View File

@@ -97,20 +97,20 @@ bool Light_writeLocalData(const Object& obj,Output& fw)
const Light& light = static_cast<const Light&>(obj);
// Vec4's
fw.indent() << "ambient " << light.getAmbient() << endl;
fw.indent() << "diffuse " << light.getDiffuse() << endl;
fw.indent() << "specular " << light.getSpecular() << endl;
fw.indent() << "position " << light.getPosition() << endl;
fw.indent() << "ambient " << light.getAmbient() << std::endl;
fw.indent() << "diffuse " << light.getDiffuse() << std::endl;
fw.indent() << "specular " << light.getSpecular() << std::endl;
fw.indent() << "position " << light.getPosition() << std::endl;
// Vec3's
fw.indent() << "direction " << light.getDirection() << endl;
fw.indent() << "direction " << light.getDirection() << std::endl;
// float's
fw.indent() << "constant_attenuation " << light.getConstantAttenuation() << endl;
fw.indent() << "linear_attenuation " << light.getLinearAttenuation () << endl;
fw.indent() << "quadratic_attenuation " << light.getQuadraticAttenuation() << endl;
fw.indent() << "spot_exponent " << light.getSpotExponent() << endl;
fw.indent() << "spot_cutoff " << light.getSpotCutoff() << endl;
fw.indent() << "constant_attenuation " << light.getConstantAttenuation() << std::endl;
fw.indent() << "linear_attenuation " << light.getLinearAttenuation () << std::endl;
fw.indent() << "quadratic_attenuation " << light.getQuadraticAttenuation() << std::endl;
fw.indent() << "spot_exponent " << light.getSpotExponent() << std::endl;
fw.indent() << "spot_cutoff " << light.getSpotCutoff() << std::endl;
return true;
}

View File

@@ -191,62 +191,62 @@ bool Material_writeLocalData(const Object& obj, Output& fw)
switch(material.getColorMode())
{
case(Material::AMBIENT): fw.indent() << "ColorMode AMBIENT" << endl; break;
case(Material::DIFFUSE): fw.indent() << "ColorMode DIFFUSE" << endl; break;
case(Material::SPECULAR): fw.indent() << "ColorMode SPECULAR" << endl; break;
case(Material::EMISSION): fw.indent() << "ColorMode EMISSION" << endl; break;
case(Material::AMBIENT_AND_DIFFUSE): fw.indent() << "ColorMode AMBIENT_AND_DIFFUSE" << endl; break;
case(Material::OFF): fw.indent() << "ColorMode OFF" << endl; break;
case(Material::AMBIENT): fw.indent() << "ColorMode AMBIENT" << std::endl; break;
case(Material::DIFFUSE): fw.indent() << "ColorMode DIFFUSE" << std::endl; break;
case(Material::SPECULAR): fw.indent() << "ColorMode SPECULAR" << std::endl; break;
case(Material::EMISSION): fw.indent() << "ColorMode EMISSION" << std::endl; break;
case(Material::AMBIENT_AND_DIFFUSE): fw.indent() << "ColorMode AMBIENT_AND_DIFFUSE" << std::endl; break;
case(Material::OFF): fw.indent() << "ColorMode OFF" << std::endl; break;
}
if (material.getAmbientFrontAndBack())
{
fw.indent() << "ambientColor " << material.getAmbient(Material::FRONT) << endl;
fw.indent() << "ambientColor " << material.getAmbient(Material::FRONT) << std::endl;
}
else
{
fw.indent() << "ambientColor FRONT " << material.getAmbient(Material::FRONT) << endl;
fw.indent() << "ambientColor BACK " << material.getAmbient(Material::BACK) << endl;
fw.indent() << "ambientColor FRONT " << material.getAmbient(Material::FRONT) << std::endl;
fw.indent() << "ambientColor BACK " << material.getAmbient(Material::BACK) << std::endl;
}
if (material.getDiffuseFrontAndBack())
{
fw.indent() << "diffuseColor " << material.getDiffuse(Material::FRONT) << endl;
fw.indent() << "diffuseColor " << material.getDiffuse(Material::FRONT) << std::endl;
}
else
{
fw.indent() << "diffuseColor FRONT " << material.getDiffuse(Material::FRONT) << endl;
fw.indent() << "diffuseColor BACK " << material.getDiffuse(Material::BACK) << endl;
fw.indent() << "diffuseColor FRONT " << material.getDiffuse(Material::FRONT) << std::endl;
fw.indent() << "diffuseColor BACK " << material.getDiffuse(Material::BACK) << std::endl;
}
if (material.getSpecularFrontAndBack())
{
fw.indent() << "specularColor " << material.getSpecular(Material::FRONT) << endl;
fw.indent() << "specularColor " << material.getSpecular(Material::FRONT) << std::endl;
}
else
{
fw.indent() << "specularColor FRONT " << material.getSpecular(Material::FRONT) << endl;
fw.indent() << "specularColor BACK " << material.getSpecular(Material::BACK) << endl;
fw.indent() << "specularColor FRONT " << material.getSpecular(Material::FRONT) << std::endl;
fw.indent() << "specularColor BACK " << material.getSpecular(Material::BACK) << std::endl;
}
if (material.getEmissionFrontAndBack())
{
fw.indent() << "emissionColor " << material.getEmission(Material::FRONT) << endl;
fw.indent() << "emissionColor " << material.getEmission(Material::FRONT) << std::endl;
}
else
{
fw.indent() << "emissionColor FRONT " << material.getEmission(Material::FRONT) << endl;
fw.indent() << "emissionColor BACK " << material.getEmission(Material::BACK) << endl;
fw.indent() << "emissionColor FRONT " << material.getEmission(Material::FRONT) << std::endl;
fw.indent() << "emissionColor BACK " << material.getEmission(Material::BACK) << std::endl;
}
if (material.getShininessFrontAndBack())
{
fw.indent() << "shininess " << material.getShininess(Material::FRONT) << endl;
fw.indent() << "shininess " << material.getShininess(Material::FRONT) << std::endl;
}
else
{
fw.indent() << "shininess FRONT " << material.getShininess(Material::FRONT) << endl;
fw.indent() << "shininess BACK " << material.getShininess(Material::BACK) << endl;
fw.indent() << "shininess FRONT " << material.getShininess(Material::FRONT) << std::endl;
fw.indent() << "shininess BACK " << material.getShininess(Material::BACK) << std::endl;
}
return true;