Package com.jme.scene.shape

Examples of com.jme.scene.shape.Teapot


            ColorRGBA color) {
        MaterialState matState = null;
       
        // The center teapot
        Node ret = new Node();
        Teapot teapot = new Teapot();
        teapot.resetData();
        teapot.setLocalScale(0.2f);
        ret.attachChild(teapot);

        matState = (MaterialState) ClientContextJME.getWorldManager().getRenderManager().createRendererState(RenderState.RS_MATERIAL);
        matState.setDiffuse(color);
        ret.setRenderState(matState);
View Full Code Here


      TankGame.GAME.unlock();
      return tank;
    } else if (scm instanceof TeapotSynchronizeCreateMessage) {
      System.out.println("TeapotSyncMsg");
      TeapotSynchronizeCreateMessage msg = (TeapotSynchronizeCreateMessage) scm;
      Teapot teapot = msg.getTeapot();
     
      TankGame.GAME.lock();
      TankGame.GAMESTATE.getRoot().attachChild(teapot);
      TankGame.GAMESTATE.getRoot().updateGeometricState(0, true);
      teapot.setRenderQueueMode(Renderer.QUEUE_OPAQUE);
      TankGame.GAMESTATE.getRoot().updateRenderState();
      TankGame.GAME.unlock();
      return teapot;
    } else if (scm instanceof PhysicsFireableSynchronizeCreateMessage) {
      System.out.println("PhysicsFireableSyncMsg");
View Full Code Here

    detonate(vector);
  }
 
  @Override
  public void detonate(Ray vector) {
    final Teapot teapot = new Teapot("killer teapot");
    TankGame.GAME.lock();
    TankGame.GAMESTATE.getRoot().attachChild(teapot);
    teapot.updateRenderState();
    teapot.setModelBound(new BoundingBox());
    teapot.updateModelBound();
    teapot.updateWorldBound();
   
    teapot.setLocalTranslation(vector.origin);
    TankGame.GAME.unlock();
   
    //remove teapot after 5 seconds
    new Thread() {
      public void run() {
        try {
          Thread.sleep(5*1000);
        } catch (InterruptedException e) {}
        TankGame.NETWORK.unregister(teapot);
        TankGame.GAME.lock();
        teapot.removeFromParent();
        TankGame.GAME.unlock();
      }
    }.start();
   
    try {
View Full Code Here

    this.translation = teapot.getLocalTranslation();
    this.rotation = teapot.getLocalRotation();
  }
 
  public Teapot getTeapot() {
    Teapot teapot = new Teapot("killer teapot");
    teapot.setLocalTranslation(translation);
    teapot.setLocalRotation(rotation);
    return teapot;
  }
View Full Code Here

      case NetworkConstants.TANK:
        Tank tank = (Tank) object;
        syncManager.register(object, new TankSynchronizeCreateMessage(tank), rate);
        break;
      case NetworkConstants.TEAPOT:
        Teapot teapot = (Teapot) object;
        syncManager.register(object, new TeapotSynchronizeCreateMessage(teapot), rate);
        break;
      case NetworkConstants.PHYSICS_FIREABLE:
        PhysicsFireable pFire = (PhysicsFireable) object;
        // Possibly need to pass the actual class(MissleFireable, ect.) rather than it's parent class(Physics Fireable)
View Full Code Here

TOP

Related Classes of com.jme.scene.shape.Teapot

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.