Go to the documentation of this file.
35 #ifndef vtkMatrix4x4_h
36 #define vtkMatrix4x4_h
38 #include "vtkCommonMathModule.h"
73 static void DeepCopy(
double destination[16],
const double source[16]);
80 { this->DeepCopy(*this->Element, elements); this->
Modified(); }
87 static void Zero(
double elements[16]);
94 static void Identity(
double elements[16]);
104 static void Invert(
const double inElements[16],
double outElements[16]);
113 static void Transpose(
const double inElements[16],
double outElements[16]);
124 static void MultiplyPoint(
const double elements[16],
125 const float in[4],
float out[4]);
126 static void MultiplyPoint(
const double elements[16],
127 const double in[4],
double out[4]);
134 {
return this->MultiplyFloatPoint(in); }
136 {this->MultiplyPoint(in,this->FloatPoint);
return this->FloatPoint; }
138 {this->MultiplyPoint(in,this->DoublePoint);
return this->DoublePoint; }
146 static void Multiply4x4(
const double a[16],
const double b[16],
155 static void Adjoint(
const double inElements[16],
double outElements[16]);
161 static double Determinant(
const double elements[16]);
166 void SetElement(
int i,
int j,
double value);
172 {
return this->Element[i][j];}
184 double DoublePoint[4];
198 for (
int i = 0; i < 16; i += 4)
200 for (
int j = 0; j < 4; j++)
202 tmp[i + j] = a[i + 0] * b[j + 0] +
203 a[i + 1] * b[j + 4] +
204 a[i + 2] * b[j + 8] +
205 a[i + 3] * b[j + 12];
209 for (
int k = 0; k < 16; k++)
void SetElement(int i, int j, double value)
Sets the element i,j in the matrix.
void DeepCopy(const vtkMatrix4x4 *source)
Set the elements of the matrix to the same values as the elements of the given source matrix.
double Element[4][4]
The internal data is public for historical reasons. Do not use!
static void DeepCopy(double destination[16], const vtkMatrix4x4 *source)
Set the elements of the given destination buffer to the same values as the elements of the given sour...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
float * MultiplyPoint(const float in[4])
For use in Java or Python.
double GetElement(int i, int j) const
Returns the element i,j from the matrix.
void MultiplyPoint(const double in[4], double out[4])
virtual void Modified()
Update the modification time for this object.
abstract base class for most VTK objects
double Determinant()
Compute the determinant of the matrix and return it.
double * GetData()
Returns the raw double array holding the matrix.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
#define VTK_SIZEHINT(...)
void Adjoint(const vtkMatrix4x4 *in, vtkMatrix4x4 *out)
Compute adjoint of the matrix and put it into out.
void MultiplyPoint(const float in[4], float out[4])
Multiply a homogeneous coordinate by this matrix, i.e.
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
float * MultiplyFloatPoint(const float in[4])
static void Multiply4x4(const vtkMatrix4x4 *a, const vtkMatrix4x4 *b, vtkMatrix4x4 *c)
Multiplies matrices a and b and stores the result in c.
void DeepCopy(const double elements[16])
Non-static member function.
static void Invert(const vtkMatrix4x4 *in, vtkMatrix4x4 *out)
Matrix Inversion (adapted from Richard Carling in "Graphics Gems," Academic Press,...
double * MultiplyDoublePoint(const double in[4])
void Identity()
Set equal to Identity matrix.
void Zero()
Set all of the elements to zero.
static void Transpose(const vtkMatrix4x4 *in, vtkMatrix4x4 *out)
Transpose the matrix and put it into out.