Package com.jme3.export

Examples of com.jme3.export.OutputCapsule


        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void write(JmeExporter e) throws IOException {
        OutputCapsule capsule = e.getCapsule(this);
        capsule.write(this.animComponent, "animComponent", null);
    }
View Full Code Here


        addControl();
    }

    @Override
    public void write(JmeExporter e) throws IOException {
        OutputCapsule capsule = e.getCapsule(this);
        capsule.write(this.player, "player", null);
    }
View Full Code Here

     * Write the camera
     * @param ex the exporter
     * @throws IOException
     */
    public void write(JmeExporter ex) throws IOException {
        OutputCapsule capsule = ex.getCapsule(this);
        capsule.write(maxDistance, "maxDistance", 40);
        capsule.write(minDistance, "minDistance", 1);
    }
View Full Code Here

            return;
        }
    }

    public void write(JmeExporter ex) throws IOException {
        OutputCapsule oc = ex.getCapsule(this);
        oc.write(enabled, "enabled", true);
        oc.write(spatial, "spatial", null);
    }
View Full Code Here

  }

  public void write(JmeExporter e) throws IOException {

    super.write(e);
    OutputCapsule capsule = e.getCapsule(this);
    capsule.write(top, "top", null);
    capsule.write(right, "right", null);
    capsule.write(bottom, "bottom", null);
    capsule.write(left, "left", null);
    capsule.write(worldTranslation, "worldpos", null);
   
    //FIXME ev. override ? and do it only once?
    HashMap<Cell, Integer> tmp = new HashMap<Cell, Integer>();
    for(int i =0; i<mCellArray.length; i++)
      tmp.put(mCellArray[i], i);
   
    int r=0;
    int[] vals = new int[borders.keySet().size()];
    for(Cell i : borders.keySet())
      vals[r++]=tmp.get(i);
    capsule.write(vals, "borders_keys",null);
    r=0;
    for(Integer i : borders.values())
      vals[r++]=i;
    capsule.write(vals, "borders_values",null);
     
    for(int i=0;i<8;i++){
      vals = new int[allBorders.get(i).size()];
      r = 0;
      for(Cell c : allBorders.get(i))
        vals[r++]=tmp.get(c);
      capsule.write(vals, "allborders"+i,null);
    }
  }
View Full Code Here

    public Class<? extends Line2D> getClassTag() {
        return this.getClass();
    }

  public void write(JmeExporter e) throws IOException {
    OutputCapsule capsule = e.getCapsule(this);
    capsule.write(m_PointA, "m_PointA", null);
    capsule.write(m_PointB, "m_PointB", null);
    capsule.write(m_Normal, "m_Normal", null);   
  }
View Full Code Here

    public Class<? extends Cell> getClassTag() {
        return this.getClass();
    }
   
  public void write(JmeExporter e) throws IOException {
    OutputCapsule capsule = e.getCapsule(this);
    capsule.write(id, "id", -1);
    capsule.write(m_CellPlane, "cellplane", null);
    capsule.write(m_Vertex, "vertex", null);
    capsule.write(m_CenterPoint, "center", null);
    capsule.write(m_Side, "sides", null);
//links are handled one level above in mesh
//    capsule.write(m_Link, "links", null);
    capsule.write(m_WallMidpoint, "midpoints", null);
    capsule.write(m_WallDistance, "distances", null)
  }
View Full Code Here

//    }
   
  // write out he cell array as it is
  // loop over all cells and for each cell write out the 3 link ids into the cell array for neighbors
  public void write(JmeExporter e) throws IOException {
    OutputCapsule capsule = e.getCapsule(this);
//    capsule.writeSavableArrayList(m_CellArray, "cellarray", null);
    capsule.write(mCellArray, "mCellArray", null);
    HashMap<Cell, Integer> tmp = new HashMap<Cell, Integer>();
   
    int[] links = new int[mCellArray.length*3];
   
    for(int i =0; i<mCellArray.length; i++)
      tmp.put(mCellArray[i], i);
   
    Cell c = null;
    for(int i =0,j=0; i<mCellArray.length; i++){
      c = mCellArray[i];
      links[j++]= (c.m_Link[0] != null?tmp.get(c.m_Link[0]):-1);
      links[j++]= (c.m_Link[1] != null?tmp.get(c.m_Link[1]):-1);
      links[j++]= (c.m_Link[2] != null?tmp.get(c.m_Link[2]):-1);
    }
    capsule.write(links, "links", null);
    tmp.clear();
  }
View Full Code Here

       defaultSet = input.readString("defaultSet", "");
  }

  @Override
  public void write(JmeExporter ex) throws IOException {
    OutputCapsule output = ex.getCapsule(this);
        output.write(primhand, "primhand", "");
        output.write(offhand, "offhand", "");
        output.write(offhandOptional, "offhandOptional", 0);
        output.write(animSet, "animSet", "");
        output.write(defaultSet, "defaultSet", "");
  }
View Full Code Here

    location = capsule.readString("location", "");
  }
  @Override
  public void write(JmeExporter ex) throws IOException {
    super.write(ex);
    OutputCapsule capsule = ex.getCapsule(this);
    capsule.write(location, "location", "");
  }
View Full Code Here

TOP

Related Classes of com.jme3.export.OutputCapsule

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.