Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes | Friends
Leap::Matrix Class Reference

#include <LeapMath.h>

Inheritance diagram for Leap::Matrix:
Inheritance graph
[legend]

List of all members.

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
Matrixoperator*= (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 >
TtoArray3x3 (T *output) const
FloatArray toArray3x3 () const
template<typename T >
TtoArray4x4 (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 Matrixidentity ()

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)

Detailed Description

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.

Since:
1.0

Definition at line 660 of file LeapMath.h.


Constructor & Destructor Documentation

Leap::Matrix::Matrix ( ) [inline]

Constructs an identity transformation matrix.

Since:
1.0

Definition at line 669 of file LeapMath.h.

Leap::Matrix::Matrix ( const Matrix other) [inline]

Constructs a copy of the specified Matrix object.

Since:
1.0

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.

Parameters:
_xBasisA Vector specifying rotation and scale factors for the x-axis.
_yBasisA Vector specifying rotation and scale factors for the y-axis.
_zBasisA Vector specifying rotation and scale factors for the z-axis.
Since:
1.0

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.

Parameters:
_xBasisA Vector specifying rotation and scale factors for the x-axis.
_yBasisA Vector specifying rotation and scale factors for the y-axis.
_zBasisA Vector specifying rotation and scale factors for the z-axis.
_originA Vector specifying translation factors on all three axes.
Since:
1.0

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.

Parameters:
axisA Vector specifying the axis of rotation.
angleRadiansThe amount of rotation in radians.
Since:
1.0

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.

Parameters:
axisA Vector specifying the axis of rotation.
angleRadiansThe angle of rotation in radians.
translationA Vector representing the translation part of the transform.
Since:
1.0

Definition at line 750 of file LeapMath.h.

def Leap::Matrix::__init__ (   self,
  args 
)

Definition at line 356 of file Leap.py.


Member Function Documentation

def Leap::Matrix::__eq__ (   self,
  other 
)

Definition at line 381 of file Leap.py.

def Leap::Matrix::__imul__ (   self,
  other 
)

Definition at line 378 of file Leap.py.

def Leap::Matrix::__mul__ (   self,
  other 
)

Definition at line 375 of file Leap.py.

def Leap::Matrix::__ne__ (   self,
  other 
)

Definition at line 384 of file Leap.py.

def Leap::Matrix::__str__ (   self)

Definition at line 387 of file Leap.py.

static const Matrix& Leap::Matrix::identity ( ) [inline, static]

Returns the identity matrix specifying no translation, rotation, and scale.

Returns:
The identity matrix.
Since:
1.0

Definition at line 763 of file LeapMath.h.

bool Leap::Matrix::operator!= ( const Matrix other) const [inline]

Compare Matrix inequality component-wise.

Since:
1.0

Definition at line 891 of file LeapMath.h.

Matrix Leap::Matrix::operator* ( const Matrix other) const [inline]

Multiply transform matrices.

Combines two transformations into a single equivalent transformation.

Parameters:
otherA Matrix to multiply on the right hand side.
Returns:
A new Matrix representing the transformation equivalent to applying the other transformation followed by this transformation.
Since:
1.0

Definition at line 853 of file LeapMath.h.

Matrix& Leap::Matrix::operator*= ( const Matrix other) [inline]

Multiply transform matrices and assign the product.

Since:
1.0

Definition at line 867 of file LeapMath.h.

bool Leap::Matrix::operator== ( const Matrix other) const [inline]

Compare Matrix equality component-wise.

Since:
1.0

Definition at line 878 of file LeapMath.h.

Definition at line 372 of file Leap.py.

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.

Returns:
The rigid inverse of the matrix.
Since:
1.0

Definition at line 833 of file LeapMath.h.

def Leap::Matrix::set_rotation (   self,
  axis,
  angleRadians 
)

Definition at line 363 of file Leap.py.

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.

Parameters:
axisA Vector specifying the axis of rotation.
angleRadiansThe amount of rotation in radians.
Since:
1.0

Definition at line 780 of file LeapMath.h.

def Leap::Matrix::to_array_3x3 (   self,
  output = None 
)

Definition at line 405 of file Leap.py.

def Leap::Matrix::to_array_4x4 (   self,
  output = None 
)

Definition at line 412 of file Leap.py.

template<typename T >
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.

Since:
1.0

Definition at line 939 of file LeapMath.h.

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.

Since:
1.0

Definition at line 956 of file LeapMath.h.

template<typename T >
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.

Since:
1.0

Definition at line 970 of file LeapMath.h.

Convert a 4x4 Matrix object to a 16 element row-major float array.

Returns a FloatArray struct to avoid dynamic memory allocation.

Since:
1.0

Definition at line 986 of file LeapMath.h.

template<typename Matrix3x3Type >
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.

Since:
1.0

Definition at line 908 of file LeapMath.h.

template<typename Matrix4x4Type >
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.

Since:
1.0

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.

Since:
1.0

Definition at line 996 of file LeapMath.h.

def Leap::Matrix::transform_direction (   self,
  arg2 
)

Definition at line 369 of file Leap.py.

def Leap::Matrix::transform_point (   self,
  arg2 
)

Definition at line 366 of file Leap.py.

Vector Leap::Matrix::transformDirection ( const Vector in) const [inline]

Transforms a vector with this matrix by transforming its rotation and scale only.

Parameters:
inThe Vector to transform.
Returns:
A new Vector representing the transformed original.
Since:
1.0

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.

Parameters:
inThe Vector to transform.
Returns:
A new Vector representing the transformed original.
Since:
1.0

Definition at line 803 of file LeapMath.h.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Matrix matrix 
) [friend]

Write the matrix to an output stream in a human readable format.

Since:
1.0

Definition at line 1010 of file LeapMath.h.


Member Data Documentation

tuple Leap::Matrix::__getattr__ = lambdaself,name:_swig_getattr(self, Matrix, name) [static, private]

Definition at line 353 of file Leap.py.

Leap::Matrix::__repr__ = _swig_repr [static, private]

Definition at line 354 of file Leap.py.

tuple Leap::Matrix::__setattr__ = lambdaself,name,value:_swig_setattr(self, Matrix, name, value) [static, private]

Definition at line 351 of file Leap.py.

Leap::Matrix::__swig_destroy__ = LeapPython.delete_Matrix [static, private]

Definition at line 421 of file Leap.py.

dictionary Leap::Matrix::__swig_getmethods__ = {} [static, private]

Definition at line 352 of file Leap.py.

dictionary Leap::Matrix::__swig_setmethods__ = {} [static, private]

Definition at line 350 of file Leap.py.

tuple Leap::Matrix::origin = _swig_property(LeapPython.Matrix_origin_get, LeapPython.Matrix_origin_set) [static]

Definition at line 404 of file Leap.py.

The translation factors for all three axes.

Since:
1.0

Definition at line 1045 of file LeapMath.h.

Definition at line 356 of file Leap.py.

tuple Leap::Matrix::x_basis = _swig_property(LeapPython.Matrix_x_basis_get, LeapPython.Matrix_x_basis_set) [static]

Definition at line 392 of file Leap.py.

The basis vector for the x-axis.

Since:
1.0

Definition at line 1021 of file LeapMath.h.

tuple Leap::Matrix::y_basis = _swig_property(LeapPython.Matrix_y_basis_get, LeapPython.Matrix_y_basis_set) [static]

Definition at line 396 of file Leap.py.

The basis vector for the y-axis.

Since:
1.0

Definition at line 1029 of file LeapMath.h.

tuple Leap::Matrix::z_basis = _swig_property(LeapPython.Matrix_z_basis_get, LeapPython.Matrix_z_basis_set) [static]

Definition at line 400 of file Leap.py.

The basis vector for the z-axis.

Since:
1.0

Definition at line 1037 of file LeapMath.h.


The documentation for this class was generated from the following files:


leap_motion
Author(s): Florian Lier , Mirza Shah , Isaac IY Saito
autogenerated on Sat Jun 8 2019 18:47:25