Commit b163938f authored by Jan Möbius's avatar Jan Möbius

Fixed 4d vector implementation for scripting


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16494 383ad7c9-94d9-4d36-a494-682f7c89f535
parent a30b3de4
......@@ -466,8 +466,8 @@ Core::init() {
// Register the 4d Vector Type to the core ( is Vec4d )
//==========================================================================
qScriptRegisterMetaType(&scriptEngine_,
toScriptValueVector,
fromScriptValueVector,
toScriptValueVector4,
fromScriptValueVector4,
scriptEngine_.newQObject(&vec4dPrototype_));
// set a constructor to allow creation via Vector(x,y,z)
......
......@@ -59,8 +59,8 @@
*
* You can use the following functions:
* \code
* var vec = Vector(1,2,3,4)
* var vec2 = Vector(10,20,30,4)
* var vec = Vector4(1,2,3,4)
* var vec2 = Vector4(10,20,30,4)
*
* vec.multiply(0.5) // Multiply vec with 0.5
* vec.add(vec2) // Add vec2 to vec
......
......@@ -44,7 +44,7 @@
//=============================================================================
//
// Wrapper for Vector ( Vec3d ) - IMPLEMENTATION
// Wrapper for Vector ( Vec4d ) - IMPLEMENTATION
//
//=============================================================================
......@@ -55,7 +55,7 @@
//== IMPLEMENTATION ==========================================================
//=== Vector ( = Vec3d) =======================================================
//=== Vector4 ( = Vec4d) =======================================================
QScriptValue toScriptValueVector4(QScriptEngine *engine, const Vector4 &s)
{
......@@ -107,7 +107,7 @@ void fromScriptValueVector4(const QScriptValue &obj, Vector4 &s)
QScriptValue createVector4(QScriptContext *context, QScriptEngine *engine)
{
Vector s;
Vector4 s;
QScriptValue callee = context->callee();
......@@ -130,7 +130,7 @@ QScriptValue createVector4(QScriptContext *context, QScriptEngine *engine)
QScriptValue Vector4ToString(QScriptContext *context, QScriptEngine *engine)
{
QString result = "Vector : ( " +
QString result = "Vector4 : ( " +
context->thisObject().property("x").toString() + "," +
context->thisObject().property("y").toString() + "," +
context->thisObject().property("z").toString() + ","+
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment