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
void zero()
Resets all components of the vector to zero.
QScriptValue norm()
Calculate the Euclidean norm of the vector.
void normalize()
Normalize the vector.
QScriptValue sqrnorm()
Calculate the squared Euclidean norm of the vector.
void add(QScriptValue _vector)
Adds another vector to this vector.
QScriptValue sprod(QScriptValue _vector)
Calculate scalar product.
void sub(QScriptValue _vector)
Subtracts another vector from this vector.
void multiply(QScriptValue _scalar)
Multiplies the given vector with the scalar.