|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.proteinshader.graphics.displaylists.CylinderReferences
public class CylinderReferences
Stores information on multiple OpenGL display lists that can be used for rendering cylinders with different degrees of detail.
Field Summary | |
---|---|
static double |
COEFFICIENT
The empirically-determined coefficient for the power equation is 29.059. |
static int |
DEFAULT_CAP_TILING
The default tiling (number of slices and stacks) for a capping sphere is 5. |
static double |
DEFAULT_HEIGHT
The default cylinder height is 1.0. |
static double |
DEFAULT_RADIUS
Cylinders intended for a Sticks type of display will use a default cylinder radius is 0.15. |
static int |
DEFAULT_SLICES
The default number of slices for a cylinder is 10. |
static int |
DEFAULT_STACKS
The default number of stacks for a cylinder is 1. |
static double |
EXPONENT
The empirically-determined exponent for the power equation is -0.5267. |
static int |
MAX_SLICES
The maximum number of slices for cylinders cached by this class is 14, while the minimum will be the MIN_SLICES declared in class Cylinder, which is 3. |
Constructor Summary | |
---|---|
CylinderReferences()
Constructs a CylinderReferences object. |
Method Summary | |
---|---|
void |
cacheCylinderDisplayList(GL gl,
Cylinder cylinder,
CylinderListInfo info)
Caches a new OpenGL display list for a BALLS_AND_STICKS cylinder or a STICKS cylinder with the requested number of slices and stacks. |
void |
cacheDefaultCylinders(GL gl,
Cylinder cylinder)
Caches a collection of cylinders using OpenGL display lists. |
CylinderListInfo |
getBallsAndSticksCylinderInfo()
Returns the CylinderListInfo object that holds the information on an OpenGL display list for a cylinder to be used for a BALLS_AND_STICKS style display. |
int |
getBallsAndSticksRef()
Returns the name (an integer) of an OpenGL display list for a cylinder intended to be used for Balls-and-Sticks style displays. |
int |
getBallsAndSticksRef(double cameraDistance)
Returns the name (an integer) of an OpenGL display list for a cylinder intended to be used for Balls-and-Sticks displays. |
CylinderListInfo |
getSticksCylinderInfo()
Returns the CylinderListInfo object that holds the information on an OpenGL display list for a cylinder to be used for a STICKS style display. |
int |
getSticksRef()
Returns the name (an integer) of an OpenGL display list for a cylinder intended to be used for Sticks style displays. |
int |
getSticksRef(double cameraDistance)
Returns the name (an integer) of an OpenGL display list for a cylinder intended to be used for Sticks style displays. |
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 int MAX_SLICES
public static final double DEFAULT_HEIGHT
public static final double DEFAULT_RADIUS
public static final int DEFAULT_SLICES
public static final int DEFAULT_STACKS
public static final int DEFAULT_CAP_TILING
public static final double COEFFICIENT
public static final double EXPONENT
Constructor Detail |
---|
public CylinderReferences()
Method Detail |
---|
public void printAutoTilingNumbers(boolean b)
b
- boolean value for printing tiling numbers.public void cacheDefaultCylinders(GL gl, Cylinder cylinder)
gl
- the current GL object.cylinder
- the Cylinder object used for drawing.public void cacheCylinderDisplayList(GL gl, Cylinder cylinder, CylinderListInfo info)
gl
- the current GL object.cylinder
- the Cylinder object used for drawing.info
- describes the requested OpenGL display list.public CylinderListInfo getBallsAndSticksCylinderInfo()
public CylinderListInfo getSticksCylinderInfo()
public int getBallsAndSticksRef()
public int getBallsAndSticksRef(double cameraDistance)
cameraDistance
- the distance between the center of the
cylinder and the camera.
public int getSticksRef()
public int getSticksRef(double cameraDistance)
cameraDistance
- the distance between the center of the
cylinder and the camera.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |