43 #define PROTOTYPEMATRIX4X4_C 45 #include "prototypeMatrix4x4.hh" 47 prototypeMatrix4x4::prototypeMatrix4x4(QObject *parent ) :
53 QString prototypeMatrix4x4::toString()
const {
55 QString result =
"Matrix4x4 : \n";
57 for ( uint i = 0 ; i < 4 ; ++i ) {
58 for ( uint j = 0 ; j < 4 ; ++j ) {
59 result = result + thisObject().property(QString::number(i) + QString::number(j)).toString() +
" ";
75 for ( uint i = 0 ; i < 4 ; ++i )
76 for ( uint j = 0 ; j < 4 ; ++j )
77 matrix(i,j) = thisObject().property(QString::number(i) + QString::number(j)).toNumber();
80 ACG::Vec3d vector(_vector.property(
"x").toNumber(),_vector.property(
"y").toNumber(),_vector.property(
"z").toNumber());
86 return QScriptValue( engine()->toScriptValue(result) );
95 for ( uint i = 0 ; i < 4 ; ++i )
96 for ( uint j = 0 ; j < 4 ; ++j )
97 matrix(i,j) = thisObject().property(QString::number(i) + QString::number(j)).toNumber();
100 ACG::Vec3d vector(_vector.property(
"x").toNumber(),_vector.property(
"y").toNumber(),_vector.property(
"z").toNumber());
106 return QScriptValue( engine()->toScriptValue(result) );
VectorT< T, 3 > transform_point(const VectorT< T, 3 > &_v) const
transform point (x',y',z',1) = M * (x,y,z,1)
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.
QScriptValue transform_point(QScriptValue _vector)
Matrix vector product.