Go to the documentation of this file.
35 #ifndef vtkMatrix4x4_h
36 #define vtkMatrix4x4_h
38 #include "vtkCommonMathModule.h"
87 static void Zero(
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]);
125 const float in[4],
float out[4]);
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]);
166 void SetElement(
int i,
int j,
double value);
172 {
return this->Element[i][j];}
178 VTK_LEGACY(
double *
operator[](
const unsigned int i));
179 VTK_LEGACY(
const double *
operator[](
unsigned int i)
const);
185 VTK_LEGACY(
static void PointMultiply(
const double [16],
186 const float [4],
float [4]));
187 VTK_LEGACY(
static void PointMultiply(
const double [16],
188 const double [4],
double [4]));
196 double DoublePoint[4];
200 void operator= (
const vtkMatrix4x4&) VTK_DELETE_FUNCTION;
210 for (
int i = 0; i < 16; i += 4)
212 for (
int j = 0; j < 4; j++)
214 tmp[i + j] = a[i + 0] * b[j + 0] +
215 a[i + 1] * b[j + 4] +
216 a[i + 2] * b[j + 8] +
217 a[i + 3] * b[j + 12];
221 for (
int k = 0; k < 16; k++)
237 if (this->Element[i][j] !=
value)
239 this->Element[i][j] =
value;
void SetElement(int i, int j, double value)
Sets the element i,j in the matrix.
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
void DeepCopy(const vtkMatrix4x4 *source)
Set the elements of the matrix to the same values as the elements of the given source matrix.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double Element[4][4]
The internal data is public for historical reasons. Do not use!
double Determinant(vtkMatrix4x4 &in)
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 double Determinant(const double elements[16])
float * MultiplyPoint(const float in[4])
For use in Java, Python or Tcl.
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.
static void Adjoint(const double inElements[16], double outElements[16])
static void Zero(double elements[16])
double Determinant(vtkMatrix4x4 *)
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
static vtkMatrix4x4 * New()
Construct a 4x4 identity matrix.
void Invert(vtkMatrix4x4 &in, vtkMatrix4x4 &out)
void Adjoint(const vtkMatrix4x4 *in, vtkMatrix4x4 *out)
Compute adjoint of the matrix and put it into out.
void Adjoint(vtkMatrix4x4 &in, vtkMatrix4x4 &out)
static void MultiplyPoint(const double elements[16], const double in[4], double out[4])
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 Transpose(vtkMatrix4x4 &in, vtkMatrix4x4 &out)
static void Invert(const double inElements[16], double outElements[16])
static void DeepCopy(double destination[16], const double source[16])
Copies the given source buffer to the given destination buffer.
float * MultiplyFloatPoint(const float in[4])
static void MultiplyPoint(const double elements[16], const float in[4], float out[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,...
static void Transpose(const double inElements[16], double outElements[16])
double * MultiplyDoublePoint(const double in[4])
static void Identity(double elements[16])
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.