예제 #1
0
 String getMeshState(Mesh mesh, String type) {
   StringBuffer s = new StringBuffer();
   if (mesh == null) return "";
   if (mesh.showPoints) appendCmd(s, type + " dots");
   if (mesh.drawTriangles) appendCmd(s, type + " mesh");
   if (!mesh.fillTriangles) appendCmd(s, type + " nofill");
   if (!mesh.visible) appendCmd(s, type + " off");
   return s.toString();
 }
예제 #2
0
 String getShapeState() {
   StringBuffer s = new StringBuffer();
   for (int i = 0; i < meshCount; i++) {
     String cmd = meshes[i].scriptCommand;
     if (cmd == null) continue;
     Mesh mesh = meshes[i];
     if (mesh.modelIndex > 0 && modelCount > 1)
       appendCmd(s, "frame " + viewer.getModelNumber(mesh.modelIndex));
     s.append(cmd + "\n");
     if (cmd.charAt(0) != '#') {
       s.append(getMeshState(mesh, myType));
       if (mesh.vertexColixes == null)
         appendCmd(s, getColorCommand("$" + mesh.thisID, mesh.colix));
     }
   }
   return s.toString();
 }