Package org.lwjgl.util.glu
Class Quadric
java.lang.Object
org.lwjgl.util.glu.Quadric
- Direct Known Subclasses:
Cylinder
,Disk
,PartialDisk
,Sphere
Quadric.java
Created 22-dec-2003
- Author:
- Erik Duijs
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected int
protected int
protected boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected float
cos
(float r) int
Returns the drawStyle.int
Returns the normals.int
Returns the orientation.boolean
Returns the textureFlag.protected void
normal3f
(float x, float y, float z) Call glNormal3f after scaling normal to unit length.void
setDrawStyle
(int drawStyle) specifies the draw style for quadrics.void
setNormals
(int normals) specifies what kind of normals are desired for quadrics.void
setOrientation
(int orientation) specifies what kind of orientation is desired for.void
setTextureFlag
(boolean textureFlag) specifies if texture coordinates should be generated for quadrics rendered with qobj.protected float
sin
(float r) protected void
TXTR_COORD
(float x, float y)
-
Field Details
-
drawStyle
protected int drawStyle -
orientation
protected int orientation -
textureFlag
protected boolean textureFlag -
normals
protected int normals
-
-
Constructor Details
-
Quadric
public Quadric()Constructor for Quadric.
-
-
Method Details
-
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)
-