Fixes to Windows build in liu of the move to using just std::streams.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user