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

Improved documentation for the matrix type in scripting

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14823 383ad7c9-94d9-4d36-a494-682f7c89f535
parent ae5048b2
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
/** \page scripting_matrix_type Matrix data type used for scripting /** \page scripting_matrix_type Matrix data type used for scripting
* *
* The matrix type Matrix4x4 is used in the scripting language to handle matrix operations. * The matrix type Matrix4x4 is used in the scripting language to handle matrix operations.
* The implementation of the type for scripting can be found in prototypeMatrix4x4 .
* *
* You can use the following functions: * You can use the following functions:
* \code * \code
...@@ -66,28 +67,15 @@ ...@@ -66,28 +67,15 @@
* 0,0,1,3, * 0,0,1,3,
* 0,0,0,1 ) // Create a matrix that contains only a translation (1,2,3). * 0,0,0,1 ) // Create a matrix that contains only a translation (1,2,3).
* *
* var vec = Vector(1,2,3) * var vec = Vector(1,2,3) // Create a vector
* *
* matrix.transform_point(vec); * matrix.transform_point(vec); // Transforms a point by the given matrix (translation is included)
* matrix.transform_vector(vec); * matrix.transform_vector(vec); // Transforms a vector by the given matrix (translation is omitted)
* *
* \endcode * \endcode
* *
*/ */
/*
var matrix = Matrix4x4(1,0,0,1,
0,1,0,2,
0,0,1,3,
0,0,0,1 )
var vec = Vector(1,2,3)
print(matrix.multPoint(vec))
print(matrix.multVector(vec))
*/
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtScript/QtScript> #include <QtScript/QtScript>
#include "OpenFlipper/common/Types.hh" #include "OpenFlipper/common/Types.hh"
......
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