91 #ifndef PROTOTYPEVEC3D_HH
92 #define PROTOTYPEVEC3D_HH
95 #include <QtCore/QObject>
96 #include <QtScript/QtScript>
117 void multiply(QScriptValue _scalar);
123 void add(QScriptValue _vector);
129 void sub(QScriptValue _vector);
142 QScriptValue
sprod(QScriptValue _vector);
162 QString toString()
const;
167 #endif // PROTOTYPEVEC3D_HH
QScriptValue norm()
Calculate the Euclidean norm of the vector.
QScriptValue sprod(QScriptValue _vector)
Calculate scalar product.
QScriptValue sqrnorm()
Calculate the squared Euclidean norm of the vector.
void sub(QScriptValue _vector)
Subtracts another vector from this vector.
void add(QScriptValue _vector)
Adds another vector to this vector.
void multiply(QScriptValue _scalar)
Multiplies the given vector with the scalar.
void normalize()
Normalize the vector.
void zero()
Resets all components of the vector to zero.