#include <LeapMath.h>
Public Member Functions | |
def | __eq__ |
def | __imul__ |
def | __init__ |
def | __mul__ |
def | __ne__ |
def | __str__ |
Matrix () | |
Matrix (const Matrix &other) | |
Matrix (const Vector &_xBasis, const Vector &_yBasis, const Vector &_zBasis) | |
Matrix (const Vector &_xBasis, const Vector &_yBasis, const Vector &_zBasis, const Vector &_origin) | |
Matrix (const Vector &axis, float angleRadians) | |
Matrix (const Vector &axis, float angleRadians, const Vector &translation) | |
bool | operator!= (const Matrix &other) const |
Matrix | operator* (const Matrix &other) const |
Matrix & | operator*= (const Matrix &other) |
bool | operator== (const Matrix &other) const |
def | rigid_inverse |
Matrix | rigidInverse () const |
def | set_rotation |
void | setRotation (const Vector &axis, float angleRadians) |
def | to_array_3x3 |
def | to_array_4x4 |
template<typename T > | |
T * | toArray3x3 (T *output) const |
FloatArray | toArray3x3 () const |
template<typename T > | |
T * | toArray4x4 (T *output) const |
FloatArray | toArray4x4 () const |
template<typename Matrix3x3Type > | |
const Matrix3x3Type | toMatrix3x3 () const |
template<typename Matrix4x4Type > | |
const Matrix4x4Type | toMatrix4x4 () const |
std::string | toString () const |
def | transform_direction |
def | transform_point |
Vector | transformDirection (const Vector &in) const |
Vector | transformPoint (const Vector &in) const |
Static Public Member Functions | |
static const Matrix & | identity () |
Public Attributes | |
Vector | origin |
this | |
Vector | xBasis |
Vector | yBasis |
Vector | zBasis |
Static Public Attributes | |
tuple | origin = _swig_property(LeapPython.Matrix_origin_get, LeapPython.Matrix_origin_set) |
tuple | x_basis = _swig_property(LeapPython.Matrix_x_basis_get, LeapPython.Matrix_x_basis_set) |
tuple | y_basis = _swig_property(LeapPython.Matrix_y_basis_get, LeapPython.Matrix_y_basis_set) |
tuple | z_basis = _swig_property(LeapPython.Matrix_z_basis_get, LeapPython.Matrix_z_basis_set) |
Static Private Attributes | |
tuple | __getattr__ = lambdaself,name:_swig_getattr(self, Matrix, name) |
__repr__ = _swig_repr | |
tuple | __setattr__ = lambdaself,name,value:_swig_setattr(self, Matrix, name, value) |
__swig_destroy__ = LeapPython.delete_Matrix | |
dictionary | __swig_getmethods__ = {} |
dictionary | __swig_setmethods__ = {} |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Matrix &matrix) |
The Matrix struct represents a transformation matrix.
To use this struct to transform a Vector, construct a matrix containing the desired transformation and then use the Matrix::transformPoint() or Matrix::transformDirection() functions to apply the transform.
Transforms can be combined by multiplying two or more transform matrices using the * operator.
Definition at line 660 of file LeapMath.h.
Leap::Matrix::Matrix | ( | ) | [inline] |
Leap::Matrix::Matrix | ( | const Matrix & | other | ) | [inline] |
Constructs a copy of the specified Matrix object.
Definition at line 683 of file LeapMath.h.
Leap::Matrix::Matrix | ( | const Vector & | _xBasis, |
const Vector & | _yBasis, | ||
const Vector & | _zBasis | ||
) | [inline] |
Constructs a transformation matrix from the specified basis vectors.
_xBasis | A Vector specifying rotation and scale factors for the x-axis. |
_yBasis | A Vector specifying rotation and scale factors for the y-axis. |
_zBasis | A Vector specifying rotation and scale factors for the z-axis. |
Definition at line 700 of file LeapMath.h.
Leap::Matrix::Matrix | ( | const Vector & | _xBasis, |
const Vector & | _yBasis, | ||
const Vector & | _zBasis, | ||
const Vector & | _origin | ||
) | [inline] |
Constructs a transformation matrix from the specified basis and translation vectors.
_xBasis | A Vector specifying rotation and scale factors for the x-axis. |
_yBasis | A Vector specifying rotation and scale factors for the y-axis. |
_zBasis | A Vector specifying rotation and scale factors for the z-axis. |
_origin | A Vector specifying translation factors on all three axes. |
Definition at line 718 of file LeapMath.h.
Leap::Matrix::Matrix | ( | const Vector & | axis, |
float | angleRadians | ||
) | [inline] |
Constructs a transformation matrix specifying a rotation around the specified vector.
axis | A Vector specifying the axis of rotation. |
angleRadians | The amount of rotation in radians. |
Definition at line 734 of file LeapMath.h.
Leap::Matrix::Matrix | ( | const Vector & | axis, |
float | angleRadians, | ||
const Vector & | translation | ||
) | [inline] |
Constructs a transformation matrix specifying a rotation around the specified vector and a translation by the specified vector.
axis | A Vector specifying the axis of rotation. |
angleRadians | The angle of rotation in radians. |
translation | A Vector representing the translation part of the transform. |
Definition at line 750 of file LeapMath.h.
def Leap::Matrix::__init__ | ( | self, | |
args | |||
) |
def Leap::Matrix::__eq__ | ( | self, | |
other | |||
) |
def Leap::Matrix::__imul__ | ( | self, | |
other | |||
) |
def Leap::Matrix::__mul__ | ( | self, | |
other | |||
) |
def Leap::Matrix::__ne__ | ( | self, | |
other | |||
) |
def Leap::Matrix::__str__ | ( | self | ) |
static const Matrix& Leap::Matrix::identity | ( | ) | [inline, static] |
Returns the identity matrix specifying no translation, rotation, and scale.
Definition at line 763 of file LeapMath.h.
bool Leap::Matrix::operator!= | ( | const Matrix & | other | ) | const [inline] |
Multiply transform matrices.
Combines two transformations into a single equivalent transformation.
other | A Matrix to multiply on the right hand side. |
Definition at line 853 of file LeapMath.h.
Multiply transform matrices and assign the product.
Definition at line 867 of file LeapMath.h.
bool Leap::Matrix::operator== | ( | const Matrix & | other | ) | const [inline] |
def Leap::Matrix::rigid_inverse | ( | self | ) |
Matrix Leap::Matrix::rigidInverse | ( | ) | const [inline] |
Performs a matrix inverse if the matrix consists entirely of rigid transformations (translations and rotations). If the matrix is not rigid, this operation will not represent an inverse.
Note that all matrices that are directly returned by the API are rigid.
Definition at line 833 of file LeapMath.h.
def Leap::Matrix::set_rotation | ( | self, | |
axis, | |||
angleRadians | |||
) |
void Leap::Matrix::setRotation | ( | const Vector & | axis, |
float | angleRadians | ||
) | [inline] |
Sets this transformation matrix to represent a rotation around the specified vector.
This function erases any previous rotation and scale transforms applied to this matrix, but does not affect translation.
axis | A Vector specifying the axis of rotation. |
angleRadians | The amount of rotation in radians. |
Definition at line 780 of file LeapMath.h.
def Leap::Matrix::to_array_3x3 | ( | self, | |
output = None |
|||
) |
def Leap::Matrix::to_array_4x4 | ( | self, | |
output = None |
|||
) |
T* Leap::Matrix::toArray3x3 | ( | T * | output | ) | const [inline] |
Writes the 3x3 Matrix object to a 9 element row-major float or double array.
Translation factors are discarded.
Returns a pointer to the same data.
Definition at line 939 of file LeapMath.h.
FloatArray Leap::Matrix::toArray3x3 | ( | ) | const [inline] |
Convert a 3x3 Matrix object to a 9 element row-major float array.
Translation factors are discarded.
Returns a FloatArray struct to avoid dynamic memory allocation.
Definition at line 956 of file LeapMath.h.
T* Leap::Matrix::toArray4x4 | ( | T * | output | ) | const [inline] |
Writes the 4x4 Matrix object to a 16 element row-major float or double array.
Returns a pointer to the same data.
Definition at line 970 of file LeapMath.h.
FloatArray Leap::Matrix::toArray4x4 | ( | ) | const [inline] |
Convert a 4x4 Matrix object to a 16 element row-major float array.
Returns a FloatArray struct to avoid dynamic memory allocation.
Definition at line 986 of file LeapMath.h.
const Matrix3x3Type Leap::Matrix::toMatrix3x3 | ( | ) | const [inline] |
Convert a Leap::Matrix object to another 3x3 matrix type.
The new type must define a constructor function that takes each matrix element as a parameter in row-major order.
Translation factors are discarded.
Definition at line 908 of file LeapMath.h.
const Matrix4x4Type Leap::Matrix::toMatrix4x4 | ( | ) | const [inline] |
Convert a Leap::Matrix object to another 4x4 matrix type.
The new type must define a constructor function that takes each matrix element as a parameter in row-major order.
Definition at line 922 of file LeapMath.h.
std::string Leap::Matrix::toString | ( | ) | const [inline] |
Write the matrix to a string in a human readable format.
Definition at line 996 of file LeapMath.h.
def Leap::Matrix::transform_direction | ( | self, | |
arg2 | |||
) |
def Leap::Matrix::transform_point | ( | self, | |
arg2 | |||
) |
Vector Leap::Matrix::transformDirection | ( | const Vector & | in | ) | const [inline] |
Transforms a vector with this matrix by transforming its rotation and scale only.
in | The Vector to transform. |
Definition at line 817 of file LeapMath.h.
Vector Leap::Matrix::transformPoint | ( | const Vector & | in | ) | const [inline] |
Transforms a vector with this matrix by transforming its rotation, scale, and translation.
Translation is applied after rotation and scale.
in | The Vector to transform. |
Definition at line 803 of file LeapMath.h.
std::ostream& operator<< | ( | std::ostream & | out, |
const Matrix & | matrix | ||
) | [friend] |
Write the matrix to an output stream in a human readable format.
Definition at line 1010 of file LeapMath.h.
tuple Leap::Matrix::__getattr__ = lambdaself,name:_swig_getattr(self, Matrix, name) [static, private] |
Leap::Matrix::__repr__ = _swig_repr [static, private] |
tuple Leap::Matrix::__setattr__ = lambdaself,name,value:_swig_setattr(self, Matrix, name, value) [static, private] |
Leap::Matrix::__swig_destroy__ = LeapPython.delete_Matrix [static, private] |
dictionary Leap::Matrix::__swig_getmethods__ = {} [static, private] |
dictionary Leap::Matrix::__swig_setmethods__ = {} [static, private] |
tuple Leap::Matrix::origin = _swig_property(LeapPython.Matrix_origin_get, LeapPython.Matrix_origin_set) [static] |
tuple Leap::Matrix::x_basis = _swig_property(LeapPython.Matrix_x_basis_get, LeapPython.Matrix_x_basis_set) [static] |
tuple Leap::Matrix::y_basis = _swig_property(LeapPython.Matrix_y_basis_get, LeapPython.Matrix_y_basis_set) [static] |
tuple Leap::Matrix::z_basis = _swig_property(LeapPython.Matrix_z_basis_get, LeapPython.Matrix_z_basis_set) [static] |