Ipelib
Public Member Functions | Public Attributes | Related Functions | List of all members
ipe::Matrix Class Reference

#include <ipegeo.h>

Public Member Functions

 Matrix ()
 
 Matrix (const Linear &linear)
 
 Matrix (const Linear &linear, const Vector &t)
 
 Matrix (double m11, double m21, double m12, double m22, double t1, double t2)
 
 Matrix (const Vector &v)
 
 Matrix (String str)
 
Matrix inverse () const
 
Vector operator* (const Vector &rhs) const
 
Bezier operator* (const Bezier &rhs) const
 
Vector translation () const
 
Linear linear () const
 
double determinant () const
 
bool isIdentity () const
 
bool operator== (const Matrix &rhs) const
 

Public Attributes

double a [6]
 

Related Functions

(Note that these are not member functions.)

Streamoperator<< (Stream &stream, const Matrix &rhs)
 
Bezier operator* (const Bezier &rhs) const
 
Vector operator* (const Vector &rhs) const
 
Matrix operator* (const Matrix &lhs, const Matrix &rhs)
 
Arc operator* (const Matrix &lhs, const Arc &rhs)
 

Detailed Description

Homogeneous transformation in the plane.

Constructor & Destructor Documentation

◆ Matrix() [1/6]

ipe::Matrix::Matrix ( )
inline

Create identity matrix.

References a.

Referenced by inverse().

◆ Matrix() [2/6]

ipe::Matrix::Matrix ( const Linear linear)
inline

Create linear matrix.

References ipe::Linear::a, a, and linear().

◆ Matrix() [3/6]

ipe::Matrix::Matrix ( const Linear linear,
const Vector t 
)
inlineexplicit

◆ Matrix() [4/6]

ipe::Matrix::Matrix ( double  m11,
double  m21,
double  m12,
double  m22,
double  t1,
double  t2 
)
inlineexplicit

Create matrix with given coefficients.

References a.

◆ Matrix() [5/6]

ipe::Matrix::Matrix ( const Vector v)
inlineexplicit

Create translation matrix.

References a, ipe::Vector::x, and ipe::Vector::y.

◆ Matrix() [6/6]

Matrix::Matrix ( String  str)
explicit

Parse string.

References a.

Member Function Documentation

◆ inverse()

Matrix Matrix::inverse ( ) const

Return inverse.

References a, determinant(), and Matrix().

Referenced by ipe::Arc::Arc(), ipe::Arc::distance(), and ipe::Arc::intersect().

◆ operator*() [1/2]

Vector ipe::Matrix::operator* ( const Vector rhs) const
inline

◆ operator*() [2/2]

Bezier ipe::Matrix::operator* ( const Bezier rhs) const
inline

◆ translation()

Vector ipe::Matrix::translation ( ) const
inline

◆ linear()

Linear ipe::Matrix::linear ( ) const
inline

Return linear transformation component of this affine transformation.

References a.

Referenced by ipe::Arc::bbox(), ipe::Path::draw(), ipe::Arc::intersect(), Matrix(), and ipe::Snap::setEdge().

◆ determinant()

double ipe::Matrix::determinant ( ) const
inline

Return determinant of the matrix.

References a.

Referenced by inverse(), and ipe::Shape::load().

◆ isIdentity()

bool ipe::Matrix::isIdentity ( ) const
inline

Is this the identity matrix?

References a.

Referenced by ipe::StyleSheet::saveAsXml(), ipe::Object::saveAttributesAsXml(), and ipe::Page::setLayerMatrix().

◆ operator==()

bool ipe::Matrix::operator== ( const Matrix rhs) const
inline

Check for equality of two matrices.

References a.

Friends And Related Function Documentation

◆ operator<<()

Stream & operator<< ( Stream stream,
const Matrix rhs 
)
related

◆ operator*() [1/4]

Bezier operator* ( const Bezier rhs) const
related

Transform Bezier spline.

References ipe::Bezier::iV.

◆ operator*() [2/4]

Vector operator* ( const Vector rhs) const
related

Matrix times vector.

References a, ipe::Vector::x, and ipe::Vector::y.

◆ operator*() [3/4]

Matrix operator* ( const Matrix lhs,
const Matrix rhs 
)
related

Matrix multiplication.

References a.

◆ operator*() [4/4]

Arc operator* ( const Matrix lhs,
const Arc rhs 
)
related

Transform arc.

References ipe::Arc::iAlpha, ipe::Arc::iBeta, and ipe::Arc::iM.

Member Data Documentation

◆ a

double ipe::Matrix::a[6]

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