a transformation which stored the first row of a 3x3 perspective matrix More...
#include <libwps_internal.h>
Public Member Functions | |
WPSTransformation (WPSVec3f const &xRow=WPSVec3f(1, 0, 0), WPSVec3f const &yRow=WPSVec3f(0, 1, 0)) | |
constructor | |
WPSTransformation (WPSTransformation const &)=default | |
WPSTransformation (WPSTransformation &&)=default | |
WPSTransformation & | operator= (WPSTransformation const &)=default |
WPSTransformation & | operator= (WPSTransformation &&)=default |
bool | isIdentity () const |
returns true if the matrix is an identity matrix | |
void | checkIdentity () const |
check if a matrix is the identity matrix | |
WPSVec3f const & | operator[] (int c) const |
the two extremum points which defined the box | |
Vec2f | operator* (Vec2f const &pt) const |
operator* for vec2f | |
Vec2f | multiplyDirection (Vec2f const &dir) const |
operator* for direction | |
WPSBox2f | operator* (WPSBox2f const &box) const |
operator* for box2f | |
WPSTransformation | operator* (WPSTransformation const &mat) const |
operator* for transform | |
WPSTransformation & | operator*= (WPSTransformation const &mat) |
operator*= | |
bool | operator== (WPSTransformation const &mat) const |
operator== | |
bool | operator!= (WPSTransformation const &mat) const |
operator!= | |
bool | operator< (WPSTransformation const &mat) const |
operator< | |
bool | operator<= (WPSTransformation const &mat) const |
operator<= | |
bool | operator> (WPSTransformation const &mat) const |
operator> | |
bool | operator>= (WPSTransformation const &mat) const |
operator>= | |
bool | decompose (float &rotation, Vec2f &shearing, WPSTransformation &transform, Vec2f const ¢er) const |
try to decompose the matrix in a rotation + scaling/translation matrix. |
Static Public Member Functions | |
static WPSTransformation | translation (Vec2f const &trans) |
returns a translation transformation | |
static WPSTransformation | scale (Vec2f const &trans) |
returns a scaling transformation | |
static WPSTransformation | rotation (float angle, Vec2f const ¢er=Vec2f(0, 0)) |
returns a rotation transformation around center. | |
static WPSTransformation | shear (Vec2f s, Vec2f const ¢er=Vec2f(0, 0)) |
returns a shear transformation letting center invariant, ie. |
Protected Attributes | |
std::pair< WPSVec3f, WPSVec3f > | m_data |
the data | |
bool | m_isIdentity |
flag to know if this matrix is an identity matrix |
a transformation which stored the first row of a 3x3 perspective matrix
|
inlineexplicit |
constructor
Referenced by decompose(), operator!=(), operator*(), operator*=(), operator<(), operator<=(), operator=(), operator=(), operator==(), operator>(), operator>=(), rotation(), scale(), shear(), translation(), WPSTransformation(), and WPSTransformation().
|
default |
|
default |
|
inline |
check if a matrix is the identity matrix
Referenced by operator*(), and WPSTransformation().
bool WPSTransformation::decompose | ( | float & | rotation, |
Vec2f & | shearing, | ||
WPSTransformation & | transform, | ||
Vec2f const & | center ) const |
try to decompose the matrix in a rotation + scaling/translation matrix.
Note: the center of rotation is given before applying the transformation(this)
Referenced by WPSGraphicShape::transform().
|
inline |
returns true if the matrix is an identity matrix
Referenced by LotusGraph::readGraphic(), LotusGraph::sendZone(), and WPSGraphicShape::transform().
operator* for direction
Referenced by operator*(), Quattro9Graph::sendShape(), and Quattro9Graph::sendShape().
|
inline |
operator!=
|
inline |
operator* for transform
|
inline |
operator*=
|
inline |
operator<
|
inline |
operator<=
|
default |
|
default |
|
inline |
operator==
|
inline |
operator>
|
inline |
operator>=
|
inline |
the two extremum points which defined the box
c | 0 means the minimum and 1 the maximum |
|
static |
returns a rotation transformation around center.
Referenced by decompose(), and LotusGraphInternal::ZonePc::getTransformation().
|
inlinestatic |
returns a scaling transformation
Referenced by Quattro9Graph::sendShape().
|
inlinestatic |
returns a shear transformation letting center invariant, ie.
a matrix ( 1 s[0] -s[0]*center[1], s[1] 1 -s[1]*center[0], 0 0 1)
Referenced by decompose().
|
inlinestatic |
returns a translation transformation
Referenced by LotusGraphInternal::ZonePc::getTransformation(), and Quattro9Graph::sendShape().
the data
Referenced by checkIdentity(), multiplyDirection(), operator!=(), operator*(), operator*(), operator<(), operator<=(), operator==(), operator>(), operator>=(), operator[](), and WPSTransformation().
|
mutableprotected |
flag to know if this matrix is an identity matrix
Referenced by checkIdentity(), decompose(), isIdentity(), multiplyDirection(), operator*(), operator*(), operator*(), operator*=(), and WPSTransformation().