NanoShaper  0.7.2
NanoShaper is a tool able to triangulate and inspect an arbitray triangulated surface or several types of molecular surfaces
SkinSurface Class Reference

This class builds and converts to a DelPhi suitable representation the Skin Surface. All the gathered info is analytically computed both the intersections and the projections. In order to get an accurate result for the projection routine, as root finding algorithm is used the method of the companion matrix. The Skin surface was defined in: "H. Edelsbrunner. Deformable smooth surface design. Discrete Comput. Geom., 21:87-115, 1999." More...

#include <SkinSurface.h>

Inheritance diagram for SkinSurface:
Surface

List of all members.

Public Member Functions

 SkinSurface ()
 SkinSurface (DelPhiShared *ds)
 SkinSurface (ConfigFile *cf, 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, bool computeNormals)
virtual void init ()
virtual void init (ConfigFile *cf)
virtual void clear ()
virtual void preProcessPanel ()
virtual void postRayCasting ()
virtual bool preBoundaryProjection ()
void setShrinking (double ss)
void setFastProjection (bool useFastProjection)
double getShrinking ()
void setSavePovRay (bool ss)
bool getSavePovRay ()
void setAuxGrid (unsigned int dim, unsigned int max)
void setAuxGrid2D (unsigned int dim, unsigned int max)

Detailed Description

This class builds and converts to a DelPhi suitable representation the Skin Surface. All the gathered info is analytically computed both the intersections and the projections. In order to get an accurate result for the projection routine, as root finding algorithm is used the method of the companion matrix. The Skin surface was defined in: "H. Edelsbrunner. Deformable smooth surface design. Discrete Comput. Geom., 21:87-115, 1999."

Author:
Sergio Decherchi
Date:
30/10/2012

Constructor & Destructor Documentation

SkinSurface::SkinSurface ( )

Default constructor

SkinSurface::SkinSurface ( DelPhiShared ds)

set DelPhi environment

SkinSurface::SkinSurface ( ConfigFile *  cf,
DelPhiShared ds 
)

set configuration and DelPhi environment


Member Function Documentation

bool SkinSurface::build ( ) [virtual]

Compute skin surface. Call it after load

Implements Surface.

void SkinSurface::clear ( ) [virtual]

function for the denstructor

Implements Surface.

bool SkinSurface::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 SkinSurface::getRayIntersection ( double  p1[3],
double  p2[3],
vector< pair< double, double * > > &  intersections,
int  thdID,
bool  computeNormals 
) [inline, 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.

void SkinSurface::init ( ) [virtual]

function for the constructor without arguments

Implements Surface.

void SkinSurface::init ( ConfigFile *  cf) [virtual]

functions for the constructor with config file argument

Implements Surface.

bool SkinSurface::load ( char *  fileName) [virtual]

Load the surface from a file in .skin format

Implements Surface.

void SkinSurface::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 SkinSurface::preBoundaryProjection ( ) [virtual]

this function is called before boundary grid projection to perform any pre-processing, such as memory setup-up.

Reimplemented from Surface.

void SkinSurface::preProcessPanel ( ) [virtual]

pre-process panel to accelerate ray-tracing

Reimplemented from Surface.

void SkinSurface::printSummary ( ) [virtual]

Print number of mixed cells and types

Implements Surface.

bool SkinSurface::save ( char *  fileName) [virtual]

Save it in a simple ASCII format (.skin)

save in .skin format

Implements Surface.

void SkinSurface::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 SkinSurface::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_MIXEDCELLS_2D that is the number of patches along the grid tube


The documentation for this class was generated from the following files: