Package org.lwjgl.util.glu
Class Quadric
- java.lang.Object
-
- org.lwjgl.util.glu.Quadric
-
- Direct Known Subclasses:
Cylinder,Disk,PartialDisk,Sphere
public class Quadric extends Object
Quadric.java Created 22-dec-2003- Author:
- Erik Duijs
-
-
Field Summary
Fields Modifier and Type Field Description protected intdrawStyleprotected intnormalsprotected intorientationprotected booleantextureFlag
-
Constructor Summary
Constructors Constructor Description Quadric()Constructor for Quadric.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected floatcos(float r)intgetDrawStyle()Returns the drawStyle.intgetNormals()Returns the normals.intgetOrientation()Returns the orientation.booleangetTextureFlag()Returns the textureFlag.protected voidnormal3f(float x, float y, float z)Call glNormal3f after scaling normal to unit length.voidsetDrawStyle(int drawStyle)specifies the draw style for quadrics.voidsetNormals(int normals)specifies what kind of normals are desired for quadrics.voidsetOrientation(int orientation)specifies what kind of orientation is desired for.voidsetTextureFlag(boolean textureFlag)specifies if texture coordinates should be generated for quadrics rendered with qobj.protected floatsin(float r)protected voidTXTR_COORD(float x, float y)
-
-
-
Method Detail
-
normal3f
protected void normal3f(float x, float y, float z)Call glNormal3f after scaling normal to unit length.- Parameters:
x-y-z-
-
setDrawStyle
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.- Parameters:
drawStyle- The drawStyle to set
-
setNormals
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.- Parameters:
normals- The normals to set
-
setOrientation
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.- Parameters:
orientation- The orientation to set
-
setTextureFlag
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.- Parameters:
textureFlag- The textureFlag to set
-
getDrawStyle
public int getDrawStyle()
Returns the drawStyle.- Returns:
- int
-
getNormals
public int getNormals()
Returns the normals.- Returns:
- int
-
getOrientation
public int getOrientation()
Returns the orientation.- Returns:
- int
-
getTextureFlag
public boolean getTextureFlag()
Returns the textureFlag.- Returns:
- boolean
-
TXTR_COORD
protected void TXTR_COORD(float x, float y)
-
sin
protected float sin(float r)
-
cos
protected float cos(float r)
-
-