Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkMatrix4x4 Class Reference

`#include <vtkMatrix4x4.h>`

Inheritance diagram for vtkMatrix4x4:

[legend]
Collaboration diagram for vtkMatrix4x4:

[legend]
List of all members.

## Detailed Description

represent and manipulate 4x4 transformation matrices

Date:
  2002/12/26 18:24:21

Revision:
  1.64

vtkMatrix4x4 is a class to represent and manipulate 4x4 matrices. Specifically, it is designed to work on 4x4 transformation matrices found in 3D rendering using homogeneous coordinates [x y z w].

See also:
  vtkTransform

Created by:
  - Lorensen, Bill

CVS contributions (if > 5%):
  - Gobbi, David (22%)
  - Schroeder, Will (17%)
  - Martin, Ken (17%)
  - Lorensen, Bill (15%)
  - Volpe, Christopher (11%)

CVS logs (CVSweb):
  - .`h` (`/Common/vtkMatrix4x4.h)`
  - .`cxx` (`/Common/vtkMatrix4x4.cxx)`

Tests:
  vtkMatrix4x4 (Tests)

Definition at line 52 of file vtkMatrix4x4.h.

## [NOHEADER]

void | Invert ()
void | Invert (vtkMatrix4x4 *in, vtkMatrix4x4 *out)

## [NOHEADER]

void | Transpose ()
void | Transpose (vtkMatrix4x4 *in, vtkMatrix4x4 *out)

## Public Types

typedef vtkObject | Superclass

## Public Methods

virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
double | Determinant ()
void | SetElement (int i, int j, double value)
double * | operator[] (const unsigned int i)
const double * | operator[] (unsigned int i) const
void | Adjoint (vtkMatrix4x4 &in, vtkMatrix4x4 &out)
double | Determinant (vtkMatrix4x4 &in)
double | Determinant (vtkMatrix4x4 *in)
void | Invert (vtkMatrix4x4 &in, vtkMatrix4x4 &out)
void | Transpose (vtkMatrix4x4 &in, vtkMatrix4x4 &out)
void | DeepCopy (vtkMatrix4x4 *source)
void | DeepCopy (const double Elements[16])
void | Zero ()
void | Identity ()
void | MultiplyPoint (const float in[4], float out[4])
void | MultiplyPoint (const double in[4], double out[4])
float * | MultiplyPoint (const float in[4])
float * | MultiplyFloatPoint (const float in[4])
double * | MultiplyDoublePoint (const double in[4])
void | Adjoint (vtkMatrix4x4 *in, vtkMatrix4x4 *out)
double | GetElement (int i, int j) const

## Static Public Methods

vtkMatrix4x4 * | New ()
int | IsTypeOf (const char *type)
vtkMatrix4x4 * | SafeDownCast (vtkObject *o)
void | DeepCopy (double Elements[16], vtkMatrix4x4 *source)
void | DeepCopy (double Elements[16], const double newElements[16])
void | Zero (double Elements[16])
void | Identity (double Elements[16])
void | Invert (const double inElements[16], double outElements[16])
void | Transpose (const double inElements[16], double outElements[16])
void | MultiplyPoint (const double Elements[16], const float in[4], float out[4])
void | MultiplyPoint (const double Elements[16], const double in[4], double out[4])
void | Multiply4x4 (const double a[16], const double b[16], double c[16])
void | Adjoint (const double inElements[16], double outElements[16])
double | Determinant (const double Elements[16])
void | PointMultiply (const double Elements[16], const float in[4], float out[4])
void | PointMultiply (const double Elements[16], const double in[4], double out[4])
void | Multiply4x4 (vtkMatrix4x4 *a, vtkMatrix4x4 *b, vtkMatrix4x4 *c)

## Public Attributes

double | Element [4][4]

## Protected Methods

| vtkMatrix4x4 ()
| ~vtkMatrix4x4 ()

## Protected Attributes

float | FloatPoint [4]
double | DoublePoint [4]

## Member Typedef Documentation

typedef vtkObject vtkMatrix4x4::Superclass

| Reimplemented from vtkObject. Definition at line 69 of file vtkMatrix4x4.h.

## Constructor & Destructor Documentation

vtkMatrix4x4::vtkMatrix4x4 | ( |  | ) | `[inline, protected]`

| Definition at line 215 of file vtkMatrix4x4.h. References Identity().

vtkMatrix4x4::~vtkMatrix4x4 | ( |  | ) | `[inline, protected]`

| Definition at line 216 of file vtkMatrix4x4.h.

## Member Function Documentation

vtkMatrix4x4* vtkMatrix4x4::New | ( |  | ) | `[static]`

| Construct a 4x4 identity matrix. Reimplemented from vtkObject.

virtual const char* vtkMatrix4x4::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkObject.

int vtkMatrix4x4::IsTypeOf | ( | const char * | type | ) | `[static]`

| Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject.

virtual int vtkMatrix4x4::IsA | ( | const char * | type | ) | `[virtual]`

| Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkObject.

vtkMatrix4x4* vtkMatrix4x4::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkObject.

void vtkMatrix4x4::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) | `[virtual]`

| Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkObject.

void vtkMatrix4x4::DeepCopy | ( | vtkMatrix4x4 * | source | ) | `[inline]`

| Set the elements of the matrix to the same values as the elements of the source Matrix. Definition at line 75 of file vtkMatrix4x4.h. References vtkObject::Modified(). Referenced by DeepCopy().

void vtkMatrix4x4::DeepCopy | ( | double | Elements[16],
|  | vtkMatrix4x4 * | source
| ) | `[inline, static]`

| Definition at line 79 of file vtkMatrix4x4.h. References DeepCopy(), and Element.

void vtkMatrix4x4::DeepCopy | ( | double | Elements[16],
|  | const double | newElements[16]
| ) | `[static]`

void vtkMatrix4x4::DeepCopy | ( | const double | Elements[16] | ) | `[inline]`

| Non-static member function. Assigns *from* elements array Definition at line 86 of file vtkMatrix4x4.h. References vtkObject::Modified().

void vtkMatrix4x4::Zero | ( |  | ) | `[inline]`

| Set all of the elements to zero. Definition at line 92 of file vtkMatrix4x4.h. References vtkObject::Modified().

void vtkMatrix4x4::Zero | ( | double | Elements[16] | ) | `[static]`

void vtkMatrix4x4::Identity | ( |  | ) | `[inline]`

| Set equal to Identity matrix Definition at line 101 of file vtkMatrix4x4.h. References vtkObject::Modified(). Referenced by vtkMatrix4x4().

void vtkMatrix4x4::Identity | ( | double | Elements[16] | ) | `[static]`

void vtkMatrix4x4::Invert | ( | vtkMatrix4x4 * | in,
|  | vtkMatrix4x4 * | out
| ) | `[inline, static]`

| Matrix Inversion (adapted from Richard Carling in "Graphics Gems," Academic Press, 1990). Definition at line 111 of file vtkMatrix4x4.h. References Element, Invert(), and vtkObject::Modified().

void vtkMatrix4x4::Invert | ( |  | ) | `[inline]`

| Definition at line 113 of file vtkMatrix4x4.h. Referenced by Invert().

void vtkMatrix4x4::Invert | ( | const double | inElements[16],
|  | double | outElements[16]
| ) | `[static]`

void vtkMatrix4x4::Transpose | ( | vtkMatrix4x4 * | in,
|  | vtkMatrix4x4 * | out
| ) | `[inline, static]`

| Transpose the matrix and put it into out. Definition at line 123 of file vtkMatrix4x4.h. References Element, vtkObject::Modified(), and Transpose().

void vtkMatrix4x4::Transpose | ( |  | ) | `[inline]`

| Definition at line 125 of file vtkMatrix4x4.h. Referenced by Transpose().

void vtkMatrix4x4::Transpose | ( | const double | inElements[16],
|  | double | outElements[16]
| ) | `[static]`

void vtkMatrix4x4::MultiplyPoint | ( | const float | in[4],
|  | float | out[4]
| ) | `[inline]`

| Multiply a homogeneous coordinate by this matrix, i.e. out = A*in. The in[4] and out[4] can be the same array. Definition at line 135 of file vtkMatrix4x4.h. Referenced by vtkTransform::MultiplyPoint(), and MultiplyPoint().

void vtkMatrix4x4::MultiplyPoint | ( | const double | in[4],
|  | double | out[4]
| ) | `[inline]`

| Multiply a homogeneous coordinate by this matrix, i.e. out = A*in. The in[4] and out[4] can be the same array. Definition at line 137 of file vtkMatrix4x4.h. References MultiplyPoint().

void vtkMatrix4x4::MultiplyPoint | ( | const double | Elements[16],
|  | const float | in[4],
|  | float | out[4]
| ) | `[static]`

void vtkMatrix4x4::MultiplyPoint | ( | const double | Elements[16],
|  | const double | in[4],
|  | double | out[4]
| ) | `[static]`

float* vtkMatrix4x4::MultiplyPoint | ( | const float | in[4] | ) | `[inline]`

| For use in Java, Python or Tcl. The default MultiplyPoint() uses a single-precision point. Definition at line 151 of file vtkMatrix4x4.h.

float* vtkMatrix4x4::MultiplyFloatPoint | ( | const float | in[4] | ) | `[inline]`

| For use in Java, Python or Tcl. The default MultiplyPoint() uses a single-precision point. Definition at line 153 of file vtkMatrix4x4.h.

double* vtkMatrix4x4::MultiplyDoublePoint | ( | const double | in[4] | ) | `[inline]`

| For use in Java, Python or Tcl. The default MultiplyPoint() uses a single-precision point. Definition at line 155 of file vtkMatrix4x4.h.

void vtkMatrix4x4::Multiply4x4 | ( | vtkMatrix4x4 * | a,
|  | vtkMatrix4x4 * | b,
|  | vtkMatrix4x4 * | c
| ) | `[inline, static]`

| Multiplies matrices a and b and stores the result in c. Definition at line 161 of file vtkMatrix4x4.h. References Element.

void vtkMatrix4x4::Multiply4x4 | ( | const double | a[16],
|  | const double | b[16],
|  | double | c[16]
| ) | `[static]`

void vtkMatrix4x4::Adjoint | ( | vtkMatrix4x4 * | in,
|  | vtkMatrix4x4 * | out
| ) | `[inline]`

| Compute adjoint of the matrix and put it into out. Definition at line 171 of file vtkMatrix4x4.h. References Element.

void vtkMatrix4x4::Adjoint | ( | const double | inElements[16],
|  | double | outElements[16]
| ) | `[static]`

double vtkMatrix4x4::Determinant | ( |  | ) | `[inline]`

| Compute the determinant of the matrix and return it. Definition at line 179 of file vtkMatrix4x4.h. Referenced by Determinant().

double vtkMatrix4x4::Determinant | ( | const double | Elements[16] | ) | `[static]`

void vtkMatrix4x4::SetElement | ( | int | i,
|  | int | j,
|  | double | value
| ) | `[inline]`

| Sets the element i,j in the matrix. Definition at line 225 of file vtkMatrix4x4.h. References Element, and vtkObject::Modified().

double vtkMatrix4x4::GetElement | ( | int | i,
|  | int | j
| ) | const`[inline]`

| Returns the element i,j from the matrix. Definition at line 189 of file vtkMatrix4x4.h.

double* vtkMatrix4x4::operator[] | ( | const unsigned int | i | ) | `[inline]`

| Definition at line 194 of file vtkMatrix4x4.h.

const double* vtkMatrix4x4::operator[] | ( | unsigned int | i | ) | const`[inline]`

| Definition at line 196 of file vtkMatrix4x4.h.

void vtkMatrix4x4::Adjoint | ( | vtkMatrix4x4 & | in,
|  | vtkMatrix4x4 & | out
| ) | `[inline]`

| Definition at line 198 of file vtkMatrix4x4.h.

double vtkMatrix4x4::Determinant | ( | vtkMatrix4x4 & | in | ) | `[inline]`

| Definition at line 200 of file vtkMatrix4x4.h.

double vtkMatrix4x4::Determinant | ( | vtkMatrix4x4 * | in | ) | `[inline]`

| Definition at line 202 of file vtkMatrix4x4.h. References Determinant(), and Element.

void vtkMatrix4x4::Invert | ( | vtkMatrix4x4 & | in,
|  | vtkMatrix4x4 & | out
| ) | `[inline]`

| Definition at line 204 of file vtkMatrix4x4.h.

void vtkMatrix4x4::Transpose | ( | vtkMatrix4x4 & | in,
|  | vtkMatrix4x4 & | out
| ) | `[inline]`

| Definition at line 206 of file vtkMatrix4x4.h.

void vtkMatrix4x4::PointMultiply | ( | const double | Elements[16],
|  | const float | in[4],
|  | float | out[4]
| ) | `[static]`

void vtkMatrix4x4::PointMultiply | ( | const double | Elements[16],
|  | const double | in[4],
|  | double | out[4]
| ) | `[static]`

## Member Data Documentation

double vtkMatrix4x4::Element[4][4]

| Definition at line 64 of file vtkMatrix4x4.h. Referenced by Adjoint(), vtkTransform::Concatenate(), vtkPerspectiveTransform::Concatenate(), vtkGeneralTransform::Concatenate(), DeepCopy(), Determinant(), Invert(), Multiply4x4(), SetElement(), vtkTransform::SetMatrix(), vtkPerspectiveTransform::SetMatrix(), and Transpose().

float vtkMatrix4x4::FloatPoint[4]`[protected]`

| Definition at line 218 of file vtkMatrix4x4.h.

double vtkMatrix4x4::DoublePoint[4]`[protected]`

| Definition at line 219 of file vtkMatrix4x4.h.

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

- Common/vtkMatrix4x4.h