62 #define PROTOTYPEMATRIX4X4_C
64 #include "prototypeMatrix4x4.hh"
66 prototypeMatrix4x4::prototypeMatrix4x4(QObject *parent ) :
72 QString prototypeMatrix4x4::toString()
const {
74 QString result =
"Matrix4x4 : \n";
76 for ( uint i = 0 ; i < 4 ; ++i ) {
77 for ( uint j = 0 ; j < 4 ; ++j ) {
78 result = result + thisObject().property(QString::number(i) + QString::number(j)).toString() +
" ";
94 for ( uint i = 0 ; i < 4 ; ++i )
95 for ( uint j = 0 ; j < 4 ; ++j )
96 matrix(i,j) = thisObject().property(QString::number(i) + QString::number(j)).toNumber();
99 ACG::Vec3d vector(_vector.property(
"x").toNumber(),_vector.property(
"y").toNumber(),_vector.property(
"z").toNumber());
105 return QScriptValue( engine()->toScriptValue(result) );
114 for ( uint i = 0 ; i < 4 ; ++i )
115 for ( uint j = 0 ; j < 4 ; ++j )
116 matrix(i,j) = thisObject().property(QString::number(i) + QString::number(j)).toNumber();
119 ACG::Vec3d vector(_vector.property(
"x").toNumber(),_vector.property(
"y").toNumber(),_vector.property(
"z").toNumber());
125 return QScriptValue( engine()->toScriptValue(result) );
QScriptValue transform_point(QScriptValue _vector)
Matrix vector product.
VectorT< T, 3 > transform_vector(const VectorT< T, 3 > &_v) const
transform vector (x',y',z',0) = A * (x,y,z,0)
QScriptValue transform_vector(QScriptValue _vector)
Matrix vector product.
VectorT< T, 3 > transform_point(const VectorT< T, 3 > &_v) const
transform point (x',y',z',1) = M * (x,y,z,1)