Package com.jme3.scene.shape

Examples of com.jme3.scene.shape.Sphere


            case "viewDistanceSlider":
                cam.setFrustumFar(event.getValue());
                cam.update();
                if (voxelState != null) {
                    voxelState.getCalcBound().setRadius(cam.getFrustumFar() * .9f);
                    Sphere s = new Sphere(32, 32, voxelState.getCalcBound().getRadius());
                    s.setMode(Mode.Lines);
                    worldCalcBoundGeom.setMesh(s);
                }
                break;
        }
    }
View Full Code Here


    if (visible) {
      starMat = new Material(world.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");
      starMat.setColor("Color", color);
      starMat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);

      Geometry geom = new Geometry(identifier, new Sphere(16, 16, celestialScale * radius));
      geom.setMaterial(starMat);
      geom.setLocalTranslation(World.toCartesian(azimuth, elevation, celestialDistance));

      world.getSky().addCelestialSpatial(geom);
    }
View Full Code Here

        store.addLocal(app.getCamera().getLocation());
        return store;
    }

    public static final Geometry createPoint(float x, float y, float z, float radius) {
        Sphere s = new Sphere(4, 4, radius);
        Geometry geom = new Geometry("Point(" + x + ", " + y + ", " + z + "), r = " + radius, s);
        geom.setLocalTranslation(x, y, z);

        return geom;
    }
View Full Code Here

        return geom;
    }

    public static final Geometry createPoint(Vector3f pos, float radius) {
        Sphere s = new Sphere(4, 4, radius);
        Geometry geom = new Geometry("Point" + pos + ", r = " + radius, s);
        geom.setLocalTranslation(pos);

        return geom;
    }
View Full Code Here

                g.setMaterial(DebugMaterials.boundMat);
                g.getMesh().setLineWidth(2f);
                return g;
            case Sphere:
                BoundingSphere bSphere = (BoundingSphere) boundVolume;
                Sphere s = new Sphere(8, 8, bSphere.getRadius());
                s.setMode(Mode.Lines);
                g = new Geometry("Bound", s);
                g.setMaterial(DebugMaterials.boundMat);
                g.setLocalRotation(refGeom.getWorldRotation());
                return g;
            default:
View Full Code Here

        public Voxel(Vector3f pos, float value, float radius) {
            super("VoxelGeometry" + pos + " " + value);
            voxelValue = value;
            position = pos;
            mesh = new Sphere(4, 4, radius);
            if (value < 0)
                setMaterial(DebugMaterials.blackMat);
            else setMaterial(DebugMaterials.whiteMat);
            setLocalTranslation(pos);
View Full Code Here

     * Starts the application. Creating a display and running the main loop.
     */
    public void start(){

        if (settings == null){
            settings = new AppSettings(true);
        }
       
        context = JmeSystem.newContext(settings, JmeContext.Type.OffscreenSurface);
        context.setSystemListener(this);
        context.create(false);
View Full Code Here

      new ModelInfo(activeModel, app.getAssetLogger().getKeys(activeModel.getRelPath(workspace)));
    } catch (Exception e) {}
  }

  public static void createCanvas(){
    AppSettings settings = new AppSettings(true);
    settings.setWidth( Math.max(640, frame.getContentPane().getWidth()) );
    settings.setHeight( Math.max(480, frame.getContentPane().getHeight()) );

    app = new EditorApp();

    app.setPauseOnLostFocus(false);
    app.setSettings(settings);
    app.createCanvas();

    context = (JmeCanvasContext) app.getContext();
    canvas = context.getCanvas();
    canvas.setSize(settings.getWidth(), settings.getHeight());
  }
View Full Code Here

   * main for testing
   *
   * @param args
   */
  public static void main(String[] args) {
        AppSettings settings = new AppSettings(true);
        PolluxSettingsDialog.show(settings);
        System.out.println(settings.toString());
        System.exit(0);
  }
View Full Code Here

    */
    Geometry g = new Geometry("Bubble", b);
    g.rotate(FastMath.HALF_PI, 0, FastMath.HALF_PI);
    //g.scale(1, 1, -1);
    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    Texture tex = assetManager.loadTexture("Textures/test3.png");
    mat.setTexture("ColorMap", tex);
    //mat.setColor("Color", ColorRGBA.Blue);
    //mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off);
    g.setMaterial(mat);
   
View Full Code Here

TOP

Related Classes of com.jme3.scene.shape.Sphere

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.