| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private BufferObjectArray | |
| private final List | |
| private int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| private int | |
| private int | |
| pack-priv static final float | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | Sphere(final float radius, final int slices, final int stacks, final int drawStyle, final int orientation, final boolean textureFlag, final int normals)
|
| Modifier and Type | Method and Description |
|---|---|
| private int | |
| public void | |
| private static float | |
| public FloatBuffer | createBuffer(float radius, int slices, int stacks)
draws a sphere of the given radius centered around the origin. |
| public void | |
| public void | |
| public int | |
| public int | |
| public int | |
| public boolean | |
| public void | |
| public void | |
| public void | setOrientation(int
The orientation to set orientation)specifies what kind of orientation is desired for. |
| public void | setTextureFlag(boolean
The textureFlag to set textureFlag)specifies if texture coordinates should be generated for quadrics rendered with qobj. |
| private static float | |
| public void |
| bo | back to summary |
|---|---|
| private BufferObjectArray bo | |
| drawCommands | back to summary |
|---|---|
| private final List<Sphere. | |
| drawStyle | back to summary |
|---|---|
| private int drawStyle | |
| GLU_FILL | back to summary |
|---|---|
| public static final int GLU_FILL | |
| GLU_FLAT | back to summary |
|---|---|
| public static final int GLU_FLAT | |
| GLU_INSIDE | back to summary |
|---|---|
| public static final int GLU_INSIDE | |
| GLU_LINE | back to summary |
|---|---|
| public static final int GLU_LINE | |
| GLU_NONE | back to summary |
|---|---|
| public static final int GLU_NONE | |
| GLU_OUTSIDE | back to summary |
|---|---|
| public static final int GLU_OUTSIDE | |
| GLU_POINT | back to summary |
|---|---|
| public static final int GLU_POINT | |
| GLU_SILHOUETTE | back to summary |
|---|---|
| public static final int GLU_SILHOUETTE | |
| GLU_SMOOTH | back to summary |
|---|---|
| public static final int GLU_SMOOTH | |
| normals | back to summary |
|---|---|
| private int normals | |
| orientation | back to summary |
|---|---|
| private int orientation | |
| PI | back to summary |
|---|---|
| pack-priv static final float PI | |
| textureFlag | back to summary |
|---|---|
| private boolean textureFlag | |
| Sphere | back to summary |
|---|---|
| public Sphere() | |
| Sphere | back to summary |
|---|---|
| public Sphere(final int drawStyle, final int orientation, final boolean textureFlag, final int normals) | |
| Sphere | back to summary |
|---|---|
| public Sphere(final float radius, final int slices, final int stacks) | |
| Sphere | back to summary |
|---|---|
| public Sphere(final float radius, final int slices, final int stacks, final int drawStyle, final int orientation, final boolean textureFlag, final int normals) | |
| addDrawCommand | back to summary |
|---|---|
| private int addDrawCommand(final int mode, final int first, final int count) | |
| bind | back to summary |
|---|---|
| public void bind() | |
| cos | back to summary |
|---|---|
| private static float cos(final float r) | |
| createBuffer | back to summary |
|---|---|
| public FloatBuffer createBuffer(float radius, int slices, int stacks) draws a sphere of the given radius centered around the origin. The sphere is subdivided around the z axis into slices and along the z axis into stacks (similar to lines of longitude and latitude). If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then any normals generated point away from the center of the sphere. Otherwise, they point toward the center of the sphere. If texturing is turned on (with glu.quadricTexture), then texture coordinates are generated so that t ranges from 0.0 at z=-radius to 1.0 at z=radius (t increases linearly along longitudinal lines), and s ranges from 0.0 at the +y axis, to 0.25 at the +x axis, to 0.5 at the -y axis, to 0.75 at the -x axis, and back to 1.0 at the +y axis. | |
| destroy | back to summary |
|---|---|
| public void destroy() | |
| draw | back to summary |
|---|---|
| public void draw() | |
| getDrawStyle | back to summary |
|---|---|
| public int getDrawStyle() Returns the drawStyle.
| |
| getNormals | back to summary |
|---|---|
| public int getNormals() Returns the normals.
| |
| getOrientation | back to summary |
|---|---|
| public int getOrientation() Returns the orientation.
| |
| getTextureFlag | back to summary |
|---|---|
| public boolean getTextureFlag() Returns the textureFlag.
| |
| setDrawStyle | back to summary |
|---|---|
| public void setDrawStyle(int drawStyle) specifies the draw style for quadrics. The legal values are as follows: GLU.FILL: Quadrics are rendered with polygon primitives. The polygons are drawn in a counterclockwise fashion with respect to their normals (as defined with glu.quadricOrientation). GLU.LINE: Quadrics are rendered as a set of lines. GLU.SILHOUETTE: Quadrics are rendered as a set of lines, except that edges separating coplanar faces will not be drawn. GLU.POINT: Quadrics are rendered as a set of points.
| |
| setNormals | back to summary |
|---|---|
| public void setNormals(int normals) specifies what kind of normals are desired for quadrics. The legal values are as follows: GLU.NONE: No normals are generated. GLU.FLAT: One normal is generated for every facet of a quadric. GLU.SMOOTH: One normal is generated for every vertex of a quadric. This is the default.
| |
| setOrientation | back to summary |
|---|---|
| public void setOrientation(int orientation) specifies what kind of orientation is desired for. The orientation values are as follows: GLU.OUTSIDE: Quadrics are drawn with normals pointing outward. GLU.INSIDE: Normals point inward. The default is GLU.OUTSIDE. Note that the interpretation of outward and inward depends on the quadric being drawn.
| |
| setTextureFlag | back to summary |
|---|---|
| public void setTextureFlag(boolean textureFlag) specifies if texture coordinates should be generated for quadrics rendered with qobj. If the value of textureCoords is true, then texture coordinates are generated, and if textureCoords is false, they are not.. The default is false. The manner in which texture coordinates are generated depends upon the specific quadric rendered.
| |
| sin | back to summary |
|---|---|
| private static float sin(final float r) | |
| updateGeometry | back to summary |
|---|---|
| public void updateGeometry(final float radius, final int slices, final int stacks) | |
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void |
| count | back to summary |
|---|---|
| private int count | |
| first | back to summary |
|---|---|
| private int first | |
| mode | back to summary |
|---|---|
| private int mode | |
| DrawCommand | back to summary |
|---|---|
| private DrawCommand(final int mode, final int first, final int count) | |
| draw | back to summary |
|---|---|
| pack-priv void draw() | |