Class Quadric

    • Field Detail

      • drawStyle

        protected int drawStyle
      • orientation

        protected int orientation
      • textureFlag

        protected boolean textureFlag
      • normals

        protected int normals
    • Constructor Detail

      • Quadric

        public Quadric()
        Constructor for Quadric.
    • 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)