Examples of glNormal3d()


Examples of javax.media.opengl.GL.glNormal3d()

        Vector3[] face = i.next();
        //compute normal
        Vector3 n =face[1].sub(face[0]).cross(face[2].sub(face[1])).normalize();
       
        for ( Vector3 v: face) {
          gl.glNormal3d(n.x, n.y, n.z);
          //gl.glTexCoord2f(1.0f, 1.0f);
          //gl.glColor3d(v.a1, v.a2, v.a3);
          gl.glVertex3d(v.x, v.y, v.z);
          gl.glTexCoord2f(0.0f, 1.0f);
        }
View Full Code Here

Examples of javax.media.opengl.GL.glNormal3d()

        Vector3[] face = i.next();
        //compute normal
        Vector3 n =face[1].sub(face[0]).cross(face[2].sub(face[1])).normalize();
       
        for ( Vector3 v: face) {
          gl.glNormal3d(n.x, n.y, n.z);
          //gl.glTexCoord2f(1.0f, 1.0f);
          gl.glColor3d(0.2,0.2, 0.2);
          gl.glVertex3d(v.x, v.y, v.z);
          gl.glTexCoord2f(0.0f, 1.0f);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.