@Override protected void writeNode(DataOutput out) throws IOException { out.writeInt(attr); out.writeDouble(split); loChild.write(out); hiChild.write(out); }
// /** // * Sets the material to the a specific batch of this BatchNode // * // * // * @param material the material to use for this geometry // */ // public void setMaterial(Material material,int batchIndex) { // if (!batches.isEmpty()) { // // } // // } // // /** // * Returns the material that is used for the first batch of this BatchNode // * // * use getMaterial(Material material,int batchIndex) to get a material from a specific batch // * // * @return the material that is used for the first batch of this BatchNode // * // * @see #setMaterial(com.jme3.material.Material) // */ // public Material getMaterial(int batchIndex) { // if (!batches.isEmpty()) { // Batch b = batches.get(batches.keySet().iterator().next()); // return b.geometry.getMaterial(); // } // return null;//material; // } @Override public void write(JmeExporter ex) throws IOException { super.write(ex); OutputCapsule oc = ex.getCapsule(this); // // if (material != null) { // oc.write(material.getAssetName(), "materialName", null); // } // oc.write(material, "material", null); }
/** * Writes the Nodes, immediately after the row size. * * @param out * @throws IOException * @throws HsqlException */ private void writeNodes(RowOutputInterface out) throws IOException { out.writeSize(storageSize); Node n = nPrimaryNode; while (n != null) { n.write(out); n = n.nNext; } hasNodesChanged = false; }
@Override protected void write(ArrayList list) { if (list != null) { for (NodeValue v : (ArrayList<NodeValue>) list) { if (openlabel.length() > 0) { datafile.printf("%s", openlabel); } for (Node f : orderedfields) { ArrayList subvalues = v.get(f.label); if (subvalues != null) { f.write(subvalues); } } if (closelabel.length() > 0) { datafile.printf("%s", closelabel); } } } }
@Override protected void write(ArrayList list) throws IOException { if (list != null) { for (NodeValue v : (ArrayList<NodeValue>) list) { if (openlabel.length() > 0) { datafile.printf("%s", openlabel); } for (Node f : orderedfields) { ArrayList subvalues = v.get(f.label); if (subvalues != null) { f.write(subvalues); } else { log.fatal("Attempted to write an OrderedNode with value %s unset", f.label); } } if (closelabel.length() > 0) { datafile.printf("%s", closelabel); } } } }