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++)
225 if (this->Element[i][j] != value)
227 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 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.
double * GetData()
Returns the raw double array holding the matrix.
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.
#define VTK_SIZEHINT(...)
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 or Python.
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...