Matrix4Symmetry Class Reference

`#include <Matrix4Symmetry.h>`

List of all members.

Public Member Functions

Matrix4Symmetry ()
Matrix4Symmetry (const BigReal *)
Matrix4Symmetry (BigReal[])
void multpoint (BigReal point[3]) const
void identity ()
void transpose ()
void multmatrix (const Matrix4Symmetry &)
premultiply the matrix by the given matrix, this->other * this
void translate (BigReal x, BigReal y, BigReal z)
void translate (BigReal d[3])

BigReal mat [16]

Detailed Description

Definition at line 5 of file Matrix4Symmetry.h.

Constructor & Destructor Documentation

 Matrix4Symmetry::Matrix4Symmetry ( )

Definition at line 3 of file Matrix4Symmetry.C.

References identity().

```00003 { identity(); }
```

 Matrix4Symmetry::Matrix4Symmetry ( const BigReal * )

Definition at line 4 of file Matrix4Symmetry.C.

References mat.

```00004 { memcpy(mat, m, 16*sizeof(BigReal)); }
```

 Matrix4Symmetry::Matrix4Symmetry ( BigReal [] )

Definition at line 5 of file Matrix4Symmetry.C.

References mat.

```00005                                               {
00006     for(int i = 0; i < 16; i++){mat[i] = arr[i];}
00007   }
```

Member Function Documentation

 void Matrix4Symmetry::identity ( )

Definition at line 20 of file Matrix4Symmetry.C.

References mat.

Referenced by Matrix4Symmetry().

```00020                                {
00021     memset(mat, 0, 16*sizeof(BigReal));
00022     mat[0]=1.0f;
00023     mat[5]=1.0f;
00024     mat[10]=1.0f;
00025     mat[15]=1.0f;
00026   }
```

 void Matrix4Symmetry::multmatrix ( const Matrix4Symmetry & )

premultiply the matrix by the given matrix, this->other * this

Definition at line 38 of file Matrix4Symmetry.C.

References j, and mat.

Referenced by translate().

```00038                                                          {
00039     BigReal tmp[4];
00040     for (int j=0; j<4; j++) {
00041       tmp[0] = mat[j];
00042       tmp[1] = mat[4+j];
00043       tmp[2] = mat[8+j];
00044       tmp[3] = mat[12+j];
00045       for (int i=0; i<4; i++) {
00046         mat[4*i+j] = m.mat[4*i]*tmp[0] + m.mat[4*i+1]*tmp[1] +
00047           m.mat[4*i+2]*tmp[2] + m.mat[4*i+3]*tmp[3];
00048       }
00049     }
00050   }
```

 void Matrix4Symmetry::multpoint ( BigReal point[3] ) const

Definition at line 8 of file Matrix4Symmetry.C.

References mat.

```00008                                                       {
00009     BigReal tmp[3];
00010     BigReal itmp3 = 1.0f / (point[0]*mat[3] + point[1]*mat[7] +
00011                             point[2]*mat[11] + mat[15]);
00012     tmp[0] = itmp3*point[0];
00013     tmp[1] = itmp3*point[1];
00014     tmp[2] = itmp3*point[2];
00015     point[0]=tmp[0]*mat[0] + tmp[1]*mat[4] + tmp[2]*mat[ 8] + itmp3*mat[12];
00016     point[1]=tmp[0]*mat[1] + tmp[1]*mat[5] + tmp[2]*mat[ 9] + itmp3*mat[13];
00017     point[2]=tmp[0]*mat[2] + tmp[1]*mat[6] + tmp[2]*mat[10] + itmp3*mat[14];
00018   }
```

 void Matrix4Symmetry::translate ( BigReal d[3] )

Definition at line 58 of file Matrix4Symmetry.C.

References translate().

```00058 { translate(d[0], d[1], d[2]); }
```

 void Matrix4Symmetry::translate ( BigReal x, BigReal y, BigReal z )

Definition at line 51 of file Matrix4Symmetry.C.

References mat, and multmatrix().

Referenced by translate().

```00051                                                                {
00052     Matrix4Symmetry m;
00053     m.mat[12] = x;
00054     m.mat[13] = y;
00055     m.mat[14] = z;
00056     multmatrix(m);
00057   }
```

 void Matrix4Symmetry::transpose ( )

Definition at line 27 of file Matrix4Symmetry.C.

References j, and mat.

```00027                                 {
00028     BigReal tmp[16];
00029     int i,j;
00030     for(i=0;i<4;i++) {
00031       for(j=0;j<4;j++) {
00032         tmp[4*i+j] = mat[i+4*j];
00033       }
00034     }
00035     for(i=0;i<16;i++) mat[i] = tmp[i];
00036   }
```

Member Data Documentation

Definition at line 7 of file Matrix4Symmetry.h.

Referenced by identity(), Matrix4Symmetry(), multmatrix(), multpoint(), translate(), and transpose().

The documentation for this class was generated from the following files:
Generated on Tue Aug 14 01:17:20 2018 for NAMD by  1.4.7