From 532859713aaf0fdf482ee7d68676f6927a800eeb Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 7 Oct 2010 23:48:57 +0200 Subject: implemented some more material stuff; added readme --- lyt/materials/texsrt.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 lyt/materials/texsrt.cpp (limited to 'lyt/materials/texsrt.cpp') diff --git a/lyt/materials/texsrt.cpp b/lyt/materials/texsrt.cpp new file mode 100644 index 0000000..25e28ca --- /dev/null +++ b/lyt/materials/texsrt.cpp @@ -0,0 +1,31 @@ +#include "texsrt.h" +#include "../layout.h" + +LYTTexSRT::LYTTexSRT() { +} + +void LYTTexSRT::dumpToDebug() { + qDebug() << "LYTTexSRT @" << (void*)this; + qDebug() << "Scale:" << xScale << "," << yScale; + qDebug() << "Rotation:" << rotate; + qDebug() << "Translation:" << xTrans << "," << yTrans; +} + + +void LYTTexSRT::writeToDataStream(QDataStream &out) { + out << (float)xTrans; + out << (float)yTrans; + out << (float)rotate; + out << (float)xScale; + out << (float)yScale; +} + + +void LYTTexSRT::readFromDataStream(QDataStream &in) { + in >> (float&)xTrans; + in >> (float&)yTrans; + in >> (float&)rotate; + in >> (float&)xScale; + in >> (float&)yScale; +} + -- cgit v1.2.3