| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteinshader.graphics.displaylists.SphereReferences
public class SphereReferences
Stores information on multiple OpenGL display lists that can be used for rendering spheres with different degrees of detail.
| Field Summary | |
|---|---|
| static double | COEFFICIENTThe empirically-determined coefficient for the power equation is 226.1. | 
| static double | DEFAULT_RADIUSThe spheres cached by this class will use a default radius of 1.0. | 
| static int | DEFAULT_TILINGThe default tiling is 12, and is used to set the initial number of slices and stacks for a generic sphere for SPACE_FILLING style displays and a generic sphere for BALLS_AND_STICKS style displays. | 
| static double | EXPONENTThe empirically-determined exponent for the power equation is -0.7367. | 
| static int | MAX_TILINGThe maximum tiling number (slices and stacks) for spheres cached by this class is 57, while the minimum will be the MIN_TILING declared in class Sphere, which is 3. | 
| Constructor Summary | |
|---|---|
| SphereReferences()Constructs a SphereReferences object. | |
| Method Summary | |
|---|---|
|  void | cacheDefaultSpheres(GL gl,
                    Sphere sphere)Caches a collection of spheres using OpenGL display lists. | 
|  void | cacheSphereDisplayList(GL gl,
                       Sphere sphere,
                       SphereListInfo info)Caches a new OpenGL display list for a SPACE_FILLING sphere or a BALLS_AND_STICKS sphere with the requested tiling (number of slices and stacks). | 
|  int | getBallsAndSticksRef()Returns the name (an integer) of an OpenGL display list for a sphere intended to be used for a Balls-and-Sticks style display. | 
|  int | getBallsAndSticksRef(double cameraDistance)Returns the name (an integer) of an OpenGL display list for a sphere intended to be used for a Balls-and-Sticks style display. | 
|  SphereListInfo | getBallsAndSticksSphereInfo()Returns the SphereListInfo object that holds the information on an OpenGL display list for a sphere to be used in a BALLS_AND_STICKS style display. | 
|  int | getSpaceFillingRef()Returns the name (an integer) of an OpenGL display list for a sphere intended to be used for Space-Filling style displays. | 
|  int | getSpaceFillingRef(double cameraDistance)Returns the name (an integer) of an OpenGL display list for a sphere intended to be used for a Space-Filling style display. | 
|  int | getSpaceFillingSlices()Returns the number of slices that should be used for a sphere if automatic calculation of tiling number is turned off. | 
|  SphereListInfo | getSpaceFillingSphereInfo()Returns the SphereListInfo object that holds the information on an OpenGL display list for a sphere to be used for SPACE_FILLING style. | 
|  int | getSpaceFillingStacks()Returns the number of stacks that should be used for a sphere if automatic calculation of tiling number is turned off. | 
|  int | getSpaceFillingTilingNumber(double cameraDistance)Returns the recommended level of detail (tiling number = slices = stacks) for rendering a sphere at a given camera distance in angstroms. | 
|  void | printAutoTilingNumbers(boolean b)If automatic tiling is in use, giving this method an argument of true will cause the tiling numbers to be printed to standard out for testing and debugging purposes. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final double DEFAULT_RADIUS
public static final int MAX_TILING
public static final int DEFAULT_TILING
public static final double COEFFICIENT
public static final double EXPONENT
| Constructor Detail | 
|---|
public SphereReferences()
| Method Detail | 
|---|
public void printAutoTilingNumbers(boolean b)
b - boolean value for printing tiling numbers.
public void cacheDefaultSpheres(GL gl,
                                Sphere sphere)
gl - the current GL object.sphere - the Sphere object used for drawing.
public void cacheSphereDisplayList(GL gl,
                                   Sphere sphere,
                                   SphereListInfo info)
gl - the current GL object.sphere - the sphere object used for drawing.info - describes the requested OpengGL display list.public SphereListInfo getSpaceFillingSphereInfo()
public int getSpaceFillingSlices()
public int getSpaceFillingStacks()
public int getSpaceFillingTilingNumber(double cameraDistance)
cameraDistance - the distance between the center of the sphere and 
                            the camera.
public SphereListInfo getBallsAndSticksSphereInfo()
public int getSpaceFillingRef()
public int getSpaceFillingRef(double cameraDistance)
cameraDistance - the distance between the center of the sphere and 
                           the camera.
public int getBallsAndSticksRef()
public int getBallsAndSticksRef(double cameraDistance)
cameraDistance - the distance between the center of the
                           sphere and the camera.
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||