NanoShaper
0.3.1
NanoShaper is a tool able to triangulate and inspect an arbitray triangulated surface or several types of molecular surfaces such as the Gaussian, Skin and the SES
|
This class builds and converts to a DelPhi suitable representation the Connolly Surface. All the gathered info is analytically computed both the intersections and the projections. First the alpha shape of the set of atoms is computed, then from that the Connolly surface is computed. More...
#include <ConnollySurface.h>
Public Member Functions | |
ConnollySurface () | |
ConnollySurface (DelPhiShared *ds) | |
virtual bool | build () |
virtual bool | save (char *fileName) |
virtual bool | load (char *fileName) |
virtual void | printSummary () |
virtual bool | getProjection (double p[3], double *proj1, double *proj2, double *proj3, double *normal1, double *normal2, double *normal3) |
virtual void | getRayIntersection (double p1[3], double p2[3], vector< pair< double, double * > > &intersections, int thdID) |
virtual void | preProcessPanel () |
virtual void | postRayCasting () |
virtual bool | preBoundaryProjection () |
void | setProbeRadius (double pr) |
double | getProbeRadius () |
void | setSavePovRay (bool ss) |
bool | getSavePovRay () |
void | setAuxGrid (unsigned int dim, unsigned int max) |
void | setAuxGrid2D (unsigned int dim, unsigned int max) |
This class builds and converts to a DelPhi suitable representation the Connolly Surface. All the gathered info is analytically computed both the intersections and the projections. First the alpha shape of the set of atoms is computed, then from that the Connolly surface is computed.
ConnollySurface::ConnollySurface | ( | ) |
Default constructor
ConnollySurface::ConnollySurface | ( | DelPhiShared * | ds | ) |
set DelPhi environment
bool ConnollySurface::build | ( | ) | [virtual] |
Compute connolly surface. Call it after load
Implements Surface.
bool ConnollySurface::getProjection | ( | double | p[3], |
double * | proj1, | ||
double * | proj2, | ||
double * | proj3, | ||
double * | normal1, | ||
double * | normal2, | ||
double * | normal3 | ||
) | [virtual] |
Get a projection of a point on the surface. Return projection and normal
Implements Surface.
void ConnollySurface::getRayIntersection | ( | double | p1[3], |
double | p2[3], | ||
vector< pair< double, double * > > & | intersections, | ||
int | thdID | ||
) | [virtual] |
Get all the intersections of a ray that goes from P1 to P2 over the surface. The interesctions are returned with increasing distance order. the first double in the vector is the t parameter for the intersection of the parametric line and the surface, the double pointer is the normal vector. During ray surface intersection the previously built auxiliary grid is used to speed up computations
Implements Surface.
bool ConnollySurface::load | ( | char * | fileName | ) | [virtual] |
Load the surface from a file in .ses format
Implements Surface.
void ConnollySurface::postRayCasting | ( | ) | [virtual] |
this function is called after ray casting to perform any post processing, such as memory clean-up, after ray casting
Reimplemented from Surface.
bool ConnollySurface::preBoundaryProjection | ( | ) | [virtual] |
this function is called before boundary grid projection to perform any pre-processing, such as memory setup-up.
Reimplemented from Surface.
void ConnollySurface::preProcessPanel | ( | ) | [virtual] |
pre-process panel to accelerate ray-tracing
Reimplemented from Surface.
void ConnollySurface::printSummary | ( | ) | [virtual] |
Print number of cells and types
Implements Surface.
bool ConnollySurface::save | ( | char * | fileName | ) | [virtual] |
Save it in a simple ASCII format (.ses)
Implements Surface.
void ConnollySurface::setAuxGrid | ( | unsigned int | dim, |
unsigned int | max | ||
) | [inline] |
for the 3d grid set the max grid size and the maximal number of patches inside a grid cube
void ConnollySurface::setAuxGrid2D | ( | unsigned int | dim, |
unsigned int | max | ||
) | [inline] |
for the 2d grid set the max grid size and the maximal number of patches inside a grid cube. The grid cube itself does not exist just a reference, indeed the real quantity is MAX_CONNOLLY_CELLS_2D that is the number of patches along the grid tube