Fixes to Windows build in liu of the move to using just std::streams.
This commit is contained in:
parent
b1f478e5d2
commit
478274ae7d
@ -18,7 +18,7 @@ inline void clampGEQUAL(T& value,const T minValue,const char* valueName)
|
||||
{
|
||||
if (value<minValue)
|
||||
{
|
||||
notify(WARN) << "Warning: "<<valueName<<" of "<<value<<" is below permitted minimum, clampping to "<<minValue<<"."<<endl;
|
||||
notify(WARN) << "Warning: "<<valueName<<" of "<<value<<" is below permitted minimum, clampping to "<<minValue<<"."<< std::endl;
|
||||
value = minValue;
|
||||
}
|
||||
}
|
||||
@ -31,7 +31,7 @@ inline void clampLEQUAL(T& value,const T maxValue,const char* valueName)
|
||||
{
|
||||
if (value>maxValue)
|
||||
{
|
||||
notify(WARN) << "Warning: "<<valueName<<" of "<<value<<" is above permitted maximum, clampping to "<<maxValue<<"."<<endl;
|
||||
notify(WARN) << "Warning: "<<valueName<<" of "<<value<<" is above permitted maximum, clampping to "<<maxValue<<"."<< std::endl;
|
||||
value = maxValue;
|
||||
}
|
||||
}
|
||||
@ -45,13 +45,13 @@ inline void clampBetweenRange(T& value,const T minValue,const T maxValue,const c
|
||||
{
|
||||
if (value<minValue)
|
||||
{
|
||||
notify(WARN) << "Warning: "<<valueName<<" of "<<value<<" is below permitted minimum, clampping to "<<minValue<<"."<<endl;
|
||||
notify(WARN) << "Warning: "<<valueName<<" of "<<value<<" is below permitted minimum, clampping to "<<minValue<<"."<< std::endl;
|
||||
value = minValue;
|
||||
}
|
||||
else
|
||||
if (value>maxValue)
|
||||
{
|
||||
notify(WARN) << "Warning: "<<valueName<<" of "<<value<<" is above permitted maximum, clampping to "<<maxValue<<"."<<endl;
|
||||
notify(WARN) << "Warning: "<<valueName<<" of "<<value<<" is above permitted maximum, clampping to "<<maxValue<<"."<< std::endl;
|
||||
value = maxValue;
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ inline void clampArrayElementGEQUAL(A& value,const unsigned int i,const T minVal
|
||||
{
|
||||
if (value[i]<minValue)
|
||||
{
|
||||
notify(WARN) << "Warning: "<<valueName<<"["<<i<<"] of "<<value[i]<<" is below permitted minimum, clampping to "<<minValue<<"."<<endl;
|
||||
notify(WARN) << "Warning: "<<valueName<<"["<<i<<"] of "<<value[i]<<" is below permitted minimum, clampping to "<<minValue<<"."<< std::endl;
|
||||
value[i] = minValue;
|
||||
}
|
||||
}
|
||||
@ -78,7 +78,7 @@ inline void clampArrayElementLEQUAL(A& value,const unsigned int i,const T maxVal
|
||||
{
|
||||
if (value[i]>maxValue)
|
||||
{
|
||||
notify(WARN) << "Warning: "<<valueName<<"["<<i<<"] of "<<value[i]<<" is above permitted maximum, clampping to "<<maxValue<<"."<<endl;
|
||||
notify(WARN) << "Warning: "<<valueName<<"["<<i<<"] of "<<value[i]<<" is above permitted maximum, clampping to "<<maxValue<<"."<< std::endl;
|
||||
value = maxValue;
|
||||
}
|
||||
}
|
||||
@ -92,13 +92,13 @@ inline void clampArrayElementBetweenRange(A& value,const unsigned int i,const T
|
||||
{
|
||||
if (value[i]<minValue)
|
||||
{
|
||||
notify(WARN) << "Warning: "<<valueName<<"["<<i<<"] of "<<value[i]<<" is below permitted minimum, clampping to "<<minValue<<"."<<endl;
|
||||
notify(WARN) << "Warning: "<<valueName<<"["<<i<<"] of "<<value[i]<<" is below permitted minimum, clampping to "<<minValue<<"."<< std::endl;
|
||||
value[i] = minValue;
|
||||
}
|
||||
else
|
||||
if (value[i]>maxValue)
|
||||
{
|
||||
notify(WARN) << "Warning: "<<valueName<<"["<<i<<"] of "<<value[i]<<" is above permitted maximum, clampping to "<<maxValue<<"."<<endl;
|
||||
notify(WARN) << "Warning: "<<valueName<<"["<<i<<"] of "<<value[i]<<" is above permitted maximum, clampping to "<<maxValue<<"."<< std::endl;
|
||||
value[i] = maxValue;
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ inline std::ostream& operator<< (std::ostream& os, const Matrix& m )
|
||||
os << m(row,col) << " ";
|
||||
os << std::endl;
|
||||
}
|
||||
os << "}" << endl;
|
||||
os << "}" << std::endl;
|
||||
return os;
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ class SG_EXPORT Plane
|
||||
calculateUpperLowerBBCorners();
|
||||
}
|
||||
|
||||
friend inline ostream& operator << (ostream& output, const Plane& pl);
|
||||
friend inline std::ostream& operator << (std::ostream& output, const Plane& pl);
|
||||
|
||||
|
||||
protected:
|
||||
@ -156,7 +156,7 @@ class SG_EXPORT Plane
|
||||
|
||||
};
|
||||
|
||||
inline ostream& operator << (ostream& output, const Plane& pl)
|
||||
inline std::ostream& operator << (std::ostream& output, const Plane& pl)
|
||||
{
|
||||
output << pl._fv[0] << " "
|
||||
<< pl._fv[1] << " "
|
||||
|
@ -145,20 +145,20 @@ class SG_EXPORT Quat
|
||||
return *this; // enable nesting
|
||||
}
|
||||
|
||||
/// Binary subtraction
|
||||
/// Binary subtraction
|
||||
inline const Quat operator - (const Quat& rhs) const
|
||||
{
|
||||
return Quat( _fv - rhs._fv );
|
||||
}
|
||||
|
||||
/// Unary subtraction
|
||||
/// Unary subtraction
|
||||
inline Quat& operator -= (const Quat& rhs)
|
||||
{
|
||||
_fv-=rhs._fv;
|
||||
return *this; // enable nesting
|
||||
}
|
||||
|
||||
/** Negation operator - returns the negative of the quaternion.
|
||||
/** Negation operator - returns the negative of the quaternion.
|
||||
Basically just calls operator - () on the Vec4 */
|
||||
inline const Quat operator - () const
|
||||
{
|
||||
@ -177,17 +177,17 @@ class SG_EXPORT Quat
|
||||
return _fv.length2();
|
||||
}
|
||||
|
||||
/// Conjugate
|
||||
inline const Quat conj () const
|
||||
{
|
||||
return Quat( -_fv[0], -_fv[1], -_fv[2], _fv[3] );
|
||||
}
|
||||
/// Conjugate
|
||||
inline const Quat conj () const
|
||||
{
|
||||
return Quat( -_fv[0], -_fv[1], -_fv[2], _fv[3] );
|
||||
}
|
||||
|
||||
/// Multiplicative inverse method: q^(-1) = q^*/(q.q^*)
|
||||
inline const Quat inverse () const
|
||||
{
|
||||
return conj() / length2();
|
||||
}
|
||||
/// Multiplicative inverse method: q^(-1) = q^*/(q.q^*)
|
||||
inline const Quat inverse () const
|
||||
{
|
||||
return conj() / length2();
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------
|
||||
METHODS RELATED TO ROTATIONS
|
||||
@ -199,9 +199,9 @@ class SG_EXPORT Quat
|
||||
|
||||
Not inlined - see the Quat.cpp file for implementation
|
||||
-------------------------------------------------------- */
|
||||
void makeRotate ( const float angle,
|
||||
void makeRotate ( const float angle,
|
||||
const float x, const float y, const float z );
|
||||
void makeRotate ( const float angle, const Vec3& vec );
|
||||
void makeRotate ( const float angle, const Vec3& vec );
|
||||
|
||||
/** Make a rotation Quat which will rotate vec1 to vec2.
|
||||
Generally take adot product to get the angle between these
|
||||
@ -210,14 +210,14 @@ class SG_EXPORT Quat
|
||||
are co-incident or opposite in direction.*/
|
||||
void makeRotate( const Vec3& vec1, const Vec3& vec2 );
|
||||
|
||||
/** Return the angle and vector components represented by the quaternion.*/
|
||||
void getRot ( float& angle, float& x, float& y, float& z ) const;
|
||||
/** Return the angle and vector represented by the quaternion.*/
|
||||
void getRot ( float& angle, Vec3& vec ) const;
|
||||
/** Return the angle and vector components represented by the quaternion.*/
|
||||
void getRotate ( float& angle, float& x, float& y, float& z ) const;
|
||||
/** Return the angle and vector represented by the quaternion.*/
|
||||
void getRotate ( float& angle, Vec3& vec ) const;
|
||||
|
||||
/** Spherical Linear Interpolation.
|
||||
/** Spherical Linear Interpolation.
|
||||
As t goes from 0 to 1, the Quat object goes from "from" to "to". */
|
||||
void slerp ( const float t, const Quat& from, const Quat& to);
|
||||
void slerp ( const float t, const Quat& from, const Quat& to);
|
||||
|
||||
/** Set quaternion to be equivalent to specified matrix.*/
|
||||
void set( const osg::Matrix& m );
|
||||
@ -225,11 +225,11 @@ class SG_EXPORT Quat
|
||||
/** Get the equivalent matrix for this quaternion.*/
|
||||
void get( osg::Matrix& m ) const;
|
||||
|
||||
friend inline ostream& operator << (ostream& output, const Quat& vec);
|
||||
friend inline std::ostream& operator << (std::ostream& output, const Quat& vec);
|
||||
|
||||
}; // end of class prototype
|
||||
|
||||
inline ostream& operator << (ostream& output, const Quat& vec)
|
||||
inline std::ostream& operator << (std::ostream& output, const Quat& vec)
|
||||
{
|
||||
output << vec._fv[0] << " "
|
||||
<< vec._fv[1] << " "
|
||||
|
@ -169,7 +169,7 @@ class Vec3
|
||||
return( norm );
|
||||
}
|
||||
|
||||
friend inline ostream& operator << (ostream& output, const Vec3& vec);
|
||||
friend inline std::ostream& operator << (std::ostream& output, const Vec3& vec);
|
||||
|
||||
}; // end of class Vec3
|
||||
|
||||
|
@ -25,7 +25,7 @@ class OSGDB_EXPORT FieldReaderIterator
|
||||
|
||||
virtual FieldReaderIterator& operator = (const FieldReaderIterator& ic);
|
||||
|
||||
void attach(istream* input);
|
||||
void attach(std::istream* input);
|
||||
void detach();
|
||||
|
||||
virtual bool eof() const;
|
||||
|
@ -66,8 +66,8 @@ class OSGDB_EXPORT Output : public std::ofstream
|
||||
protected:
|
||||
|
||||
// prevent copy construction and assignment.
|
||||
Output(const Output&) : ofstream() {}
|
||||
Output& operator = (const Output&) { return *this; }
|
||||
Output(const Output&);
|
||||
Output& operator = (const Output&);
|
||||
|
||||
virtual void init();
|
||||
|
||||
@ -88,14 +88,14 @@ class OSGDB_EXPORT Output : public std::ofstream
|
||||
template<class T>
|
||||
bool writeArrayBlock(Output& fw,T* start,T* finish)
|
||||
{
|
||||
fw.indent() << "{" << endl;
|
||||
fw.indent() << "{" << std::endl;
|
||||
fw.moveIn();
|
||||
int numIndicesThisLine = 0;
|
||||
for(T* itr=start;itr!=finish;++itr)
|
||||
{
|
||||
if (numIndicesThisLine>=fw.getNumIndicesPerLine())
|
||||
{
|
||||
fw << endl;
|
||||
fw << std::endl;
|
||||
numIndicesThisLine = 0;
|
||||
}
|
||||
|
||||
@ -107,9 +107,9 @@ bool writeArrayBlock(Output& fw,T* start,T* finish)
|
||||
++numIndicesThisLine;
|
||||
|
||||
}
|
||||
fw << endl;
|
||||
fw << std::endl;
|
||||
fw.moveOut();
|
||||
fw.indent() << "}" << endl;
|
||||
fw.indent() << "}" << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -78,7 +78,7 @@ class OSGGLUT_EXPORT Viewer : public osgUtil::GUIActionAdapter
|
||||
double frameSeconds() { return _timer.delta_s(_lastFrameTick,_frameTick); }
|
||||
double frameRate() { return 1.0/frameSeconds(); }
|
||||
|
||||
void help(ostream& fout);
|
||||
void help(std::ostream& fout);
|
||||
|
||||
// handle multiple camera.
|
||||
unsigned int registerCameraManipulator(osgUtil::CameraManipulator* cm,
|
||||
|
@ -314,7 +314,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor
|
||||
while (_currentReuseMatrixIndex<_reuseMatrixList.size() &&
|
||||
_reuseMatrixList[_currentReuseMatrixIndex]->referenceCount()>1)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Warning:createOrReuseMatrix() skipping multiply refrenced entry."<<endl;
|
||||
osg::notify(osg::NOTICE)<<"Warning:createOrReuseMatrix() skipping multiply refrenced entry."<< std::endl;
|
||||
++_currentReuseMatrixIndex;
|
||||
}
|
||||
|
||||
@ -344,7 +344,7 @@ class OSGUTIL_EXPORT CullVisitor : public osg::NodeVisitor
|
||||
while (_currentReuseRenderLeafIndex<_reuseRenderLeafList.size() &&
|
||||
_reuseRenderLeafList[_currentReuseRenderLeafIndex]->referenceCount()>1)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Warning:createOrReuseRenderLeaf() skipping multiply refrenced entry."<<endl;
|
||||
osg::notify(osg::NOTICE)<<"Warning:createOrReuseRenderLeaf() skipping multiply refrenced entry."<< std::endl;
|
||||
++_currentReuseRenderLeafIndex;
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ bool GliderManipulator::calcMovement()
|
||||
|
||||
if (dt<0.0f)
|
||||
{
|
||||
notify(WARN) << "warning dt = "<<dt<<endl;
|
||||
notify(WARN) << "warning dt = "<<dt<< std::endl;
|
||||
dt = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ osg::Node* getNodeFromFiles(int argc,char **argv)
|
||||
|
||||
if (nodeList.size()==0)
|
||||
{
|
||||
osg::notify(osg::INFO) << "No data loaded."<<endl;
|
||||
osg::notify(osg::INFO) << "No data loaded."<< std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -102,20 +102,20 @@ int main( int argc, char **argv )
|
||||
|
||||
// if (argc<2)
|
||||
// {
|
||||
// osg::notify(osg::NOTICE)<<"usage:"<<endl;
|
||||
// osg::notify(osg::NOTICE)<<" sgv [options] infile1 [infile2 ...]"<<endl;
|
||||
// osg::notify(osg::NOTICE)<<endl;
|
||||
// osg::notify(osg::NOTICE)<<"options:"<<endl;
|
||||
// osg::notify(osg::NOTICE)<<" -l libraryName - load plugin of name libraryName"<<endl;
|
||||
// osg::notify(osg::NOTICE)<<" i.e. -l osgdb_pfb"<<endl;
|
||||
// osg::notify(osg::NOTICE)<<" Useful for loading reader/writers which can load"<<endl;
|
||||
// osg::notify(osg::NOTICE)<<" other file formats in addition to its extension."<<endl;
|
||||
// osg::notify(osg::NOTICE)<<" -e extensionName - load reader/wrter plugin for file extension"<<endl;
|
||||
// osg::notify(osg::NOTICE)<<" i.e. -e pfb"<<endl;
|
||||
// osg::notify(osg::NOTICE)<<" Useful short hand for specifying full library name as"<<endl;
|
||||
// osg::notify(osg::NOTICE)<<" done with -l above, as it automatically expands to the"<<endl;
|
||||
// osg::notify(osg::NOTICE)<<" full library name appropriate for each platform."<<endl;
|
||||
// osg::notify(osg::NOTICE)<<endl;
|
||||
// osg::notify(osg::NOTICE)<<"usage:"<< std::endl;
|
||||
// osg::notify(osg::NOTICE)<<" sgv [options] infile1 [infile2 ...]"<< std::endl;
|
||||
// osg::notify(osg::NOTICE)<< std::endl;
|
||||
// osg::notify(osg::NOTICE)<<"options:"<< std::endl;
|
||||
// osg::notify(osg::NOTICE)<<" -l libraryName - load plugin of name libraryName"<< std::endl;
|
||||
// osg::notify(osg::NOTICE)<<" i.e. -l osgdb_pfb"<< std::endl;
|
||||
// osg::notify(osg::NOTICE)<<" Useful for loading reader/writers which can load"<< std::endl;
|
||||
// osg::notify(osg::NOTICE)<<" other file formats in addition to its extension."<< std::endl;
|
||||
// osg::notify(osg::NOTICE)<<" -e extensionName - load reader/wrter plugin for file extension"<< std::endl;
|
||||
// osg::notify(osg::NOTICE)<<" i.e. -e pfb"<< std::endl;
|
||||
// osg::notify(osg::NOTICE)<<" Useful short hand for specifying full library name as"<< std::endl;
|
||||
// osg::notify(osg::NOTICE)<<" done with -l above, as it automatically expands to the"<< std::endl;
|
||||
// osg::notify(osg::NOTICE)<<" full library name appropriate for each platform."<< std::endl;
|
||||
// osg::notify(osg::NOTICE)<< std::endl;
|
||||
//
|
||||
// return 0;
|
||||
// }
|
||||
|
@ -16,23 +16,23 @@ static bool do_convert = false;
|
||||
|
||||
static void usage( const char *prog, const char *msg )
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<endl;
|
||||
osg::notify(osg::NOTICE) << msg << endl;
|
||||
osg::notify(osg::NOTICE)<<endl;
|
||||
osg::notify(osg::NOTICE)<<"usage:"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" " << prog << " [options] infile1 [infile2 ...] outfile"<<endl;
|
||||
osg::notify(osg::NOTICE)<<endl;
|
||||
osg::notify(osg::NOTICE)<<"options:"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" -l libraryName - load plugin of name libraryName"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -l osgdb_pfb"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful for loading reader/writers which can load"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" other file formats in addition to its extension."<<endl;
|
||||
osg::notify(osg::NOTICE)<<" -e extensionName - load reader/wrter plugin for file extension"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -e pfb"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful short hand for specifying full library name as"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" done with -l above, as it automatically expands to the"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" full library name appropriate for each platform."<<endl;
|
||||
osg::notify(osg::NOTICE)<<" -o orientation - Convert geometry from input files to output files."<<endl;
|
||||
osg::notify(osg::NOTICE)<< std::endl;
|
||||
osg::notify(osg::NOTICE) << msg << std::endl;
|
||||
osg::notify(osg::NOTICE)<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<"usage:"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" " << prog << " [options] infile1 [infile2 ...] outfile"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<"options:"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" -l libraryName - load plugin of name libraryName"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -l osgdb_pfb"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful for loading reader/writers which can load"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" other file formats in addition to its extension."<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" -e extensionName - load reader/wrter plugin for file extension"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -e pfb"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful short hand for specifying full library name as"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" done with -l above, as it automatically expands to the"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" full library name appropriate for each platform."<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" -o orientation - Convert geometry from input files to output files."<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<
|
||||
" Format of orientation argument must be the following:\n"
|
||||
"\n"
|
||||
@ -46,7 +46,7 @@ static void usage( const char *prog, const char *msg )
|
||||
"\n"
|
||||
" 0,1,0-0,0,1"
|
||||
"\n"
|
||||
<< endl;
|
||||
<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" -t translation - Convert spatial position of output files. Format of\n"
|
||||
" translation argument must be the following :\n"
|
||||
"\n"
|
||||
@ -54,7 +54,7 @@ static void usage( const char *prog, const char *msg )
|
||||
"\n"
|
||||
" where X, Y, and Z represent the coordinates of the\n"
|
||||
" absolute position in world space\n"
|
||||
<< endl;
|
||||
<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" -s scale - Scale size of model. Scale argument must be the \n"
|
||||
" following :\n"
|
||||
"\n"
|
||||
@ -62,7 +62,7 @@ static void usage( const char *prog, const char *msg )
|
||||
"\n"
|
||||
" where SX, SY, and SZ represent the scale factors\n"
|
||||
" Caution: Scaling will be done in destination orientation\n"
|
||||
<< endl;
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
static bool
|
||||
@ -209,11 +209,11 @@ int main( int argc, char **argv )
|
||||
if (root)
|
||||
{
|
||||
osgDB::writeNodeFile(*root,"converted.osg");
|
||||
osg::notify(osg::NOTICE)<<"Data written to 'converted.osg'."<<endl;
|
||||
osg::notify(osg::NOTICE)<<"Data written to 'converted.osg'."<< std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"Error no data loaded."<<endl;
|
||||
osg::notify(osg::NOTICE)<<"Error no data loaded."<< std::endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@ -239,7 +239,7 @@ int main( int argc, char **argv )
|
||||
if (group->getNumChildren()==0)
|
||||
{
|
||||
|
||||
osg::notify(osg::NOTICE)<<"Error no data loaded."<<endl;
|
||||
osg::notify(osg::NOTICE)<<"Error no data loaded."<< std::endl;
|
||||
return 1;
|
||||
}
|
||||
else if (group->getNumChildren()==1)
|
||||
|
@ -68,7 +68,7 @@ osg::Node* getNodeFromFiles(int argc,char **argv)
|
||||
|
||||
if (nodeList.size()==0)
|
||||
{
|
||||
osg::notify(osg::WARN) << "No data loaded."<<endl;
|
||||
osg::notify(osg::WARN) << "No data loaded."<< std::endl;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@ -105,20 +105,20 @@ int main( int argc, char **argv )
|
||||
|
||||
if (argc<2)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"usage:"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" osgimpostor [options] infile1 [infile2 ...]"<<endl;
|
||||
osg::notify(osg::NOTICE)<<endl;
|
||||
osg::notify(osg::NOTICE)<<"options:"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" -l libraryName - load plugin of name libraryName"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -l osgdb_pfb"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful for loading reader/writers which can load"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" other file formats in addition to its extension."<<endl;
|
||||
osg::notify(osg::NOTICE)<<" -e extensionName - load reader/wrter plugin for file extension"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -e pfb"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful short hand for specifying full library name as"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" done with -l above, as it automatically expands to the"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" full library name appropriate for each platform."<<endl;
|
||||
osg::notify(osg::NOTICE)<<endl;
|
||||
osg::notify(osg::NOTICE)<<"usage:"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" osgimpostor [options] infile1 [infile2 ...]"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<"options:"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" -l libraryName - load plugin of name libraryName"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -l osgdb_pfb"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful for loading reader/writers which can load"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" other file formats in addition to its extension."<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" -e extensionName - load reader/wrter plugin for file extension"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -e pfb"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful short hand for specifying full library name as"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" done with -l above, as it automatically expands to the"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" full library name appropriate for each platform."<< std::endl;
|
||||
osg::notify(osg::NOTICE)<< std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -180,7 +180,7 @@ int main( int argc, char **argv )
|
||||
|
||||
|
||||
osg::Timer_t after_load = timer.tick();
|
||||
cout << "Time for load = "<<timer.delta_s(before_load,after_load)<<" seconds"<<endl;
|
||||
std::cout << "Time for load = "<<timer.delta_s(before_load,after_load)<<" seconds"<< std::endl;
|
||||
|
||||
// initialize the viewer.
|
||||
osgGLUT::Viewer viewer;
|
||||
|
@ -92,7 +92,7 @@ osg::Node* getNodeFromFiles(int argc,char **argv)
|
||||
|
||||
if (nodeList.size()==0)
|
||||
{
|
||||
osg::notify(osg::WARN) << "No data loaded."<<endl;
|
||||
osg::notify(osg::WARN) << "No data loaded."<< std::endl;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@ -175,21 +175,21 @@ osg::Drawable* createMirrorSurface(float xMin,float xMax,float yMin,float yMax,f
|
||||
|
||||
void write_usage()
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<endl;
|
||||
osg::notify(osg::NOTICE)<<"usage:"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" osgreflect [options] infile1 [infile2 ...]"<<endl;
|
||||
osg::notify(osg::NOTICE)<<endl;
|
||||
osg::notify(osg::NOTICE)<<"options:"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" -l libraryName - load plugin of name libraryName"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -l osgdb_pfb"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful for loading reader/writers which can load"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" other file formats in addition to its extension."<<endl;
|
||||
osg::notify(osg::NOTICE)<<" -e extensionName - load reader/wrter plugin for file extension"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -e pfb"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful short hand for specifying full library name as"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" done with -l above, as it automatically expands to the"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" full library name appropriate for each platform."<<endl;
|
||||
osg::notify(osg::NOTICE)<<endl;
|
||||
osg::notify(osg::NOTICE)<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<"usage:"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" osgreflect [options] infile1 [infile2 ...]"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<"options:"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" -l libraryName - load plugin of name libraryName"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -l osgdb_pfb"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful for loading reader/writers which can load"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" other file formats in addition to its extension."<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" -e extensionName - load reader/wrter plugin for file extension"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -e pfb"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful short hand for specifying full library name as"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" done with -l above, as it automatically expands to the"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" full library name appropriate for each platform."<< std::endl;
|
||||
osg::notify(osg::NOTICE)<< std::endl;
|
||||
}
|
||||
|
||||
int main( int argc, char **argv )
|
||||
|
@ -67,7 +67,7 @@ osg::Node* getNodeFromFiles(int argc,char **argv)
|
||||
|
||||
if (nodeList.size()==0)
|
||||
{
|
||||
osg::notify(osg::WARN) << "No data loaded."<<endl;
|
||||
osg::notify(osg::WARN) << "No data loaded."<< std::endl;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@ -104,20 +104,20 @@ int main( int argc, char **argv )
|
||||
|
||||
if (argc<2)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"usage:"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" osgviews [options] infile1 [infile2 ...]"<<endl;
|
||||
osg::notify(osg::NOTICE)<<endl;
|
||||
osg::notify(osg::NOTICE)<<"options:"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" -l libraryName - load plugin of name libraryName"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -l osgdb_pfb"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful for loading reader/writers which can load"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" other file formats in addition to its extension."<<endl;
|
||||
osg::notify(osg::NOTICE)<<" -e extensionName - load reader/wrter plugin for file extension"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -e pfb"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful short hand for specifying full library name as"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" done with -l above, as it automatically expands to the"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" full library name appropriate for each platform."<<endl;
|
||||
osg::notify(osg::NOTICE)<<endl;
|
||||
osg::notify(osg::NOTICE)<<"usage:"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" osgviews [options] infile1 [infile2 ...]"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<"options:"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" -l libraryName - load plugin of name libraryName"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -l osgdb_pfb"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful for loading reader/writers which can load"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" other file formats in addition to its extension."<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" -e extensionName - load reader/wrter plugin for file extension"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -e pfb"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful short hand for specifying full library name as"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" done with -l above, as it automatically expands to the"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" full library name appropriate for each platform."<< std::endl;
|
||||
osg::notify(osg::NOTICE)<< std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -128,7 +128,7 @@ int main( int argc, char **argv )
|
||||
osg::Node* rootnode = getNodeFromFiles( argc, argv);
|
||||
|
||||
osg::Timer_t after_load = timer.tick();
|
||||
cout << "Time for load = "<<timer.delta_s(before_load,after_load)<<" seconds"<<endl;
|
||||
std::cout << "Time for load = "<<timer.delta_s(before_load,after_load)<<" seconds"<< std::endl;
|
||||
|
||||
// initialize the viewer.
|
||||
osgGLUT::Viewer viewer;
|
||||
|
@ -71,7 +71,7 @@ osg::Node* getNodeFromFiles(int argc,char **argv)
|
||||
|
||||
if (nodeList.size()==0)
|
||||
{
|
||||
osg::notify(osg::WARN) << "No data loaded."<<endl;
|
||||
osg::notify(osg::WARN) << "No data loaded."<< std::endl;
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@ -108,20 +108,20 @@ int main( int argc, char **argv )
|
||||
|
||||
if (argc<2)
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"usage:"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" sgv [options] infile1 [infile2 ...]"<<endl;
|
||||
osg::notify(osg::NOTICE)<<endl;
|
||||
osg::notify(osg::NOTICE)<<"options:"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" -l libraryName - load plugin of name libraryName"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -l osgdb_pfb"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful for loading reader/writers which can load"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" other file formats in addition to its extension."<<endl;
|
||||
osg::notify(osg::NOTICE)<<" -e extensionName - load reader/wrter plugin for file extension"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -e pfb"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful short hand for specifying full library name as"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" done with -l above, as it automatically expands to the"<<endl;
|
||||
osg::notify(osg::NOTICE)<<" full library name appropriate for each platform."<<endl;
|
||||
osg::notify(osg::NOTICE)<<endl;
|
||||
osg::notify(osg::NOTICE)<<"usage:"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" sgv [options] infile1 [infile2 ...]"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<"options:"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" -l libraryName - load plugin of name libraryName"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -l osgdb_pfb"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful for loading reader/writers which can load"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" other file formats in addition to its extension."<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" -e extensionName - load reader/wrter plugin for file extension"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" i.e. -e pfb"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" Useful short hand for specifying full library name as"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" done with -l above, as it automatically expands to the"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<" full library name appropriate for each platform."<< std::endl;
|
||||
osg::notify(osg::NOTICE)<< std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -138,7 +138,7 @@ int main( int argc, char **argv )
|
||||
osg::Node* rootnode = getNodeFromFiles( argc, argv);
|
||||
|
||||
osg::Timer_t after_load = timer.tick();
|
||||
cout << "Time for load = "<<timer.delta_s(before_load,after_load)<<" seconds"<<endl;
|
||||
std::cout << "Time for load = "<<timer.delta_s(before_load,after_load)<<" seconds"<< std::endl;
|
||||
|
||||
|
||||
// run optimization over the scene graph
|
||||
|
@ -452,8 +452,8 @@ void Camera::attachTransform(const TransformMode mode, Matrix* matrix)
|
||||
break;
|
||||
default:
|
||||
_attachedTransformMode = NO_ATTACHED_TRANSFORM;
|
||||
notify(WARN)<<"Warning: invalid TransformMode pass to osg::Camera::attachTransform(..)"<<endl;
|
||||
notify(WARN)<<" setting Camera to NO_ATTACHED_TRANSFORM."<<endl;
|
||||
notify(WARN)<<"Warning: invalid TransformMode pass to osg::Camera::attachTransform(..)"<<std::endl;
|
||||
notify(WARN)<<" setting Camera to NO_ATTACHED_TRANSFORM."<<std::endl;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,7 @@ void ClipPlane::setClipPlane(const double* plane)
|
||||
}
|
||||
else
|
||||
{
|
||||
notify(WARN)<<"Warning: ClipPlane::setClipPlane() passed NULL plane array, ignoring operation."<<endl;
|
||||
notify(WARN)<<"Warning: ClipPlane::setClipPlane() passed NULL plane array, ignoring operation."<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ void Drawable::setUseDisplayList(const bool flag)
|
||||
{
|
||||
if (flag)
|
||||
{
|
||||
notify(WARN)<<"Warning: attempt to setUseDisplayList(true) on a drawable with does not support display lists."<<endl;
|
||||
notify(WARN)<<"Warning: attempt to setUseDisplayList(true) on a drawable with does not support display lists."<<std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -38,12 +38,12 @@ const bool osg::isGLExtensionSupported(const char *extension)
|
||||
}
|
||||
if (*startOfWord!=0) s_extensionSet.insert(std::string(startOfWord));
|
||||
|
||||
osg::notify(INFO)<<"OpenGL extensions supported by installed OpenGL drivers are:"<<endl;
|
||||
osg::notify(INFO)<<"OpenGL extensions supported by installed OpenGL drivers are:"<<std::endl;
|
||||
for(ExtensionSet::iterator itr=s_extensionSet.begin();
|
||||
itr!=s_extensionSet.end();
|
||||
++itr)
|
||||
{
|
||||
osg::notify(INFO)<<" "<<*itr<<endl;
|
||||
osg::notify(INFO)<<" "<<*itr<<std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
@ -51,8 +51,8 @@ const bool osg::isGLExtensionSupported(const char *extension)
|
||||
// true if extension found in extensionSet.
|
||||
bool result = s_extensionSet.find(extension)!=s_extensionSet.end();
|
||||
|
||||
if (result) osg::notify(INFO)<<"OpenGL extension '"<<extension<<"' is supported."<<endl;
|
||||
else osg::notify(INFO)<<"OpenGL extension '"<<extension<<"' is not supported."<<endl;
|
||||
if (result) osg::notify(INFO)<<"OpenGL extension '"<<extension<<"' is supported."<<std::endl;
|
||||
else osg::notify(INFO)<<"OpenGL extension '"<<extension<<"' is not supported."<<std::endl;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ void GeoSet::computeNumVerts() const
|
||||
numverts += _primLengths[i];
|
||||
break;
|
||||
default:
|
||||
notify(WARN) << "Not supported primitive "<<(int)_primtype<<endl;
|
||||
notify(WARN) << "Not supported primitive "<<(int)_primtype<<std::endl;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ void Image::scaleImage(const int s,const int t,const int /*r*/)
|
||||
{
|
||||
::free(newData);
|
||||
|
||||
notify(WARN) << "Error Image::scaleImage() do not succeed : errorString = "<<gluErrorString((GLenum)status)<<endl;
|
||||
notify(WARN) << "Error Image::scaleImage() do not succeed : errorString = "<<gluErrorString((GLenum)status)<<std::endl;
|
||||
}
|
||||
|
||||
++_modifiedTag;
|
||||
@ -128,8 +128,8 @@ void Image::ensureDimensionsArePowerOfTwo()
|
||||
|
||||
if (new_s!=_s || new_t!=_t)
|
||||
{
|
||||
if (!_fileName.empty()) notify(NOTICE) << "Scaling image '"<<_fileName<<"' from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<endl;
|
||||
else notify(NOTICE) << "Scaling image from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<endl;
|
||||
if (!_fileName.empty()) notify(NOTICE) << "Scaling image '"<<_fileName<<"' from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<std::endl;
|
||||
else notify(NOTICE) << "Scaling image from ("<<_s<<","<<_t<<") to ("<<new_s<<","<<new_t<<")"<<std::endl;
|
||||
|
||||
scaleImage(new_s,new_t,_r);
|
||||
}
|
||||
|
@ -117,11 +117,11 @@ const bool ImpostorSprite::computeBound() const
|
||||
|
||||
if (!_bbox.isValid())
|
||||
{
|
||||
cout << "******* ImpostorSprite::computeBound() problem"<<endl;
|
||||
cout << "******* = "<<_coords[0]<<endl;
|
||||
cout << "******* = "<<_coords[1]<<endl;
|
||||
cout << "******* = "<<_coords[2]<<endl;
|
||||
cout << "******* = "<<_coords[3]<<endl;
|
||||
notify(WARN) << "******* ImpostorSprite::computeBound() problem"<<std::endl;
|
||||
notify(WARN) << "******* = "<<_coords[0]<<std::endl;
|
||||
notify(WARN) << "******* = "<<_coords[1]<<std::endl;
|
||||
notify(WARN) << "******* = "<<_coords[2]<<std::endl;
|
||||
notify(WARN) << "******* = "<<_coords[3]<<std::endl;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -55,7 +55,7 @@ void Material::setAmbient( const Face face, const Vec4& ambient )
|
||||
_ambientBack = _ambientFront;
|
||||
break;
|
||||
default:
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setAmbient()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setAmbient()."<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,12 +71,12 @@ const Vec4& Material::getAmbient(const Face face) const
|
||||
case(FRONT_AND_BACK):
|
||||
if (!_ambientFrontAndBack)
|
||||
{
|
||||
notify(NOTICE)<<"Notice: Material::getAmbient(FRONT_AND_BACK) called on material "<<endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK ambient colors."<<endl;
|
||||
notify(NOTICE)<<"Notice: Material::getAmbient(FRONT_AND_BACK) called on material "<< std::endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK ambient colors."<< std::endl;
|
||||
}
|
||||
return _ambientFront;
|
||||
}
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getAmbient()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getAmbient()."<< std::endl;
|
||||
return _ambientFront;
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ void Material::setDiffuse( const Face face, const Vec4& diffuse )
|
||||
_diffuseBack = _diffuseFront;
|
||||
break;
|
||||
default:
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setDiffuse()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setDiffuse()."<< std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -119,12 +119,12 @@ const Vec4& Material::getDiffuse(const Face face) const
|
||||
case(FRONT_AND_BACK):
|
||||
if (!_diffuseFrontAndBack)
|
||||
{
|
||||
notify(NOTICE)<<"Notice: Material::getDiffuse(FRONT_AND_BACK) called on material "<<endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK diffuse colors."<<endl;
|
||||
notify(NOTICE)<<"Notice: Material::getDiffuse(FRONT_AND_BACK) called on material "<< std::endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK diffuse colors."<< std::endl;
|
||||
}
|
||||
return _diffuseFront;
|
||||
}
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getDiffuse()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getDiffuse()."<< std::endl;
|
||||
return _diffuseFront;
|
||||
}
|
||||
|
||||
@ -150,7 +150,7 @@ void Material::setSpecular( const Face face, const Vec4& specular )
|
||||
_specularBack = _specularFront;
|
||||
break;
|
||||
default:
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setSpecular()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setSpecular()."<< std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -167,12 +167,12 @@ const Vec4& Material::getSpecular(const Face face) const
|
||||
case(FRONT_AND_BACK):
|
||||
if (!_specularFrontAndBack)
|
||||
{
|
||||
notify(NOTICE)<<"Notice: Material::getSpecular(FRONT_AND_BACK) called on material "<<endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK specular colors."<<endl;
|
||||
notify(NOTICE)<<"Notice: Material::getSpecular(FRONT_AND_BACK) called on material "<< std::endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK specular colors."<< std::endl;
|
||||
}
|
||||
return _specularFront;
|
||||
}
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getSpecular()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getSpecular()."<< std::endl;
|
||||
return _specularFront;
|
||||
}
|
||||
|
||||
@ -198,7 +198,7 @@ void Material::setEmission( const Face face, const Vec4& emission )
|
||||
_emissionBack = _emissionFront;
|
||||
break;
|
||||
default:
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setEmission()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setEmission()."<< std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -215,12 +215,12 @@ const Vec4& Material::getEmission(const Face face) const
|
||||
case(FRONT_AND_BACK):
|
||||
if (!_emissionFrontAndBack)
|
||||
{
|
||||
notify(NOTICE)<<"Notice: Material::getEmission(FRONT_AND_BACK) called on material "<<endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK emission colors."<<endl;
|
||||
notify(NOTICE)<<"Notice: Material::getEmission(FRONT_AND_BACK) called on material "<< std::endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK emission colors."<< std::endl;
|
||||
}
|
||||
return _emissionFront;
|
||||
}
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getEmission()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getEmission()."<< std::endl;
|
||||
return _emissionFront;
|
||||
}
|
||||
|
||||
@ -245,7 +245,7 @@ void Material::setShininess( const Face face, float shininess )
|
||||
_shininessBack = shininess;
|
||||
break;
|
||||
default:
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setShininess()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::setShininess()."<< std::endl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -262,12 +262,12 @@ const float Material::getShininess(const Face face) const
|
||||
case(FRONT_AND_BACK):
|
||||
if (!_shininessFrontAndBack)
|
||||
{
|
||||
notify(NOTICE)<<"Notice: Material::getShininess(FRONT_AND_BACK) called on material "<<endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK shininess colors."<<endl;
|
||||
notify(NOTICE)<<"Notice: Material::getShininess(FRONT_AND_BACK) called on material "<< std::endl;
|
||||
notify(NOTICE)<<" with seperate FRONT and BACK shininess colors."<< std::endl;
|
||||
}
|
||||
return _shininessFront;
|
||||
}
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getShininess()."<<endl;
|
||||
notify(NOTICE)<<"Notice: invalid Face passed to Material::getShininess()."<< std::endl;
|
||||
return _shininessFront;
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@ bool Matrix::invert( const Matrix& _m )
|
||||
|
||||
if ( fabs( pivot) <= 1e-20)
|
||||
{
|
||||
notify(WARN) << "*** pivot = %f in mat_inv. ***"<<endl;
|
||||
notify(WARN) << "*** pivot = %f in mat_inv. ***"<<std::endl;
|
||||
//abort( 0);
|
||||
return false;
|
||||
}
|
||||
@ -409,7 +409,7 @@ bool Matrix::invertAffine( const Matrix& _m )
|
||||
|
||||
if( (det_1 == 0.0) || (fabs(det_1/(pos-neg)) < PRECISION_LIMIT )) {
|
||||
// _m has no inverse
|
||||
notify(WARN) << "Matrix::invert(): Matrix has no inverse." << endl;
|
||||
notify(WARN) << "Matrix::invert(): Matrix has no inverse." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <string>
|
||||
|
||||
osg::NotifySeverity osg::g_NotifyLevel = osg::NOTICE;
|
||||
ofstream *osg::g_NotifyNulStream;
|
||||
std::ofstream *osg::g_NotifyNulStream;
|
||||
bool osg::g_NotifyInit = false;
|
||||
|
||||
void osg::setNotifyLevel(osg::NotifySeverity severity)
|
||||
@ -27,9 +27,9 @@ bool osg::initNotifyLevel()
|
||||
|
||||
// set up global notify null stream for inline notify
|
||||
#ifdef WIN32
|
||||
g_NotifyNulStream = new ofstream ("nul");
|
||||
g_NotifyNulStream = new std::ofstream ("nul");
|
||||
#else
|
||||
g_NotifyNulStream = new ofstream ("/dev/null");
|
||||
g_NotifyNulStream = new std::ofstream ("/dev/null");
|
||||
#endif
|
||||
|
||||
// g_NotifyLevel
|
||||
|
@ -49,7 +49,7 @@ const PolygonMode::Mode PolygonMode::getMode(const Face face) const
|
||||
case(FRONT_AND_BACK):
|
||||
return _modeFront;
|
||||
}
|
||||
notify(WARN)<<"Warning : invalid Face passed to PolygonMode::getMode(Face face)"<<endl;
|
||||
notify(WARN)<<"Warning : invalid Face passed to PolygonMode::getMode(Face face)"<<std::endl;
|
||||
return _modeFront;
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ void Quat::makeRotate( const Vec3& from, const Vec3& to )
|
||||
// Get the angle of rotation and axis of this Quat object.
|
||||
// Won't give very meaningful results if the Quat is not associated
|
||||
// with a rotation!
|
||||
void Quat::getRot( float& angle, Vec3& vec ) const
|
||||
void Quat::getRotate( float& angle, Vec3& vec ) const
|
||||
{
|
||||
float sinhalfangle = sqrt( _fv[0]*_fv[0] + _fv[1]*_fv[1] + _fv[2]*_fv[2] );
|
||||
/// float coshalfangle = _fv[3];
|
||||
@ -112,7 +112,7 @@ void Quat::getRot( float& angle, Vec3& vec ) const
|
||||
}
|
||||
|
||||
|
||||
void Quat::getRot( float& angle, float& x, float& y, float& z ) const
|
||||
void Quat::getRotate( float& angle, float& x, float& y, float& z ) const
|
||||
{
|
||||
float sinhalfangle = sqrt( _fv[0]*_fv[0] + _fv[1]*_fv[1] + _fv[2]*_fv[2] );
|
||||
|
||||
|
@ -26,7 +26,7 @@ void TexGen::setPlane(const Coord which, const Vec4& plane)
|
||||
case T : _plane_t = plane; break;
|
||||
case R : _plane_r = plane; break;
|
||||
case Q : _plane_q = plane; break;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed TexGen::setPlane("<<(unsigned int)which<<","<<plane<<")"<<endl; break;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed TexGen::setPlane("<<(unsigned int)which<<","<<plane<<")"<<std::endl; break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ const Vec4& TexGen::getPlane(const Coord which) const
|
||||
case T : return _plane_t;
|
||||
case R : return _plane_r;
|
||||
case Q : return _plane_q;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed TexGen::getPlane(which)"<<endl; return _plane_r;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed TexGen::getPlane(which)"<<std::endl; return _plane_r;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ void Texture::setWrap(const WrapParameter which, const WrapMode wrap)
|
||||
case WRAP_S : _wrap_s = wrap; break;
|
||||
case WRAP_T : _wrap_t = wrap; break;
|
||||
case WRAP_R : _wrap_r = wrap; break;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::setWrap("<<(unsigned int)which<<","<<(unsigned int)wrap<<")"<<endl; break;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::setWrap("<<(unsigned int)which<<","<<(unsigned int)wrap<<")"<<std::endl; break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ const Texture::WrapMode Texture::getWrap(const WrapParameter which) const
|
||||
case WRAP_S : return _wrap_s;
|
||||
case WRAP_T : return _wrap_t;
|
||||
case WRAP_R : return _wrap_r;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::getWrap(which)"<<endl; return _wrap_s;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::getWrap(which)"<<std::endl; return _wrap_s;
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ void Texture::setFilter(const FilterParameter which, const FilterMode filter)
|
||||
{
|
||||
case MIN_FILTER : _min_filter = filter; break;
|
||||
case MAG_FILTER : _mag_filter = filter; break;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::setFilter("<<(unsigned int)which<<","<<(unsigned int)filter<<")"<<endl; break;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::setFilter("<<(unsigned int)which<<","<<(unsigned int)filter<<")"<<std::endl; break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,7 +151,7 @@ const Texture::FilterMode Texture::getFilter(const FilterParameter which) const
|
||||
{
|
||||
case MIN_FILTER : return _min_filter;
|
||||
case MAG_FILTER : return _mag_filter;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::getFilter(which)"<<endl; return _min_filter;
|
||||
default : notify(WARN)<<"Error: invalid 'which' passed Texture::getFilter(which)"<< std::endl; return _min_filter;
|
||||
}
|
||||
}
|
||||
|
||||
@ -539,7 +539,7 @@ void Texture::copyTexImage2D(State& state, int x, int y, int width, int height )
|
||||
_textureWidth = width;
|
||||
_textureHeight = height;
|
||||
|
||||
// cout<<"copyTexImage2D x="<<x<<" y="<<y<<" w="<<width<<" h="<<height<<endl;
|
||||
// cout<<"copyTexImage2D x="<<x<<" y="<<y<<" w="<<width<<" h="<<height<< std::endl;
|
||||
|
||||
// inform state that this texture is the current one bound.
|
||||
state.have_applied(this);
|
||||
|
@ -42,12 +42,12 @@ DynamicLibrary* DynamicLibrary::loadLibrary(const std::string& libraryName)
|
||||
#ifdef WIN32
|
||||
HANDLE handle = LoadLibrary( fullLibraryName );
|
||||
if (handle) return new DynamicLibrary(libraryName,handle);
|
||||
notify(WARN) << "DynamicLibrary::failed loading "<<fullLibraryName<<endl;
|
||||
notify(WARN) << "DynamicLibrary::failed loading "<<fullLibraryName<<std::endl;
|
||||
#elif !defined(macintosh)
|
||||
HANDLE handle = dlopen( fullLibraryName, RTLD_LAZY );
|
||||
if (handle) return new DynamicLibrary(libraryName,handle);
|
||||
notify(WARN) << "DynamicLibrary::failed loading "<<fullLibraryName<<endl;
|
||||
notify(WARN) << "DynamicLibrary::error "<<dlerror()<<endl;
|
||||
notify(WARN) << "DynamicLibrary::failed loading "<<fullLibraryName<<std::endl;
|
||||
notify(WARN) << "DynamicLibrary::error "<<dlerror()<<std::endl;
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ void FieldReader::_copy(const FieldReader& ic)
|
||||
}
|
||||
|
||||
|
||||
void FieldReader::attach(istream* input)
|
||||
void FieldReader::attach(std::istream* input)
|
||||
{
|
||||
_fin = input;
|
||||
|
||||
|
@ -96,7 +96,7 @@ void FieldReaderIterator::_copy(const FieldReaderIterator& ic)
|
||||
}
|
||||
|
||||
|
||||
void FieldReaderIterator::attach(istream* input)
|
||||
void FieldReaderIterator::attach(std::istream* input)
|
||||
{
|
||||
_reader.attach(input);
|
||||
}
|
||||
|
@ -74,12 +74,12 @@ void osgDB::initFilePath( void )
|
||||
char *ptr;
|
||||
if( (ptr = getenv( "OSGFILEPATH" )) )
|
||||
{
|
||||
notify(DEBUG_INFO) << "osgDB::Init("<<ptr<<")"<<endl;
|
||||
notify(DEBUG_INFO) << "osgDB::Init("<<ptr<<")"<<std::endl;
|
||||
setFilePath( ptr );
|
||||
}
|
||||
else
|
||||
{
|
||||
notify(DEBUG_INFO) << "osgDB::Init(NULL)"<<endl;
|
||||
notify(DEBUG_INFO) << "osgDB::Init(NULL)"<<std::endl;
|
||||
}
|
||||
s_filePathInitialized = true;
|
||||
}
|
||||
@ -89,7 +89,7 @@ void osgDB::setFilePath( const char *_path )
|
||||
{
|
||||
char buff[1024];
|
||||
|
||||
notify(DEBUG_INFO) << "In osgDB::setFilePath("<<_path<<")"<<endl;
|
||||
notify(DEBUG_INFO) << "In osgDB::setFilePath("<<_path<<")"<<std::endl;
|
||||
|
||||
buff[0] = 0;
|
||||
|
||||
@ -145,8 +145,8 @@ char *osgDB::findFileInPath( const char *_file, const char * filePath )
|
||||
|
||||
::free(tptr);
|
||||
|
||||
if (path) notify( DEBUG_INFO ) << "FindFileInPath() : returning " << path << endl;
|
||||
else notify( DEBUG_INFO ) << "FindFileInPath() : returning NULL" << endl;
|
||||
if (path) notify( DEBUG_INFO ) << "FindFileInPath() : returning " << path << std::endl;
|
||||
else notify( DEBUG_INFO ) << "FindFileInPath() : returning NULL" << std::endl;
|
||||
|
||||
return path;
|
||||
#endif
|
||||
@ -263,7 +263,7 @@ char *osgDB::findDSO( const char *name )
|
||||
|
||||
if ((ptr = getenv( "PATH" )))
|
||||
{
|
||||
notify(DEBUG_INFO) << "PATH = "<<ptr<<endl;
|
||||
notify(DEBUG_INFO) << "PATH = "<<ptr<<std::endl;
|
||||
strcat( path, PathDelimitor );
|
||||
strcat( path, ptr );
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace osgDB;
|
||||
|
||||
Output::Output()
|
||||
@ -19,6 +20,10 @@ Output::Output(const char* name) : ofstream(name)
|
||||
_filename = name;
|
||||
}
|
||||
|
||||
Output::Output(const Output&) : ofstream() {}
|
||||
|
||||
Output& Output::operator = (const Output&) { return *this; }
|
||||
|
||||
Output::~Output()
|
||||
{
|
||||
}
|
||||
@ -104,13 +109,13 @@ const std::string Output::getFileNameForOutput(const std::string& filename) cons
|
||||
case(FULL_PATH):
|
||||
{
|
||||
// need to think about how best to implement this first...
|
||||
osg::notify(osg::WARN)<<"Warning: Output::getFileNameForOutput() does not support FULL_PATH yet."<<endl;
|
||||
osg::notify(osg::WARN)<<"Warning: Output::getFileNameForOutput() does not support FULL_PATH yet."<< std::endl;
|
||||
return filename;
|
||||
}
|
||||
case(RELATIVE_PATH):
|
||||
{
|
||||
// need to think about how best to implement this as well...
|
||||
osg::notify(osg::WARN)<<"Warning: Output::getFileNameForOutput() does not support RELATIVE_PATH yet."<<endl;
|
||||
osg::notify(osg::WARN)<<"Warning: Output::getFileNameForOutput() does not support RELATIVE_PATH yet."<< std::endl;
|
||||
return filename;
|
||||
}
|
||||
case(FILENAME_ONLY):
|
||||
|
@ -13,7 +13,7 @@ Object* osgDB::readObjectFile(const std::string& filename)
|
||||
{
|
||||
ReaderWriter::ReadResult rr = Registry::instance()->readObject(filename);
|
||||
if (rr.validObject()) return rr.takeObject();
|
||||
if (rr.error()) notify(WARN) << rr.message() << endl;
|
||||
if (rr.error()) notify(WARN) << rr.message() << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ Image* osgDB::readImageFile(const std::string& filename)
|
||||
{
|
||||
ReaderWriter::ReadResult rr = Registry::instance()->readImage(filename);
|
||||
if (rr.validImage()) return rr.takeImage();
|
||||
if (rr.error()) notify(WARN) << rr.message() << endl;
|
||||
if (rr.error()) notify(WARN) << rr.message() << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -31,6 +31,6 @@ Node* osgDB::readNodeFile(const std::string& filename)
|
||||
{
|
||||
ReaderWriter::ReadResult rr = Registry::instance()->readNode(filename);
|
||||
if (rr.validNode()) return rr.takeNode();
|
||||
if (rr.error()) notify(WARN) << rr.message() << endl;
|
||||
if (rr.error()) notify(WARN) << rr.message() << std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ class RegistryPtr
|
||||
// definition of the Registry
|
||||
Registry::Registry()
|
||||
{
|
||||
notify(INFO) << "Constructing osg::Registry"<<endl;
|
||||
notify(INFO) << "Constructing osg::Registry"<<std::endl;
|
||||
|
||||
_createNodeFromImage = true;
|
||||
_openingLibrary = false;
|
||||
@ -73,16 +73,16 @@ void Registry::addDotOsgWrapper(DotOsgWrapper* wrapper)
|
||||
{
|
||||
if (wrapper==0L) return;
|
||||
|
||||
if (_openingLibrary) notify(INFO) << "Opening Library : "<<endl;
|
||||
if (_openingLibrary) notify(INFO) << "Opening Library : "<< std::endl;
|
||||
|
||||
notify(INFO) << "osg::Registry::addDotOsgWrapper("<<wrapper->getName()<<")"<<endl;
|
||||
notify(INFO) << "osg::Registry::addDotOsgWrapper("<<wrapper->getName()<<")"<< std::endl;
|
||||
const DotOsgWrapper::Associates& assoc = wrapper->getAssociates();
|
||||
|
||||
for(DotOsgWrapper::Associates::const_iterator itr=assoc.begin();
|
||||
itr!=assoc.end();
|
||||
++itr)
|
||||
{
|
||||
notify(INFO) << " ("<<*itr<<")"<<endl;
|
||||
notify(INFO) << " ("<<*itr<<")"<< std::endl;
|
||||
}
|
||||
|
||||
const std::string& name = wrapper->getName();
|
||||
@ -111,7 +111,7 @@ void Registry::removeDotOsgWrapper(DotOsgWrapper* wrapper)
|
||||
{
|
||||
if (wrapper==0L) return;
|
||||
|
||||
//// notify(INFO) << "osg::Registry::removeReaderWriter();"<<endl;
|
||||
//// notify(INFO) << "osg::Registry::removeReaderWriter();"<< std::endl;
|
||||
|
||||
EraseMacro(_objectWrapperMap,wrapper);
|
||||
EraseMacro(_classNameWrapperMap,wrapper);
|
||||
@ -127,9 +127,9 @@ void Registry::addReaderWriter(ReaderWriter* rw)
|
||||
{
|
||||
if (rw==0L) return;
|
||||
|
||||
if (_openingLibrary) notify(INFO) << "Opening Library : "<<endl;
|
||||
if (_openingLibrary) notify(INFO) << "Opening Library : "<< std::endl;
|
||||
|
||||
notify(INFO) << "osg::Registry::addReaderWriter("<<rw->className()<<")"<<endl;
|
||||
notify(INFO) << "osg::Registry::addReaderWriter("<<rw->className()<<")"<< std::endl;
|
||||
|
||||
_rwList.push_back(rw);
|
||||
|
||||
@ -140,7 +140,7 @@ void Registry::removeReaderWriter(ReaderWriter* rw)
|
||||
{
|
||||
if (rw==0L) return;
|
||||
|
||||
// notify(INFO) << "osg::Registry::removeReaderWriter();"<<endl;
|
||||
// notify(INFO) << "osg::Registry::removeReaderWriter();"<< std::endl;
|
||||
|
||||
ReaderWriterList::iterator rwitr = std::find(_rwList.begin(),_rwList.end(),rw);
|
||||
if (rwitr!=_rwList.end())
|
||||
@ -260,7 +260,7 @@ osg::Object* Registry::readObjectOfType(const osg::Object& compObj,Input& fr)
|
||||
const osg::Object* proto = wrapper->getPrototype();
|
||||
if (proto==NULL)
|
||||
{
|
||||
osg::notify(osg::WARN)<<"Token "<<fr[0].getStr()<<" read, but has no prototype, cannot load."<<endl;
|
||||
osg::notify(osg::WARN)<<"Token "<<fr[0].getStr()<<" read, but has no prototype, cannot load."<< std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -333,7 +333,7 @@ osg::Object* Registry::readObject(DotOsgWrapperMap& dowMap,Input& fr)
|
||||
const osg::Object* proto = wrapper->getPrototype();
|
||||
if (proto==NULL)
|
||||
{
|
||||
osg::notify(osg::WARN)<<"Token "<<fr[0].getStr()<<" read, but has no prototype, cannot load."<<endl;
|
||||
osg::notify(osg::WARN)<<"Token "<<fr[0].getStr()<<" read, but has no prototype, cannot load."<< std::endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -497,7 +497,7 @@ bool Registry::writeObject(const osg::Object& obj,Output& fw)
|
||||
std::string uniqueID;
|
||||
if (fw.getUniqueIDForObject(&obj,uniqueID))
|
||||
{
|
||||
fw.indent() << "Use " << uniqueID << endl;
|
||||
fw.indent() << "Use " << uniqueID << std::endl;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -511,7 +511,7 @@ bool Registry::writeObject(const osg::Object& obj,Output& fw)
|
||||
DotOsgWrapper* wrapper = itr->second.get();
|
||||
const DotOsgWrapper::Associates& assoc = wrapper->getAssociates();
|
||||
|
||||
fw.indent() << wrapper->getName() << " {"<<endl;
|
||||
fw.indent() << wrapper->getName() << " {"<< std::endl;
|
||||
fw.moveIn();
|
||||
|
||||
|
||||
@ -521,7 +521,7 @@ bool Registry::writeObject(const osg::Object& obj,Output& fw)
|
||||
std::string uniqueID;
|
||||
fw.createUniqueIDForObject(&obj,uniqueID);
|
||||
fw.registerUniqueIDForObject(&obj,uniqueID);
|
||||
fw.indent() << "UniqueID " << uniqueID << endl;
|
||||
fw.indent() << "UniqueID " << uniqueID << std::endl;
|
||||
}
|
||||
|
||||
// read the local data by iterating through the associate
|
||||
@ -542,7 +542,7 @@ bool Registry::writeObject(const osg::Object& obj,Output& fw)
|
||||
}
|
||||
|
||||
fw.moveOut();
|
||||
fw.indent() << "}"<<endl;
|
||||
fw.indent() << "}"<< std::endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -778,7 +778,7 @@ ReaderWriter::ReadResult Registry::readNode(const std::string& fileName)
|
||||
|
||||
// now look for a plug-in to load the file.
|
||||
std::string libraryName = createLibraryNameForFile(fileName);
|
||||
notify(INFO) << "Now checking for plug-in "<<libraryName<<endl;
|
||||
notify(INFO) << "Now checking for plug-in "<<libraryName<< std::endl;
|
||||
if (loadLibrary(libraryName))
|
||||
{
|
||||
for(ReaderWriterList::iterator itr=_rwList.begin();
|
||||
|
@ -15,7 +15,7 @@ using namespace osgDB;
|
||||
bool osgDB::writeObjectFile(const Object& object,const std::string& filename)
|
||||
{
|
||||
ReaderWriter::WriteResult wr = Registry::instance()->writeObject(object,filename);
|
||||
if (wr.error()) notify(WARN) << wr.message() << endl;
|
||||
if (wr.error()) notify(WARN) << wr.message() << std::endl;
|
||||
return wr.success();
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ bool osgDB::writeObjectFile(const Object& object,const std::string& filename)
|
||||
bool osgDB::writeImageFile(const Image& image,const std::string& filename)
|
||||
{
|
||||
ReaderWriter::WriteResult wr = Registry::instance()->writeImage(image,filename);
|
||||
if (wr.error()) notify(WARN) << wr.message() << endl;
|
||||
if (wr.error()) notify(WARN) << wr.message() << std::endl;
|
||||
return wr.success();
|
||||
}
|
||||
|
||||
@ -31,6 +31,6 @@ bool osgDB::writeImageFile(const Image& image,const std::string& filename)
|
||||
bool osgDB::writeNodeFile(const Node& node,const std::string& filename)
|
||||
{
|
||||
ReaderWriter::WriteResult wr = Registry::instance()->writeNode(node,filename);
|
||||
if (wr.error()) notify(WARN) << wr.message() << endl;
|
||||
if (wr.error()) notify(WARN) << wr.message() << std::endl;
|
||||
return wr.success();
|
||||
}
|
||||
|
@ -114,10 +114,10 @@ Viewer::Viewer()
|
||||
|
||||
_saveFileName = "saved_model.osg";
|
||||
|
||||
osg::notify(osg::INFO)<<"Scene Graph Viewer (sgv)"<<endl;
|
||||
osg::notify(osg::INFO)<<"Scene Graph Viewer (sgv)"<< std::endl;
|
||||
|
||||
// osg::notify(osg::INFO)<<" '"<<osgGetLibraryName()<<"' Version "<<osgGetVersion()<<endl;
|
||||
// osg::notify(osg::INFO)<<" '"<<osgUtilGetLibraryName()<<"' Version "<<osgUtilGetVersion()<<endl;
|
||||
// osg::notify(osg::INFO)<<" '"<<osgGetLibraryName()<<"' Version "<<osgGetVersion()<< std::endl;
|
||||
// osg::notify(osg::INFO)<<" '"<<osgUtilGetLibraryName()<<"' Version "<<osgUtilGetVersion()<< std::endl;
|
||||
|
||||
_initialTick = _timer.tick();
|
||||
_frameTick = _initialTick;
|
||||
@ -143,11 +143,11 @@ Viewer::~Viewer()
|
||||
bool Viewer::open()
|
||||
{
|
||||
if ( _is_open ) {
|
||||
osg::notify(osg::NOTICE)<<"osgGLUT::Viewer::open() called with window already open."<<endl;
|
||||
osg::notify(osg::NOTICE)<<"osgGLUT::Viewer::open() called with window already open."<< std::endl;
|
||||
return false;
|
||||
}
|
||||
if ( getNumViewports() <= 0 ) {
|
||||
osg::notify(osg::FATAL)<<"osgGLUT::Viewer::open() called with no Viewports registered."<<endl;
|
||||
osg::notify(osg::FATAL)<<"osgGLUT::Viewer::open() called with no Viewports registered."<< std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -160,8 +160,8 @@ bool Viewer::open()
|
||||
{
|
||||
if (itr->_cameraManipList.empty())
|
||||
{
|
||||
osg::notify(osg::NOTICE)<<"osgGLUT::Viewer::open() called without any camara manipulators registered for a viewport,"<<endl;
|
||||
osg::notify(osg::NOTICE)<<"automatically registering trackball,flight and drive manipulators."<<endl;
|
||||
osg::notify(osg::NOTICE)<<"osgGLUT::Viewer::open() called without any camara manipulators registered for a viewport,"<< std::endl;
|
||||
osg::notify(osg::NOTICE)<<"automatically registering trackball,flight and drive manipulators."<< std::endl;
|
||||
registerCameraManipulator(new osgUtil::TrackballManipulator, index);
|
||||
registerCameraManipulator(new osgUtil::FlightManipulator, index);
|
||||
registerCameraManipulator(new osgUtil::DriveManipulator, index);
|
||||
@ -196,7 +196,7 @@ bool Viewer::open()
|
||||
|
||||
if (itr->_cameraManipulator->handle(*ea,*this))
|
||||
{
|
||||
// osg::notify(osg::INFO) << "Handled reshape "<<endl;
|
||||
// osg::notify(osg::INFO) << "Handled reshape "<< std::endl;
|
||||
}
|
||||
|
||||
if (sceneView->getStereoMode()==osgUtil::SceneView::QUAD_BUFFER_STEREO) needQuadBufferStereo = true;
|
||||
@ -252,15 +252,15 @@ bool Viewer::open()
|
||||
displayMode |= GLUT_MULTISAMPLE;
|
||||
|
||||
|
||||
osg::notify(osg::INFO) <<"osgGLUT::Viewer::open() requesting displayMode = "<<displayMode<<endl;
|
||||
if (displayMode & GLUT_DOUBLE) osg::notify(osg::INFO)<<" requesting GLUT_DOUBLE."<<endl;
|
||||
if (displayMode & GLUT_SINGLE) osg::notify(osg::INFO)<<" requesting GLUT_SINGLE."<<endl;
|
||||
if (displayMode & GLUT_RGB) osg::notify(osg::INFO)<<" requesting GLUT_RGB."<<endl;
|
||||
if (displayMode & GLUT_DEPTH) osg::notify(osg::INFO)<<" requesting GLUT_DEPTH."<<endl;
|
||||
if (displayMode & GLUT_ALPHA) osg::notify(osg::INFO)<<" requesting GLUT_ALPHA."<<endl;
|
||||
if (displayMode & GLUT_STENCIL) osg::notify(osg::INFO)<<" requesting GLUT_STENCIL."<<endl;
|
||||
if (displayMode & GLUT_MULTISAMPLE) osg::notify(osg::INFO)<<" requesting GLUT_MULTISAMPLE."<<endl;
|
||||
if (displayMode & GLUT_STEREO) osg::notify(osg::INFO)<<" requesting GLUT_STEREO."<<endl;
|
||||
osg::notify(osg::INFO) <<"osgGLUT::Viewer::open() requesting displayMode = "<<displayMode<< std::endl;
|
||||
if (displayMode & GLUT_DOUBLE) osg::notify(osg::INFO)<<" requesting GLUT_DOUBLE."<< std::endl;
|
||||
if (displayMode & GLUT_SINGLE) osg::notify(osg::INFO)<<" requesting GLUT_SINGLE."<< std::endl;
|
||||
if (displayMode & GLUT_RGB) osg::notify(osg::INFO)<<" requesting GLUT_RGB."<< std::endl;
|
||||
if (displayMode & GLUT_DEPTH) osg::notify(osg::INFO)<<" requesting GLUT_DEPTH."<< std::endl;
|
||||
if (displayMode & GLUT_ALPHA) osg::notify(osg::INFO)<<" requesting GLUT_ALPHA."<< std::endl;
|
||||
if (displayMode & GLUT_STENCIL) osg::notify(osg::INFO)<<" requesting GLUT_STENCIL."<< std::endl;
|
||||
if (displayMode & GLUT_MULTISAMPLE) osg::notify(osg::INFO)<<" requesting GLUT_MULTISAMPLE."<< std::endl;
|
||||
if (displayMode & GLUT_STEREO) osg::notify(osg::INFO)<<" requesting GLUT_STEREO."<< std::endl;
|
||||
|
||||
glutInitDisplayMode( displayMode);
|
||||
|
||||
@ -329,7 +329,7 @@ void Viewer::requestWarpPointer(int x,int y)
|
||||
{
|
||||
// glutWarpPointer core dumps if invoked before a GLUT window is open
|
||||
if ( !_is_open ) {
|
||||
osg::notify(osg::INFO)<<"osgGLUT::Viewer::requestWarpPointer() called with window closed; ignored."<<endl;
|
||||
osg::notify(osg::INFO)<<"osgGLUT::Viewer::requestWarpPointer() called with window closed; ignored."<< std::endl;
|
||||
return;
|
||||
}
|
||||
glutWarpPointer(x,y);
|
||||
@ -347,7 +347,7 @@ float Viewer::app(unsigned int viewport)
|
||||
|
||||
if (_viewportList[viewport]._cameraManipulator->handle(*ea,*this))
|
||||
{
|
||||
// osg::notify(osg::INFO) << "Handled update frame"<<endl;
|
||||
// osg::notify(osg::INFO) << "Handled update frame"<< std::endl;
|
||||
}
|
||||
|
||||
// do app traversal.
|
||||
@ -536,11 +536,11 @@ void Viewer::showStats(const unsigned int viewport)
|
||||
sprintf(clin,"Frame %.1f ms.", timeFrame);
|
||||
displaytext((int)(.75*tmax),(int)(0.98f*vh),clin);
|
||||
|
||||
/* osg::notify(osg::NOTICE) << "Time of App "<<timeApp<<"ms "<<endl;
|
||||
osg::notify(osg::NOTICE) << "Time of Cull "<<timeCull<<"ms "<<endl;
|
||||
osg::notify(osg::NOTICE) << "Time of Draw "<<timeDraw<<"ms "<<endl;
|
||||
osg::notify(osg::NOTICE) << "Frame time "<<frameTime<<endl;
|
||||
osg::notify(osg::NOTICE) << "frameRate() = "<<frameRate()<<endl;*/
|
||||
/* osg::notify(osg::NOTICE) << "Time of App "<<timeApp<<"ms "<< std::endl;
|
||||
osg::notify(osg::NOTICE) << "Time of Cull "<<timeCull<<"ms "<< std::endl;
|
||||
osg::notify(osg::NOTICE) << "Time of Draw "<<timeDraw<<"ms "<< std::endl;
|
||||
osg::notify(osg::NOTICE) << "Frame time "<<frameTime<< std::endl;
|
||||
osg::notify(osg::NOTICE) << "frameRate() = "<<frameRate()<< std::endl;*/
|
||||
|
||||
glLineWidth(2.0f);
|
||||
glBegin(GL_LINE_LOOP );
|
||||
@ -622,7 +622,7 @@ void Viewer::showStats(const unsigned int viewport)
|
||||
for (int i=0; i<nbinsUsed; i++) {
|
||||
primStats[i].setType(Statistics::STAT_PRIMSPERBIN); // cuts out vertices & triangles to save space on screen
|
||||
ntop+=writePrims((int)(0.96f*vh-ntop),primStats[i]);
|
||||
osg::notify(osg::INFO) << "ntop "<< ntop<<endl;
|
||||
osg::notify(osg::INFO) << "ntop "<< ntop<< std::endl;
|
||||
}
|
||||
maxbins=(primStats[0].getBins()>maxbins)?primStats[0].getBins():maxbins;
|
||||
delete [] primStats; // free up
|
||||
@ -725,7 +725,7 @@ void Viewer::display()
|
||||
}
|
||||
|
||||
glutSwapBuffers(); // moved after draw of stats & glFinish() to get accurate timing (excluding stat draw!)
|
||||
// cout << "Time elapsed "<<_timer.delta_s(_initialTick,_timer.tick())<<endl;
|
||||
// cout << "Time elapsed "<<_timer.delta_s(_initialTick,_timer.tick())<< std::endl;
|
||||
|
||||
if (_printStats>1) glFinish();
|
||||
|
||||
@ -758,7 +758,7 @@ void Viewer::reshape(GLint w, GLint h)
|
||||
|
||||
if (itr->_cameraManipulator->handle(*ea,*this))
|
||||
{
|
||||
// osg::notify(osg::INFO) << "Handled reshape "<<endl;
|
||||
// osg::notify(osg::INFO) << "Handled reshape "<< std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -780,7 +780,7 @@ void Viewer::mouseMotion(int x, int y)
|
||||
|
||||
if (_viewportList[_focusedViewport]._cameraManipulator->handle(*ea,*this))
|
||||
{
|
||||
// osg::notify(osg::INFO) << "Handled mouseMotion "<<ea->_buttonMask<<" x="<<ea->_mx<<" y="<<ea->_my<<endl;
|
||||
// osg::notify(osg::INFO) << "Handled mouseMotion "<<ea->_buttonMask<<" x="<<ea->_mx<<" y="<<ea->_my<< std::endl;
|
||||
}
|
||||
|
||||
mx = x;
|
||||
@ -804,7 +804,7 @@ void Viewer::mousePassiveMotion(int x, int y)
|
||||
|
||||
if (_viewportList[_focusedViewport]._cameraManipulator->handle(*ea,*this))
|
||||
{
|
||||
// osg::notify(osg::INFO) << "Handled mousePassiveMotion "<<ea->_buttonMask<<" x="<<ea->_mx<<" y="<<ea->_my<<endl;
|
||||
// osg::notify(osg::INFO) << "Handled mousePassiveMotion "<<ea->_buttonMask<<" x="<<ea->_mx<<" y="<<ea->_my<< std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -828,7 +828,7 @@ void Viewer::mouse(int button, int state, int x, int y)
|
||||
|
||||
if (_viewportList[_focusedViewport]._cameraManipulator->handle(*ea,*this))
|
||||
{
|
||||
// osg::notify(osg::INFO) << "Handled mouse "<<ea->_buttonMask<<" x="<<ea->_mx<<" y="<<ea->_my<<endl;
|
||||
// osg::notify(osg::INFO) << "Handled mouse "<<ea->_buttonMask<<" x="<<ea->_mx<<" y="<<ea->_my<< std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
@ -900,7 +900,7 @@ void Viewer::keyboard(unsigned char key, int x, int y)
|
||||
// OpenGL display lists.
|
||||
osgUtil::DisplayListVisitor dlv(osgUtil::DisplayListVisitor::SWITCH_ON_DISPLAY_LISTS);
|
||||
sceneView->getSceneData()->accept(dlv);
|
||||
osg::notify(osg::NOTICE) << "Switched on use of OpenGL Display Lists."<<endl;
|
||||
osg::notify(osg::NOTICE) << "Switched on use of OpenGL Display Lists."<< std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -908,7 +908,7 @@ void Viewer::keyboard(unsigned char key, int x, int y)
|
||||
// OpenGL display lists.
|
||||
osgUtil::DisplayListVisitor dlv(osgUtil::DisplayListVisitor::SWITCH_OFF_DISPLAY_LISTS);
|
||||
sceneView->getSceneData()->accept(dlv);
|
||||
osg::notify(osg::NOTICE) << "Switched off use of OpenGL Display Lists."<<endl;
|
||||
osg::notify(osg::NOTICE) << "Switched off use of OpenGL Display Lists."<< std::endl;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -941,20 +941,20 @@ void Viewer::keyboard(unsigned char key, int x, int y)
|
||||
|
||||
case 'S' :
|
||||
{
|
||||
osg::notify(osg::NOTICE) << "Smoothing scene..."<<endl;
|
||||
osg::notify(osg::NOTICE) << "Smoothing scene..."<< std::endl;
|
||||
osgUtil::SmoothingVisitor sv;
|
||||
sceneView->getSceneData()->accept(sv);
|
||||
osg::notify(osg::NOTICE) << "Smoothed scene."<<endl;
|
||||
osg::notify(osg::NOTICE) << "Smoothed scene."<< std::endl;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'R' :
|
||||
{
|
||||
osg::notify(osg::NOTICE) << "Tri Striping scene..."<<endl;
|
||||
osg::notify(osg::NOTICE) << "Tri Striping scene..."<< std::endl;
|
||||
osgUtil::TriStripVisitor tsv;
|
||||
sceneView->getSceneData()->accept(tsv);
|
||||
osg::notify(osg::NOTICE) << "Tri Striping scene scene."<<endl;
|
||||
osg::notify(osg::NOTICE) << "Tri Striping scene scene."<< std::endl;
|
||||
}
|
||||
|
||||
break;
|
||||
@ -1037,7 +1037,7 @@ void Viewer::keyboard(unsigned char key, int x, int y)
|
||||
case 'o' :
|
||||
if (sceneView->getSceneData() && osgDB::writeNodeFile(*sceneView->getSceneData(), _saveFileName))
|
||||
{
|
||||
osg::notify(osg::NOTICE) << "Saved scene to '"<<_saveFileName<<"'"<<endl;
|
||||
osg::notify(osg::NOTICE) << "Saved scene to '"<<_saveFileName<<"'"<< std::endl;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1048,11 +1048,11 @@ void Viewer::keyboard(unsigned char key, int x, int y)
|
||||
(_viewFrustumCullingActive ? osgUtil::CullViewState::VIEW_FRUSTUM_CULLING : osgUtil::CullViewState::NO_CULLING)));
|
||||
if (_smallFeatureCullingActive)
|
||||
{
|
||||
osg::notify(osg::NOTICE) << "Small feature culling switched on "<<endl;
|
||||
osg::notify(osg::NOTICE) << "Small feature culling switched on "<< std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::NOTICE) << "Small feature culling switched off "<<endl;
|
||||
osg::notify(osg::NOTICE) << "Small feature culling switched off "<< std::endl;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1060,11 +1060,11 @@ void Viewer::keyboard(unsigned char key, int x, int y)
|
||||
_viewFrustumCullingActive = !_viewFrustumCullingActive;
|
||||
if (_viewFrustumCullingActive)
|
||||
{
|
||||
osg::notify(osg::NOTICE) << "View frustum culling switched on "<<endl;
|
||||
osg::notify(osg::NOTICE) << "View frustum culling switched on "<< std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::NOTICE) << "View frustum culling switched off "<<endl;
|
||||
osg::notify(osg::NOTICE) << "View frustum culling switched off "<< std::endl;
|
||||
}
|
||||
sceneView->getCullVisitor()->setCullingMode((osgUtil::CullViewState::CullingMode)
|
||||
((_smallFeatureCullingActive ? osgUtil::CullViewState::SMALL_FEATURE_CULLING : osgUtil::CullViewState::NO_CULLING) |
|
||||
@ -1075,11 +1075,11 @@ void Viewer::keyboard(unsigned char key, int x, int y)
|
||||
sceneView->setPrioritizeTextures(!sceneView->getPrioritizeTextures());
|
||||
if (sceneView->getPrioritizeTextures())
|
||||
{
|
||||
osg::notify(osg::NOTICE) << "Prioritize textures switched on "<<endl;
|
||||
osg::notify(osg::NOTICE) << "Prioritize textures switched on "<< std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
osg::notify(osg::NOTICE) << "Prioritize textures switched off "<<endl;
|
||||
osg::notify(osg::NOTICE) << "Prioritize textures switched off "<< std::endl;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1091,18 +1091,18 @@ void Viewer::keyboard(unsigned char key, int x, int y)
|
||||
case 'i' :
|
||||
case 'r' :
|
||||
{
|
||||
osg::notify(osg::NOTICE) << "***** Intersecting **************"<< endl;
|
||||
osg::notify(osg::NOTICE) << "***** Intersecting **************"<< std::endl;
|
||||
|
||||
osg::Vec3 near_point,far_point;
|
||||
if (!sceneView->projectWindowXYIntoObject(x,wh-y,near_point,far_point))
|
||||
{
|
||||
osg::notify(osg::NOTICE) << "Failed to calculate intersection ray."<<endl;
|
||||
osg::notify(osg::NOTICE) << "Failed to calculate intersection ray."<< std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
osg::ref_ptr<osg::LineSegment> LineSegment = new osg::LineSegment;
|
||||
LineSegment->set(near_point,far_point);
|
||||
osg::notify(osg::NOTICE) << "start("<<LineSegment->start()<<") end("<<LineSegment->end()<<")"<<endl;
|
||||
osg::notify(osg::NOTICE) << "start("<<LineSegment->start()<<") end("<<LineSegment->end()<<")"<< std::endl;
|
||||
|
||||
osgUtil::IntersectVisitor iv;
|
||||
iv.addLineSegment(LineSegment.get());
|
||||
@ -1113,7 +1113,7 @@ void Viewer::keyboard(unsigned char key, int x, int y)
|
||||
|
||||
float endTime = clockSeconds();
|
||||
|
||||
osg::notify(osg::NOTICE) << "Time for interesection = "<<(endTime-startTime)*1000<<"ms"<<endl;
|
||||
osg::notify(osg::NOTICE) << "Time for interesection = "<<(endTime-startTime)*1000<<"ms"<< std::endl;
|
||||
|
||||
if (iv.hits())
|
||||
{
|
||||
@ -1125,28 +1125,28 @@ void Viewer::keyboard(unsigned char key, int x, int y)
|
||||
osg::Vec3 ip = hitr->_intersectPoint;
|
||||
osg::Vec3 in = hitr->_intersectNormal;
|
||||
osg::Geode* geode = hitr->_geode;
|
||||
osg::notify(osg::NOTICE) << " Itersection Point ("<<ip<<") Normal ("<<in<<")"<<endl;
|
||||
osg::notify(osg::NOTICE) << " Itersection Point ("<<ip<<") Normal ("<<in<<")"<< std::endl;
|
||||
if (hitr->_matrix)
|
||||
{
|
||||
osg::Vec3 ipEye = ip*(*(hitr->_matrix));
|
||||
osg::Vec3 inEye = (in+ip)*(*(hitr->_matrix))-ipEye;
|
||||
inEye.normalize();
|
||||
if (geode) osg::notify(osg::NOTICE) << "Geode '"<<geode->getName()<<endl;
|
||||
osg::notify(osg::NOTICE) << " Eye Itersection Point ("<<ipEye<<") Normal ("<<inEye<<")"<<endl;
|
||||
if (geode) osg::notify(osg::NOTICE) << "Geode '"<<geode->getName()<< std::endl;
|
||||
osg::notify(osg::NOTICE) << " Eye Itersection Point ("<<ipEye<<") Normal ("<<inEye<<")"<< std::endl;
|
||||
|
||||
}
|
||||
if (key=='r' && geode)
|
||||
{
|
||||
// remove geoset..
|
||||
osg::GeoSet* gset = hitr->_geoset;
|
||||
osg::notify(osg::NOTICE) << " geoset ("<<gset<<") "<<geode->removeDrawable(gset)<<")"<<endl;
|
||||
osg::notify(osg::NOTICE) << " geoset ("<<gset<<") "<<geode->removeDrawable(gset)<<")"<< std::endl;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
osg::notify(osg::NOTICE) << endl << endl;
|
||||
osg::notify(osg::NOTICE) << std::endl << std::endl;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1157,79 +1157,79 @@ void Viewer::keyboard(unsigned char key, int x, int y)
|
||||
}
|
||||
|
||||
|
||||
void Viewer::help(ostream& fout)
|
||||
void Viewer::help(std::ostream& fout)
|
||||
{
|
||||
|
||||
fout <<endl
|
||||
<<"Scene Graph Viewer (sgv) keyboard bindings:"<<endl
|
||||
<<endl
|
||||
<<"1 Select the trackball camera manipulator."<<endl
|
||||
<<" Left mouse button - rotate,"<<endl
|
||||
<<" Middle (or Left & Right) mouse button - pan,"<<endl
|
||||
<<" Right mouse button - zoom."<<endl
|
||||
<<"2 Select the flight camera manipulator."<<endl
|
||||
<<" Left mouse button - speed up,"<<endl
|
||||
<<" Middle (or Left & Right) mouse button - stop,"<<endl
|
||||
<<" Right mouse button - slow down, reverse."<<endl
|
||||
<<" Move mouse left to roll left, right to roll right."<<endl
|
||||
<<" Move mouse back (down) to pitch nose up, forward to pitch down."<<endl
|
||||
<<" In mode Q, the default, selected by pressing 'q'"<<endl
|
||||
<<" The flight path is yawed automatically into the turn to"<<endl
|
||||
<<" produce a similar effect as flying an aircaft."<<endl
|
||||
<<" In mode A, selected by pressing 'a'"<<endl
|
||||
<<" The flight path is not yawed automatically into the turn,"<<endl
|
||||
<<" producing a similar effect as space/marine flight."<<endl
|
||||
<<"3 Select the drive camera manipulator."<<endl
|
||||
<<" In mode Q, the default, selected by pressing 'q'"<<endl
|
||||
<<" Move mouse left to turn left, right to turn right."<<endl
|
||||
<<" Move mouse back (down) to reverse, forward to drive forward."<<endl
|
||||
<<" In mode A, selected by pressing 'a'"<<endl
|
||||
<<" Move mouse left to turn left, right to turn right."<<endl
|
||||
<<" Left mouse button - speed up,"<<endl
|
||||
<<" Middle (or Left & Right) mouse button - stop,"<<endl
|
||||
<<" Right mouse button - slow down, reverse."<<endl
|
||||
<<endl
|
||||
<<"+ Half the frame delay which speeds up the frame rate on Linux and Windows."<<endl
|
||||
<<"- Double the frame delay and therefore reduce the frame rate on Linux"<<endl
|
||||
<<" and Windows."<<endl
|
||||
<<endl
|
||||
<<"/ Divide the Level-Of-Detail (LOD) bias by 1.5, to encourage the"<<endl
|
||||
<<" selection of more complex LOD children."<<endl
|
||||
<<"* Multiple the Level-of-Detail (LOD) bias by 1.5, to encourage the"<<endl
|
||||
<<" selection of less complex LOD children."<<endl
|
||||
<<endl
|
||||
<<"c Toggle Small Feature Culling on or off."<<endl
|
||||
<<"C Toggle View Frustum Culling on or off."<<endl
|
||||
<<"d Toggle use of OpenGL's display lists."<<endl
|
||||
<<"b Toggle OpenGL's backface culling."<<endl
|
||||
<<"t Toggle OpenGL texturing on or off."<<endl
|
||||
<<"T Toggle OpenGL two-sided lighting on or off."<<endl
|
||||
<<"l Toggle OpenGL lighting on or off."<<endl
|
||||
<<"L Toggle SceneView lighting mode between HEADLIGHT, SKY_LIGHT"<<endl
|
||||
<<" and NO_SCENEVIEW_LIGHT."<<endl
|
||||
<<"s Toggle OpenGL shade model between flat and smooth shading."<<endl
|
||||
<<"S Apply osgUtil::SmoothingVisitor to the scene."<<endl
|
||||
<<"w Toggle OpenGL polygon mode between solid, wireframe and points modes."<<endl
|
||||
<<endl
|
||||
<<"i Calculate and report the intersections with the scene under the"<<endl
|
||||
<<" current mouse x and mouse y position."<<endl
|
||||
<<endl
|
||||
<<"r Calculate and report the intersections with the scene under the"<<endl
|
||||
<<" current mouse x and mouse y position and delete the nearest"<<endl
|
||||
<<" interesected geoset."<<endl
|
||||
<<endl
|
||||
<<"7 Set the background color to black."<<endl
|
||||
<<"8 Set the background color to blue."<<endl
|
||||
<<"9 Set the background color to white."<<endl
|
||||
<<endl
|
||||
<<"p Print frame rate statistics on each frame."<<endl
|
||||
<<"o Output the loaded scene to 'saved_model.osg'."<<endl
|
||||
<<"?/h Print out sgv's keyboard bindings."<<endl
|
||||
<<"f Toggle between fullscreen and the previous window size. Note, GLUT"<<endl
|
||||
<<" fullscreen works properly on Windows and Irix, but on Linux"<<endl
|
||||
<<" it just maximizes the window and leaves the window's borders."<<endl
|
||||
<<"Space Reset scene to the default view."<<endl
|
||||
<<"Esc Exit sgv."<<endl;
|
||||
fout << std::endl
|
||||
<<"Scene Graph Viewer (sgv) keyboard bindings:"<< std::endl
|
||||
<< std::endl
|
||||
<<"1 Select the trackball camera manipulator."<< std::endl
|
||||
<<" Left mouse button - rotate,"<< std::endl
|
||||
<<" Middle (or Left & Right) mouse button - pan,"<< std::endl
|
||||
<<" Right mouse button - zoom."<< std::endl
|
||||
<<"2 Select the flight camera manipulator."<< std::endl
|
||||
<<" Left mouse button - speed up,"<< std::endl
|
||||
<<" Middle (or Left & Right) mouse button - stop,"<< std::endl
|
||||
<<" Right mouse button - slow down, reverse."<< std::endl
|
||||
<<" Move mouse left to roll left, right to roll right."<< std::endl
|
||||
<<" Move mouse back (down) to pitch nose up, forward to pitch down."<< std::endl
|
||||
<<" In mode Q, the default, selected by pressing 'q'"<< std::endl
|
||||
<<" The flight path is yawed automatically into the turn to"<< std::endl
|
||||
<<" produce a similar effect as flying an aircaft."<< std::endl
|
||||
<<" In mode A, selected by pressing 'a'"<< std::endl
|
||||
<<" The flight path is not yawed automatically into the turn,"<< std::endl
|
||||
<<" producing a similar effect as space/marine flight."<< std::endl
|
||||
<<"3 Select the drive camera manipulator."<< std::endl
|
||||
<<" In mode Q, the default, selected by pressing 'q'"<< std::endl
|
||||
<<" Move mouse left to turn left, right to turn right."<< std::endl
|
||||
<<" Move mouse back (down) to reverse, forward to drive forward."<< std::endl
|
||||
<<" In mode A, selected by pressing 'a'"<< std::endl
|
||||
<<" Move mouse left to turn left, right to turn right."<< std::endl
|
||||
<<" Left mouse button - speed up,"<< std::endl
|
||||
<<" Middle (or Left & Right) mouse button - stop,"<< std::endl
|
||||
<<" Right mouse button - slow down, reverse."<< std::endl
|
||||
<< std::endl
|
||||
<<"+ Half the frame delay which speeds up the frame rate on Linux and Windows."<< std::endl
|
||||
<<"- Double the frame delay and therefore reduce the frame rate on Linux"<< std::endl
|
||||
<<" and Windows."<< std::endl
|
||||
<< std::endl
|
||||
<<"/ Divide the Level-Of-Detail (LOD) bias by 1.5, to encourage the"<< std::endl
|
||||
<<" selection of more complex LOD children."<< std::endl
|
||||
<<"* Multiple the Level-of-Detail (LOD) bias by 1.5, to encourage the"<< std::endl
|
||||
<<" selection of less complex LOD children."<< std::endl
|
||||
<< std::endl
|
||||
<<"c Toggle Small Feature Culling on or off."<< std::endl
|
||||
<<"C Toggle View Frustum Culling on or off."<< std::endl
|
||||
<<"d Toggle use of OpenGL's display lists."<< std::endl
|
||||
<<"b Toggle OpenGL's backface culling."<< std::endl
|
||||
<<"t Toggle OpenGL texturing on or off."<< std::endl
|
||||
<<"T Toggle OpenGL two-sided lighting on or off."<< std::endl
|
||||
<<"l Toggle OpenGL lighting on or off."<< std::endl
|
||||
<<"L Toggle SceneView lighting mode between HEADLIGHT, SKY_LIGHT"<< std::endl
|
||||
<<" and NO_SCENEVIEW_LIGHT."<< std::endl
|
||||
<<"s Toggle OpenGL shade model between flat and smooth shading."<< std::endl
|
||||
<<"S Apply osgUtil::SmoothingVisitor to the scene."<< std::endl
|
||||
<<"w Toggle OpenGL polygon mode between solid, wireframe and points modes."<< std::endl
|
||||
<< std::endl
|
||||
<<"i Calculate and report the intersections with the scene under the"<< std::endl
|
||||
<<" current mouse x and mouse y position."<< std::endl
|
||||
<< std::endl
|
||||
<<"r Calculate and report the intersections with the scene under the"<< std::endl
|
||||
<<" current mouse x and mouse y position and delete the nearest"<< std::endl
|
||||
<<" interesected geoset."<< std::endl
|
||||
<< std::endl
|
||||
<<"7 Set the background color to black."<< std::endl
|
||||
<<"8 Set the background color to blue."<< std::endl
|
||||
<<"9 Set the background color to white."<< std::endl
|
||||
<< std::endl
|
||||
<<"p Print frame rate statistics on each frame."<< std::endl
|
||||
<<"o Output the loaded scene to 'saved_model.osg'."<< std::endl
|
||||
<<"?/h Print out sgv's keyboard bindings."<< std::endl
|
||||
<<"f Toggle between fullscreen and the previous window size. Note, GLUT"<< std::endl
|
||||
<<" fullscreen works properly on Windows and Irix, but on Linux"<< std::endl
|
||||
<<" it just maximizes the window and leaves the window's borders."<< std::endl
|
||||
<<"Space Reset scene to the default view."<< std::endl
|
||||
<<"Esc Exit sgv."<< std::endl;
|
||||
}
|
||||
|
||||
|
||||
@ -1257,7 +1257,7 @@ osg::Timer_t Viewer::updateFrameTick()
|
||||
bool Viewer::run()
|
||||
{
|
||||
if (!_is_open) {
|
||||
osg::notify(osg::NOTICE)<<"osgGLUT::Viewer::run() called without window open. Opening window."<<endl;
|
||||
osg::notify(osg::NOTICE)<<"osgGLUT::Viewer::run() called without window open. Opening window."<< std::endl;
|
||||
if ( !open() )
|
||||
return false;
|
||||
}
|
||||
@ -1309,9 +1309,9 @@ void Viewer::addViewport(osg::Node* rootnode,
|
||||
|
||||
void Viewer::init(osg::Node* rootnode)
|
||||
{
|
||||
osg::notify(osg::WARN)<<"Warning - call to Viewer::init(osg::Node*) which is a deprecated method."<<endl;
|
||||
osg::notify(osg::WARN)<<" This should be replaced with Viewer::addViewport(osg::Node*)."<<endl;
|
||||
osg::notify(osg::WARN)<<" Automatically mapping init to addViewport."<<endl;
|
||||
osg::notify(osg::WARN)<<"Warning - call to Viewer::init(osg::Node*) which is a deprecated method."<< std::endl;
|
||||
osg::notify(osg::WARN)<<" This should be replaced with Viewer::addViewport(osg::Node*)."<< std::endl;
|
||||
osg::notify(osg::WARN)<<" Automatically mapping init to addViewport."<< std::endl;
|
||||
addViewport(rootnode);
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ GLUTWindow::~GLUTWindow()
|
||||
bool GLUTWindow::open()
|
||||
{
|
||||
if ( _is_open ) {
|
||||
osg::notify(osg::NOTICE)<<"osgGLUT::GLUTWindow::open() called with window already open."<<endl;
|
||||
osg::notify(osg::NOTICE)<<"osgGLUT::GLUTWindow::open() called with window already open."<< std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ void GLUTWindow::keyboard(unsigned char key, int x, int y)
|
||||
bool GLUTWindow::run()
|
||||
{
|
||||
if (!_is_open) {
|
||||
osg::notify(osg::NOTICE)<<"osgGLUT::GLUTWindow::run() called without window open. Opening window."<<endl;
|
||||
osg::notify(osg::NOTICE)<<"osgGLUT::GLUTWindow::run() called without window open. Opening window."<< std::endl;
|
||||
if ( !open() )
|
||||
return false;
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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 :-(
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 << " "
|
||||
|
@ -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();
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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));
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user