Package javax.media.j3d

Examples of javax.media.j3d.PointLight


    appear2.setMaterial(material);

    final Box box2 = new Box();
    box2.setAppearance(appear2);

    final PointLight pointLight1 = new PointLight();
    pointLight1.setPosition(2, 2, 2);
    pointLight1.setColor(new Color3f(1f, 1f, 1f));
    pointLight1.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0),
        999));

    final PointLight pointLight2 = new PointLight();
    pointLight2.setPosition(2, 2, -2);
    pointLight2.setColor(new Color3f(1f, 1f, 0f));
    pointLight2.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0),
        999));

    final PointLight pointLight3 = new PointLight();
    pointLight3.setPosition(2, -2, 2);
    pointLight3.setColor(new Color3f(1f, 0f, 1f));
    pointLight3.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0),
        999));

    final PointLight pointLight4 = new PointLight();
    pointLight4.setPosition(-2, 2, 2);
    pointLight4.setColor(new Color3f(1f, 0f, 0f));
    pointLight4.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0),
        999));

    final PointLight pointLight5 = new PointLight();
    pointLight5.setPosition(2, -2, -2);
    pointLight5.setColor(new Color3f(1f, 0f, 0f));
    pointLight5.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0),
        999));

    final PointLight pointLight6 = new PointLight();
    pointLight6.setPosition(-2, 2, -2);
    pointLight6.setColor(new Color3f(0f, 0f, 0f));
    pointLight6.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0),
        999));

    final PointLight pointLight7 = new PointLight();
    pointLight7.setPosition(-2, -2, 2);
    pointLight7.setColor(new Color3f(0f, 0.5f, 1f));
    pointLight7.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0),
        999));

    final PointLight pointLight8 = new PointLight();
    pointLight8.setPosition(-2, -2, -2);
    pointLight8.setColor(new Color3f(0f, 0.5f, 1f));
    pointLight8.setInfluencingBounds(new BoundingSphere(new Point3d(0, 0, 0),
        999));

    // neue Transform Informationen

    // neue Branchgruppe
View Full Code Here


/* 194 */     switch (this.type) {
/*     */     case 0:
/* 196 */       this.light = new DirectionalLight(this.color, defaultDir);
/* 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;
View Full Code Here

/* 66 */     ((PointLight)this.node).setAttenuation(this.control.readPoint3f(in));
/* 67 */     ((PointLight)this.node).setPosition(this.control.readPoint3f(in));
/*    */   }
/*    */
/*    */   protected SceneGraphObject createNode() {
/* 71 */     return new PointLight();
/*    */   }
View Full Code Here

    private static TransformGroup makeLight(int x, int z) {
        final Vector3d position = new Vector3d(x, HEIGHT / 2, z);
        final Transform3D transform = Transforms.translation(position);
        final TransformGroup transformGroup = new TransformGroup(transform);

        final PointLight light = new PointLight();
        light.setInfluencingBounds(new BoundingSphere(new Point3d(position), 20));
        light.setAttenuation(0, 0, 1);
       
        transformGroup.addChild(light);
        return transformGroup;
    }
View Full Code Here

TOP

Related Classes of javax.media.j3d.PointLight

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.