NAMD
Classes | Functions
Matrix4.h File Reference

Go to the source code of this file.

Classes

class  Matrix4
 4x4 matrix class with numerous operators, conversions, etc. More...
 

Functions

void trans_from_rotate (const double mat3[9], Matrix4 *mat4)
 Transform 3x3 into 4x4 matrix: More...
 
void print_Matrix4 (const Matrix4 *mat4)
 Print formatted matrix. More...
 

Function Documentation

void print_Matrix4 ( const Matrix4 mat4)

Print formatted matrix.

Definition at line 379 of file Matrix4.C.

References Matrix4::mat.

379  {
380  int i, j;
381  for (i=0; i<4; i++) {
382  for (j=0; j<4; j++) {
383  printf("%f ", mat4->mat[4*j+i]);
384  }
385  printf("\n");
386  }
387  printf("\n");
388 }
double mat[16]
the matrix itself
Definition: Matrix4.h:33
void trans_from_rotate ( const double  mat3[9],
Matrix4 mat4 
)

Transform 3x3 into 4x4 matrix:

Definition at line 369 of file Matrix4.C.

References Matrix4::mat.

369  {
370  int i;
371  for (i=0; i<3; i++) {
372  mat4->mat[0+i] = mat3[3*i];
373  mat4->mat[4+i] = mat3[3*i+1];
374  mat4->mat[8+i] = mat3[3*i+2];
375  }
376 }
double mat[16]
the matrix itself
Definition: Matrix4.h:33