#include "ientity.h"
-#include "stream/stringstream.h"
#include "math/quaternion.h"
#include "generic/callback.h"
#include "stringio.h"
+#include <sstream>
+
#include "angle.h"
typedef float Float9[9];
}
else
{
- StringOutputStream value( 256 );
+ std::ostringstream value;
value << rotation[0] << ' '
<< rotation[1] << ' '
<< rotation[2] << ' '
<< rotation[6] << ' '
<< rotation[7] << ' '
<< rotation[8];
- entity->setKeyValue( key, value.c_str() );
+ entity->setKeyValue( key, value.str().c_str() );
}
}
inline void read_rotation( Float9 rotation, const char* value ){
class RotationKey
{
-Callback m_rotationChanged;
+Callback<void()> m_rotationChanged;
public:
Float9 m_rotation;
-RotationKey( const Callback& rotationChanged )
+RotationKey( const Callback<void()>& rotationChanged )
: m_rotationChanged( rotationChanged ){
default_rotation( m_rotation );
}
read_angle( m_rotation, value );
m_rotationChanged();
}
-typedef MemberCaller1<RotationKey, const char*, &RotationKey::angleChanged> AngleChangedCaller;
+typedef MemberCaller<RotationKey, void(const char*), &RotationKey::angleChanged> AngleChangedCaller;
void rotationChanged( const char* value ){
read_rotation( m_rotation, value );
m_rotationChanged();
}
-typedef MemberCaller1<RotationKey, const char*, &RotationKey::rotationChanged> RotationChangedCaller;
+typedef MemberCaller<RotationKey, void(const char*), &RotationKey::rotationChanged> RotationChangedCaller;
void write( Entity* entity ) const {
Vector3 euler = matrix4_get_rotation_euler_xyz_degrees( rotation_toMatrix( m_rotation ) );