Examples of MTLight


Examples of org.mt4j.components.MTLight

    }
   
    //Init light settings
    MTLight.enableLightningAndAmbient(mtApplication, 150, 150, 150, 255);
    //Create a light source //I think GL_LIGHT0 is used by processing!
    MTLight light = new MTLight(mtApplication, GL.GL_LIGHT3, new Vector3D(0,-300,0));
   
    //Set up a material to react to the light
    GLMaterial material = new GLMaterial(Tools3D.getGL(mtApplication));
    material.setAmbient(new float[]{ .5f, .5f, .5f, 1f });
    material.setDiffuse(new float[]{ .8f, .8f, .8f, 1f } );
View Full Code Here

Examples of org.mt4j.components.MTLight

   
    //Init light settings
    MTLight.enableLightningAndAmbient(pa, 150, 150, 150, 255);
    //Create a light source //I think GL_LIGHT0 is used by processing!
//    MTLight light = new MTLight(pa, GL.GL_LIGHT3, new Vector3D(0,0,0));
    MTLight light = new MTLight(pa, GL.GL_LIGHT3, new Vector3D(pa.width/5f,-pa.height/10f,0));
   
    //Set up a material to react to the light
    GLMaterial material = new GLMaterial(Tools3D.getGL(pa));
    material.setAmbient(new float[]{ .1f, .1f, .1f, 1f });
    material.setDiffuse(new float[]{ 1.0f, 1.0f, 1.0f, 1f } );
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.