Package com.jme3.scene.shape

Examples of com.jme3.scene.shape.Quad


   
    setPointLight(true);
   
    guiNode.detachChildNamed("Statistics View");

    camNode = new Node("Cam Node");

    flyCam.setEnabled(false);
    ChaseCamera chaseCam = new ChaseCamera(cam, camNode, inputManager);
    chaseCam.setSmoothMotion(true);
    chaseCam.setMaxDistance(100000);
View Full Code Here


        if (path.startsWith(File.separator)) {
          relPath = path.substring(1);
        } else {
          relPath = path;
        }
        Node model = (Node) assetManager.loadModel(relPath);
        if (model == null) {
          assetLogger.modelFinished();
          logger.log(Level.SEVERE, "Couldn't load model "+path);
          return null;
        }
        Geometry modelGeom = (Geometry) model.getChild(0);

        try {
          // trows an Exception if lod is not supported
          modelGeom.setLodLevel(0);
View Full Code Here

     * @param obj the path to the object.
     **/
    public Node loadNode(String obj){
  Node node = new Node();
  try{
            Spatial spatial = assetManager.loadModel(obj);
            //Material mat = new Material(assetManager, "Common/MatDefs/Misc/ShowNormals.j3md");
            //spatial.setMaterial(mat);
            node.attachChild(spatial);

      node.setModelBound(new BoundingSphere());
View Full Code Here

        app.start();
    }

    @Override
    public void simpleInitApp() {
        Spatial teapot = assetManager.loadModel("Models/Teapot/Teapot.obj");
      
        teapot.setLocalScale(2f);
        Material mat = new Material(assetManager, "Common/MatDefs/Light/Lighting.j3md");
        mat.setFloat("m_Shininess", 32f);
        mat.setBoolean("m_UseMaterialColors", true);

        mat.setColor("m_Ambient",  ColorRGBA.Black);
        mat.setColor("m_Diffuse",  ColorRGBA.Green);
        mat.setColor("m_Specular", ColorRGBA.Red);
       
        teapot.setMaterial(mat);
        rootNode.attachChild(teapot);

        lightMdl = new Geometry("Light", new Sphere(10, 10, 0.1f));
        lightMdl.setMaterial(assetManager.loadMaterial("Common/Materials/RedColor.j3m"));
        lightMdl.getMesh().setStatic();
View Full Code Here

        try {
          // trows an Exception if lod is not supported
          modelGeom.setLodLevel(0);

          LodControl control = new LodControl();
          modelGeom.addControl(control);
        } catch (Exception e) {}
        assetLogger.modelFinished();
        camNode.detachAllChildren();
        camNode.attachChild(model);
View Full Code Here

        app.start();
    }

    @Override
    public void simpleInitApp() {
        Box b = new Box(Vector3f.ZERO, 1, 1, 1);
        Geometry geom = new Geometry("Box", b);
        geom.updateModelBound();

        Material mat = new Material(assetManager, "Common/MatDefs/Misc/SolidColor.j3md");
        mat.setColor("m_Color", ColorRGBA.Blue);
View Full Code Here

import com.jme3.scene.shape.Quad;

public class QuadMarker extends FacingGeometry implements Markable {
 
  public QuadMarker(float size) {
    super("quad_marker", new Quad(size, size));
    init();
  }
View Full Code Here

  private String txtB =
      "Pollux3D loading...";
 
  @Override
  public Node create(AssetManager assetManager, Camera cam) {
        Quad q = new Quad(20, 10);
        Geometry g = new Geometry("quad", q);
        g.setLocalTranslation(-10, -5, -0.0001f);
        Material bg = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        bg.setColor("Color", ColorRGBA.Black);
        g.setMaterial(bg);
        sceneNode.attachChild(g);

        Quad q_small = new Quad(9.0f, 3.0f);
        Geometry logo = new Geometry("quad", q_small);
        logo.setLocalTranslation(-4.5f, -1.5f, 1);
        Material logo_mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        Texture logo_tex = assetManager.loadTexture("Textures/pollux.jpg");
        logo_mat.setTexture("ColorMap", logo_tex);
View Full Code Here

    }
  }

   
    private Spatial getQuad(float size, float x, float y, float z){
      Quad q = new Quad(size,size,true);
        //Box b = new Box(Vector3f.ZERO, 1, 1, 1);
        Geometry geom = new Geometry("Box", q);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        mat.setTexture("ColorMap", assetManager.loadTexture("com/l2client/test/material/chterraingrass01_n.dds"));
        geom.setMaterial(mat);
View Full Code Here

    }
  }

   
    private Spatial getQuad(float size, float x, float y, float z){
      Quad q = new Quad(size,size,true);
        //Box b = new Box(Vector3f.ZERO, 1, 1, 1);
        Geometry geom = new Geometry("Box", q);
        Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
        mat.setTexture("ColorMap", assetManager.loadTexture("com/l2client/test/material/chterraingrass01_n.dds"));
        geom.setMaterial(mat);
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.