Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members
WPCG::WP_Matrix2D Class Reference
#include <WP_Matrix2D.h>
List of all members.
Detailed Description
this class represents a 2D matrix
-
Author:
-
Copyright (C) 2001 W.P. van Paassen peter@paassen.tmfweb.nl
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Constructor & Destructor Documentation
WPCG::WP_Matrix2D::WP_Matrix2D |
( |
|
) |
|
|
WPCG::WP_Matrix2D::~WP_Matrix2D |
( |
|
) |
[inline] |
|
|
-
Parameters:
-
type |
the type of the matrix. TRANSLATION_MATRIX for a translation matrix and SCALING_MATRIX for a scaling matrix. Any other value creates the identity matrix |
x |
the x value of the translation or scaling operation |
y |
the y value of the translation or scaling operation |
|
|
-
Parameters:
-
type |
the type of the matrix. TRANSLATION_MATRIX for a translation matrix and SCALING_MATRIX for a scaling matrix. Any other value creates the identity matrix |
v |
a WP_Vector2D object containing the x and y values to be used for translation or scaling |
|
WPCG::WP_Matrix2D::WP_Matrix2D |
( |
scalar |
angle |
) |
|
|
|
-
Parameters:
-
angle |
the angle in degrees of the rotation matrix |
|
Member Function Documentation
void WPCG::WP_Matrix2D::createIdentity |
( |
|
) |
|
|
|
this function creates the identity matrix |
WP_Matrix2D WPCG::WP_Matrix2D::operator * |
( |
scalar |
s |
) |
const |
|
|
this operator multiplies every matrix cell by a scalar -
Parameters:
-
s |
the scalar by which every matrix cell is multiplied |
-
Returns:
-
a new matrix containing the multiplied cells
|
WP_Matrix2D WPCG::WP_Matrix2D::operator * |
( |
const WP_Matrix2D & |
m |
) |
const |
|
|
this operator postmultiplies the current matrix by m -
Parameters:
-
m |
the matrix which will be multiplied by the current matrix |
-
Returns:
-
a new matrix containing the multiplication of the current matrix and m
|
WP_Matrix2D & WPCG::WP_Matrix2D::operator *= |
( |
scalar |
s |
) |
|
|
|
this operator multiplies each matrix cell by a scalar and stores the result in this object -
Parameters:
-
s |
the scalar by which every matrix cell is multiplied |
-
Returns:
-
a reference to this object
|
WP_Matrix2D & WPCG::WP_Matrix2D::operator *= |
( |
const WP_Matrix2D & |
m |
) |
|
|
|
this operator postmultiplies the current matrix by m and stores the result in this object -
Parameters:
-
m |
the matrix which will be multiplied by this matrix |
-
Returns:
-
a reference to this object
|
WP_Matrix2D WPCG::WP_Matrix2D::operator+ |
( |
const WP_Matrix2D & |
m |
) |
const |
|
|
this operator adds m to the current matrix -
Parameters:
-
m |
the matrix which will be added to the current matrix |
-
Returns:
-
a new matrix containing the addition of the current matrix and m
|
WP_Matrix2D & WPCG::WP_Matrix2D::operator+= |
( |
const WP_Matrix2D & |
m |
) |
|
|
|
this operator adds m to the current matrix and stores the result in this object -
Parameters:
-
m |
the matrix which will be added to this matrix |
-
Returns:
-
a reference to this object
|
WP_Matrix2D & WPCG::WP_Matrix2D::operator- |
( |
|
) |
|
|
|
this operator inverts every matrix cell |
WP_Matrix2D WPCG::WP_Matrix2D::operator- |
( |
const WP_Matrix2D & |
m |
) |
const |
|
|
this operator subtracts m from the current matrix -
Parameters:
-
m |
the matrix which will be subtracted from the current matrix |
-
Returns:
-
a new matrix containing the subtraction of the current matrix and m
|
WP_Matrix2D & WPCG::WP_Matrix2D::operator-= |
( |
const WP_Matrix2D & |
m |
) |
|
|
|
this operator subtracts m from this matrix and stores the result in this object -
Parameters:
-
m |
the matrix which will be subtracted from this matrix |
-
Returns:
-
a reference to this object
|
WP_Matrix2D WPCG::WP_Matrix2D::operator/ |
( |
scalar |
s |
) |
const |
|
|
this operator divides every matrix cell by a scalar -
Parameters:
-
s |
the scalar by which every matrix cell is divided |
-
Returns:
-
a new matrix containing the divided cells
|
WP_Matrix2D & WPCG::WP_Matrix2D::operator/= |
( |
scalar |
s |
) |
|
|
|
this operator divides each matrix cell by a scalar and stores the result in this object -
Parameters:
-
s |
the scalar by which every matrix cell is divided |
-
Returns:
-
a reference to this object
|
WP_Matrix2D & WPCG::WP_Matrix2D::operator= |
( |
const WP_Matrix2D & |
m |
) |
|
|
|
assigment operator -
Parameters:
-
m |
the matrix containing the to be copied values |
-
Returns:
-
a reference to this matrix containing the copied values
|
Friends And Related Function Documentation
friend class WP_Vector2D [friend]
|
|
Member Data Documentation
scalar WPCG::WP_Matrix2D::data[3][3]
|
|
|
an 2D array representing a 2D matrix holding 9 cells, 3 columns of 3 rows |
The documentation for this class was generated from the following files:
Generated on Tue Jan 28 20:26:40 2003 by
1.2.14 written by Dimitri van Heesch,
© 1997-2002