32 #ifndef vtkMatrix4x4_h
33 #define vtkMatrix4x4_h
66 static void DeepCopy(
double Elements[16],
const double newElements[16]);
81 static void Zero(
double Elements[16]);
90 static void Identity(
double Elements[16]);
102 static void Invert(
const double inElements[16],
double outElements[16]);
114 static void Transpose(
const double inElements[16],
double outElements[16]);
128 static void MultiplyPoint(
const double Elements[16],
129 const float in[4],
float out[4]);
130 static void MultiplyPoint(
const double Elements[16],
131 const double in[4],
double out[4]);
138 {
return this->MultiplyFloatPoint(in); }
140 {this->MultiplyPoint(in,this->FloatPoint);
return this->FloatPoint; }
142 {this->MultiplyPoint(in,this->DoublePoint);
return this->DoublePoint; }
150 static void Multiply4x4(
const double a[16],
const double b[16],
160 static void Adjoint(
const double inElements[16],
double outElements[16]);
168 static double Determinant(
const double Elements[16]);
173 void SetElement(
int i,
int j,
double value);
178 {
return this->Element[i][j];}
183 {
return &(this->Element[i][0]);}
185 {
return &(this->Element[i][0]); }
187 {this->Adjoint(&in,&out);}
189 {
return this->Determinant(&in);}
193 {this->Invert(&in,&out);}
195 {this->Transpose(&in,&out);}
196 static void PointMultiply(
const double Elements[16],
197 const float in[4],
float out[4]);
198 static void PointMultiply(
const double Elements[16],
199 const double in[4],
double out[4]);
207 double DoublePoint[4];
210 typedef double (*SqMatPtr)[4];
211 typedef const double (*ConstSqMatPtr)[4];
222 ConstSqMatPtr aMat =
reinterpret_cast<ConstSqMatPtr
>(a);
223 ConstSqMatPtr bMat =
reinterpret_cast<ConstSqMatPtr
>(b);
226 SqMatPtr cMat =
reinterpret_cast<SqMatPtr
>(tmp);
228 for (
int i = 0; i < 4; i++)
230 for (
int k = 0; k < 4; k++)
232 cMat[i][k] = aMat[i][0] * bMat[0][k] +
233 aMat[i][1] * bMat[1][k] +
234 aMat[i][2] * bMat[2][k] +
235 aMat[i][3] * bMat[3][k];
240 memcpy(c, tmp, 16 *
sizeof(
double));
253 if (this->
Element[i][j] != value)
void Transpose(vtkMatrix4x4 &in, vtkMatrix4x4 &out)
abstract base class for most VTK objects
represent and manipulate 4x4 transformation matrices
void Adjoint(const vtkMatrix4x4 *in, vtkMatrix4x4 *out)
float * MultiplyFloatPoint(const float in[4])
double GetElement(int i, int j) const
void DeepCopy(vtkPistonReference *self, vtkPistonReference *other)
void SetElement(int i, int j, double value)
void MultiplyPoint(const double in[4], double out[4])
void MultiplyPoint(const float in[4], float out[4])
void DeepCopy(const vtkMatrix4x4 *source)
virtual void PrintSelf(ostream &os, vtkIndent indent)
static void Multiply4x4(const vtkMatrix4x4 *a, const vtkMatrix4x4 *b, vtkMatrix4x4 *c)
a simple class to control print indentation
static void Invert(const vtkMatrix4x4 *in, vtkMatrix4x4 *out)
double * MultiplyDoublePoint(const double in[4])
const double * operator[](unsigned int i) const
static void DeepCopy(double Elements[16], const vtkMatrix4x4 *source)
static void Transpose(const vtkMatrix4x4 *in, vtkMatrix4x4 *out)
boost::graph_traits< vtkGraph * >::vertex_descriptor source(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
double Determinant(vtkMatrix4x4 *in)
void Invert(vtkMatrix4x4 &in, vtkMatrix4x4 &out)
float * MultiplyPoint(const float in[4])
double Determinant(vtkMatrix4x4 &in)
void DeepCopy(const double Elements[16])
void Adjoint(vtkMatrix4x4 &in, vtkMatrix4x4 &out)
double * operator[](const unsigned int i)
#define VTKCOMMONMATH_EXPORT