astex
Class Surface

java.lang.Object
  extended by astex.Surface

public class Surface
extends java.lang.Object

A class for generating three dimensional surfaces.


Field Summary
static int lastClip
          The last atom that clipped a point.
 
Constructor Summary
Surface()
           
 
Method Summary
static void clipSurface(Tmesh surface, boolean solid)
           
static Tmesh connolly(DynamicArray atoms, double gridSpacing, boolean solid)
          Create a soft object surface.
static void debug(java.lang.String s)
          Print a debuggin message.
static double distance(double xa, double ya, double za, double xb, double yb, double zb)
          Calculate the distance between two points.
static double distance2(double xa, double ya, double za, double xb, double yb, double zb)
          Calucate the sqaured distance between two points.
static Tmesh dotSurface(DynamicArray selectedAtoms, int subDivisions)
          Generate a dot surface.
static void fixNormals(Tmesh surface)
          Make better normals for the surface.
static void initialiseGrid(double minSpacing)
          Find the size of the atoms that we will surface.
static int obscured(double x, double y, double z, int a, int b)
          Is the point within one of the atoms in the list.
static void projectPoints()
          Project the points inside the atoms onto the surface.
static void projectTorii()
          Project the points inside the atoms onto the surface.
static void projectTorus(int a, int b)
          Project the points of a torus onto the grid.
static void setDebug(boolean d)
          Turn debugging on/off.
static void setMaximumGridsize(int gs)
          Set the maximum grid size.
static void setMinimumSpacing(double s)
          Set the minimum grid spacing.
static void setProbeRadius(double radius)
          Set the probe radius.
static void sphereGen(int subDivisions)
          Initialise the dot sphere structures.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastClip

public static int lastClip
The last atom that clipped a point.

Constructor Detail

Surface

public Surface()
Method Detail

debug

public static void debug(java.lang.String s)
Print a debuggin message.


setDebug

public static void setDebug(boolean d)
Turn debugging on/off.


setProbeRadius

public static void setProbeRadius(double radius)
Set the probe radius.


setMinimumSpacing

public static void setMinimumSpacing(double s)
Set the minimum grid spacing.


setMaximumGridsize

public static void setMaximumGridsize(int gs)
Set the maximum grid size.


connolly

public static Tmesh connolly(DynamicArray atoms,
                             double gridSpacing,
                             boolean solid)
Create a soft object surface.


fixNormals

public static void fixNormals(Tmesh surface)
Make better normals for the surface.


clipSurface

public static void clipSurface(Tmesh surface,
                               boolean solid)

projectPoints

public static void projectPoints()
Project the points inside the atoms onto the surface.


projectTorii

public static void projectTorii()
Project the points inside the atoms onto the surface.


projectTorus

public static void projectTorus(int a,
                                int b)
Project the points of a torus onto the grid.


distance

public static double distance(double xa,
                              double ya,
                              double za,
                              double xb,
                              double yb,
                              double zb)
Calculate the distance between two points.


distance2

public static double distance2(double xa,
                               double ya,
                               double za,
                               double xb,
                               double yb,
                               double zb)
Calucate the sqaured distance between two points.


obscured

public static int obscured(double x,
                           double y,
                           double z,
                           int a,
                           int b)
Is the point within one of the atoms in the list. Caches the last atom that clipped a point, as this often clips the next point. a and b are omitted from the check. Return value of -1 indicates that the point was not obscured by any atom in the neighbour list.


initialiseGrid

public static void initialiseGrid(double minSpacing)
Find the size of the atoms that we will surface.


sphereGen

public static void sphereGen(int subDivisions)
Initialise the dot sphere structures.


dotSurface

public static Tmesh dotSurface(DynamicArray selectedAtoms,
                               int subDivisions)
Generate a dot surface.