Matrix4.C File Reference

#include <math.h>
#include <string.h>
#include <stdio.h>
#include "Matrix4.h"

Go to the source code of this file.

Defines

#define VMD_PI   3.14159265358979323846
#define VMD_TWOPI   (2.0 * VMD_PI)
#define DEGTORAD(a)   (a*VMD_PI/180.0)
#define RADTODEG(a)   (a*180.0/VMD_PI)
#define MATSWAP(a, b)   {temp=(a);(a)=(b);(b)=temp;}

Functions

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


Define Documentation

#define DEGTORAD (  )     (a*VMD_PI/180.0)

Definition at line 31 of file Matrix4.C.

Referenced by obj_transabout(), and Matrix4::rot().

#define MATSWAP ( a,
 )     {temp=(a);(a)=(b);(b)=temp;}

Definition at line 109 of file Matrix4.C.

Referenced by Matrix4::inverse().

#define RADTODEG (  )     (a*180.0/VMD_PI)

Definition at line 32 of file Matrix4.C.

Referenced by Matrix4::rotate_axis(), Matrix4::transvec(), and Matrix4::transvecinv().

#define VMD_PI   3.14159265358979323846

Definition at line 29 of file Matrix4.C.

Referenced by obj_transabout().

#define VMD_TWOPI   (2.0 * VMD_PI)

Definition at line 30 of file Matrix4.C.


Function Documentation

void print_Matrix4 ( const Matrix4 mat4  ) 

Print formatted matrix.

Definition at line 379 of file Matrix4.C.

References j, and Matrix4::mat.

00379                                         {
00380   int i, j;
00381   for (i=0; i<4; i++) {
00382     for (j=0; j<4; j++) {
00383       printf("%f ", mat4->mat[4*j+i]);
00384     }
00385     printf("\n");
00386   }
00387   printf("\n");
00388 }

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.

00369                                                              {
00370   int i;
00371   for (i=0; i<3; i++) {
00372     mat4->mat[0+i] = mat3[3*i];
00373     mat4->mat[4+i] = mat3[3*i+1];
00374     mat4->mat[8+i] = mat3[3*i+2];
00375   }
00376 }


Generated on Sun Nov 19 01:17:16 2017 for NAMD by  doxygen 1.4.7