Package com.jme3.scene.shape

Examples of com.jme3.scene.shape.Quad


//    setBuffer(Type.Position, 3, new float[]{(-width / 2f),(height / 2f),0,   (-width / 2f),(-height / 2f),0,   (width / 2f),(-height / 2f),0,   (width / 2f),(height / 2f),0 });
  }
};
*/
//setMesh(quad);
setMesh(new Quad());

        awtWindow = new Frame() {
            private static final long serialVersionUID = 1L;
            public boolean isShowing() {
                return true;
View Full Code Here


        return ret;
      else
        ret = new PatchInfo(x, y, false);//FIXME how can this happen?
    }
    try {
      Quad q = new Quad(1f * IArea.TERRAIN_SIZE, 1f * IArea.TERRAIN_SIZE);
      //this is the same as in GotoClickedInputAction
      Geometry n = new Geometry(IArea.TILE_PREFIX + x + " " + y,q);
      n.setMaterial(material);
      n.setLocalTranslation(x * IArea.TERRAIN_SIZE, 0f,y * IArea.TERRAIN_SIZE);
      ret.patch = n;
View Full Code Here

   
   
      camera.setLocation(new Vector3f(0,0,0))
   
    Singleton.get().getSceneManager().removeAll();
      Quad b = new Quad(80f,60f);
      b.updateBound();
      Geometry geom = new Geometry("backdrop", b);
      Material mat = new Material(Singleton.get().getAssetManager().getJmeAssetMan(), "Common/MatDefs/Misc/Unshaded.j3md");
      mat.setTexture("ColorMap", Singleton.get().getAssetManager().getJmeAssetMan().loadTexture("start/backdrop.png"));
      geom.setMaterial(mat);
      geom.setLocalTranslation(-40f, -30f, -90f);     
      Singleton.get().getSceneManager().changeTerrainNode(geom,Action.ADD);
     
      Quad b2 = new Quad(38f,29f);
      b2.updateBound();
      Geometry geom2 = new Geometry("wolf", b2);
      Material mat2 = new Material(Singleton.get().getAssetManager().getJmeAssetMan(), "Common/MatDefs/Misc/Unshaded.j3md");
      mat2.setTexture("ColorMap", Singleton.get().getAssetManager().getJmeAssetMan().loadTexture("start/wolf.png"));
      mat2.getAdditionalRenderState().setBlendMode(BlendMode.Alpha); // activate transparency
      geom2.setMaterial(mat2);
View Full Code Here

      float patchScaleVariation, float patchWidth, float patchHeight,
      float rand) {
    Node grassPatch = new Node();
    float selectedSizeVariation = (float) (rand * (patchScaleVariation - (1 / patchScaleVariation)))
        + (1 / patchScaleVariation);
    Quad faceShape = new Quad((patchWidth * selectedSizeVariation),
        patchHeight * selectedSizeVariation, false);
    Geometry face1 = new Geometry("face1", faceShape);
    face1.move(-(patchWidth * selectedSizeVariation) / 2, 0, 0);
    grassPatch.attachChild(face1);

View Full Code Here

   
  }
 
  private Geometry createSelectionMarker(){
    float size = 2f;
    Geometry selectionMarker = new Geometry("selection", new Quad(size, size));
    selectionMarker.setLocalTranslation(-0.5f*size, 0.2f, 0.5f*size);
    selectionMarker.setLocalRotation(new Quaternion().fromAngleAxis(-FastMath.HALF_PI, Vector3f.UNIT_X));

      com.jme3.asset.AssetManager am = Singleton.get().getAssetManager().getJmeAssetMan();
      Material mat = new Material(am, "Common/MatDefs/Light/Lighting.j3md");
View Full Code Here

  }
 
 
  private Node createHealthBar(){
    Node n = new Node("health");
    Geometry frame = new Geometry("health_frame", new Quad(1f, 0.02f));
    Material mat = null;
      com.jme3.asset.AssetManager am = Singleton.get().getAssetManager().getJmeAssetMan();
      mat = new Material(am, "Common/MatDefs/Misc/Unshaded.j3md");
        mat.setColor("Color", ColorRGBA.White);
      frame.setMaterial(mat);
      frame.setQueueBucket(Bucket.Transparent);
      frame.setShadowMode(ShadowMode.Off);
    frame.setLocalTranslation(-0.5f, 0.11f, 0f);
      n.attachChild(frame);
     
    Geometry bar = new Geometry("health_bar", new Quad(1f, 0.1f));
      mat = new Material(am, "Common/MatDefs/Misc/Unshaded.j3md");
        mat.setColor("Color", ColorRGBA.Red);
        bar.setMaterial(mat);
      bar.setQueueBucket(Bucket.Transparent);
        bar.setShadowMode(ShadowMode.Off);
View Full Code Here

    public void loadDarken() {
        Material mat = new Material(app.assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        mat.setColor("Color", new ColorRGBA(0,0,0,0.5f));
        mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);
       
        darkenFps = new Geometry("StatsDarken", new Quad(200, fpsText.getLineHeight()));
        darkenFps.setMaterial(mat);
        darkenFps.setLocalTranslation(0, 0, -1);
        darkenFps.setCullHint(showFps && darkenBehind ? CullHint.Never : CullHint.Always);
        guiNode.attachChild(darkenFps);
       
        darkenStats = new Geometry("StatsDarken", new Quad(200, statsView.getHeight()));
        darkenStats.setMaterial(mat);
        darkenStats.setLocalTranslation(0, fpsText.getHeight(), -1);
        darkenStats.setCullHint(showStats && darkenBehind ? CullHint.Never : CullHint.Always);
        guiNode.attachChild(darkenStats);
    }
View Full Code Here

  }

  @Override
  public void simpleInitApp() {

    Quad quadMesh = new Quad(512, 512);
    Geometry quad = new Geometry("Quad", quadMesh);
    quad.setQueueBucket(Bucket.Gui);

    mat = new Material(assetManager, "Common/MatDefs/Misc/ColoredTextured.j3md");
    mat.setTexture("ColorMap", assetManager.loadTexture("Textures/ColoredTex/Monkey.png"));
View Full Code Here

  }

  @Override
  public void simpleInitApp() {

    Quad quadMesh = new Quad(1, 1);

    Geometry sphere = new Geometry("Rock Ball", quadMesh);
    Material mat = assetManager.loadMaterial("Textures/BumpMapTest/SimpleBump.j3m");
    sphere.setMaterial(mat);
    TangentBinormalGenerator.generate(sphere);
View Full Code Here

     *
     * @param name the name of the picture in the scene graph
     * @param flipY If true, the Y coordinates of the texture will be flipped.
     */
    public Picture(String name, boolean flipY){
        super(name, new Quad(1, 1, flipY));
        setQueueBucket(Bucket.Gui);
        setCullHint(CullHint.Never);
    }
View Full Code Here

TOP

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

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.