35 #ifndef vtkMatrix4x4_h
36 #define vtkMatrix4x4_h
38 #include "vtkCommonMathModule.h"
73 static void DeepCopy(
double destination[16],
const double source[16]);
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];}
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;
205 inline
void vtkMatrix4x4::Multiply4x4(const
double a[16], const
double b[16],
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;
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...
abstract base class for most VTK objects
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.
void Adjoint(const vtkMatrix4x4 *in, vtkMatrix4x4 *out)
Compute adjoint of the matrix and put it into out.
float * MultiplyFloatPoint(const float in[4])
double GetElement(int i, int j) const
Returns the element i,j from the matrix.
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
void SetElement(int i, int j, double value)
Sets the element i,j in the matrix.
void MultiplyPoint(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.
void DeepCopy(const vtkMatrix4x4 *source)
Set the elements of the matrix to the same values as the elements of the given source matrix...
static void Multiply4x4(const vtkMatrix4x4 *a, const vtkMatrix4x4 *b, vtkMatrix4x4 *c)
Multiplies matrices a and b and stores the result in c.
a simple class to control print indentation
static void Invert(const vtkMatrix4x4 *in, vtkMatrix4x4 *out)
Matrix Inversion (adapted from Richard Carling in "Graphics Gems," Academic Press, 1990).
void Identity()
Set equal to Identity matrix.
double * MultiplyDoublePoint(const double in[4])
virtual void Modified()
Update the modification time for this object.
static void Transpose(const vtkMatrix4x4 *in, vtkMatrix4x4 *out)
Transpose the matrix and put it into out.
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
double Determinant()
Compute the determinant of the matrix and return it.
double Element[4][4]
The internal data is public for historical reasons. Do not use!
float * MultiplyPoint(const float in[4])
For use in Java, Python or Tcl.
void DeepCopy(const double elements[16])
Non-static member function.
void Zero()
Set all of the elements to zero.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...