clean namedentity, forward declarations, ostream_write

This commit is contained in:
Garux
2018-02-22 18:56:53 +03:00
parent 327fa13d54
commit eae7ac024a
17 changed files with 26 additions and 122 deletions
+14
View File
@@ -205,8 +205,22 @@ typedef BasicVector2<float> Vector2;
/// \brief A 3-element vector stored in single-precision floating-point.
typedef BasicVector3<float> Vector3;
/// \brief A 3-element vector stored in double-precision floating-point.
typedef BasicVector3<double> DoubleVector3;
/// \brief A 4-element vector stored in single-precision floating-point.
typedef BasicVector4<float> Vector4;
template<typename TextOutputStreamType>
inline TextOutputStreamType& ostream_write( TextOutputStreamType& outputStream, const Vector3& v ){
return outputStream << '(' << v.x() << ' ' << v.y() << ' ' << v.z() << ')';
}
template<typename TextOutputStreamType>
TextOutputStreamType& ostream_write( TextOutputStreamType& t, const Vector4& v ){
return t << "[ " << v.x() << " " << v.y() << " " << v.z() << " " << v.w() << " ]";
}
#endif
+1 -5
View File
@@ -1156,13 +1156,9 @@ inline void matrix4_pivoted_transform_by_euler_xyz_degrees( Matrix4& self, const
matrix4_translate_by_vec3( self, vector3_negated( pivotpoint ) );
}
template<typename TextOutputStreamType>
inline TextOutputStreamType& ostream_write( TextOutputStreamType& ostream, const Matrix4& m ){
return ostream << "[ " << m[0] << " " << m[1] << " " << m[2] << " " << m[3] << " ]*[ "
<< m[4] << " " << m[5] << " " << m[6] << " " << m[7] << " ]*[ "
<< m[8] << " " << m[9] << " " << m[10] << " " << m[11] << " ]*[ "
<< m[12] << " " << m[13] << " " << m[14] << " " << m[15] << " ]";
return ostream << m.x() << " " << m.y() << " " << m.z() << " " << m.t();
}
#endif
-8
View File
@@ -38,14 +38,6 @@
class Selector;
class SelectionTest;
class VolumeTest;
template<typename Element> class BasicVector3;
typedef BasicVector3<float> Vector3;
template<typename Element> class BasicVector4;
typedef BasicVector4<float> Vector4;
class Matrix4;
typedef Vector4 Quaternion;
class AABB;
class ComponentSelectionTestable
{
-5
View File
@@ -288,11 +288,6 @@ inline bool Tokeniser_nextTokenIsDigit( Tokeniser& tokeniser ){
return std::isdigit( c ) != 0;
}
template<typename TextOutputStreamType>
inline TextOutputStreamType& ostream_write( TextOutputStreamType& outputStream, const Vector3& v ){
return outputStream << '(' << v.x() << ' ' << v.y() << ' ' << v.z() << ')';
}