Package javax.media.j3d

Examples of javax.media.j3d.SpotLight


    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), Double.MAX_VALUE);


    //A spotlight rotating around the scene.
    Color3f lightColourSpot = new Color3f(0.3f, 0.3f, 0.3f);
    SpotLight lightSpot = new SpotLight(lightColourSpot,
                                     new Point3f(0.0f,0.0f,1.0f),
                                     new Point3f(0.1f,0.1f,0.01f),
                                     new Vector3f(0.0f,0.0f,-1.0f),
                                     (float) (Math.PI/4),
                                     0.0f);

    lightSpot.setInfluencingBounds(bounds);




    //The transformation group for the spotlight and its rotation.
View Full Code Here


/* 197 */       break;
/*     */     case 1:
/* 199 */       this.light = new PointLight(this.color, defaultPos, this.attenuation);
/* 200 */       break;
/*     */     case 2:
/* 203 */       this.light = new SpotLight(this.color, defaultPos, this.attenuation, defaultDir, 2.0F * this.spotConeAngle, 0.0F);
/*     */
/* 205 */       break;
/*     */     }
/*     */
/* 211 */     this.light.setCapability(15);
View Full Code Here

/* 68 */     ((SpotLight)this.node).setSpreadAngle(in.readFloat());
/* 69 */     ((SpotLight)this.node).setConcentration(in.readFloat());
/*    */   }
/*    */
/*    */   protected SceneGraphObject createNode() {
/* 73 */     return new SpotLight();
/*    */   }
View Full Code Here

TOP

Related Classes of javax.media.j3d.SpotLight

Copyright © 2018 www.massapicom. 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.