if (triMesh.getDefaultColor()!=null) atts.put("data",triMesh.getDefaultColor()); writeTag("defcolor",atts); writeEndTag("defcolor");  atts.clear();
    private void writeTriMeshTags(TriMesh triMesh) throws IOException {        if (triMesh==null) return;        HashMap<String, Object> atts=new HashMap<String, Object>();        atts.clear();        if (triMesh.getVertexBuffer(0)!=null){                if (properties.get("q3vert")!=null)                    atts.put("q3vert",vertsToShorts(BufferUtils.getVector3Array(triMesh.getVertexBuffer(0))));                else                    atts.put("data",BufferUtils.getVector3Array(triMesh.getVertexBuffer(0)));            }            writeTag("vertex",atts);            writeEndTag("vertex");                atts.clear();            if (triMesh.getNormalBuffer(0)!=null){                if (properties.get("q3norm")!=null)                    atts.put("q3norm",normsToShorts(BufferUtils.getVector3Array(triMesh.getNormalBuffer(0))));                else                    atts.put("data",BufferUtils.getVector3Array(triMesh.getNormalBuffer(0)));            }            writeTag("normal",atts);            writeEndTag("normal");                atts.clear();            if (triMesh.getColorBuffer(0)!=null)                atts.put("data",BufferUtils.getColorArray(triMesh.getColorBuffer(0)));            writeTag("color",atts);            writeEndTag("color");                atts.clear();            if (triMesh.getDefaultColor()!=null)                atts.put("data",triMesh.getDefaultColor());            writeTag("defcolor",atts);            writeEndTag("defcolor");                atts.clear();            for (int i=0;i<triMesh.getNumberOfUnits(0);i++){                if (triMesh.getTextureBuffer(0, i)!=null) {                    if (i!=0)                        atts.put("texindex",new Integer(i));                    atts.put("data",BufferUtils.getVector2Array(triMesh.getTextureBuffer(0, i)));                    writeTag("texturecoords",atts);                    writeEndTag("texturecoords");                }            }                        atts.clear();            if (triMesh.getIndexBuffer(0)!=null)                atts.put("data",BufferUtils.getIntArray(triMesh.getIndexBuffer(0)));            writeTag("index",atts);            writeEndTag("index");                if (triMesh.getBatch(0).getModelBound()!=null)            writeBounds(triMesh.getBatch(0).getModelBound());    }