Beispiel #1
0
  @Override
  public void readConstructorParams(DataInput in) throws IOException {
    super.readConstructorParams(in);

    radius = in.readFloat();
    height = in.readFloat();
    xdivision = in.readInt();
    ydivision = in.readInt();
  }
Beispiel #2
0
  @Override
  public void writeConstructorParams(DataOutput out) throws IOException {
    super.writeConstructorParams(out);

    out.writeFloat(((Cone) node).getRadius());
    out.writeFloat(((Cone) node).getHeight());
    out.writeInt(((Cone) node).getXdivisions());
    out.writeInt(((Cone) node).getYdivisions());
  }
Beispiel #3
0
  @Override
  public void buildGraph() {

    if (bodyAppearance == capAppearance) {
      ((Cone) node).setAppearance((Appearance) control.getSymbolTable().getJ3dNode(bodyAppearance));
    } else {
      ((Cone) node)
          .setAppearance(
              Cone.BODY, (Appearance) control.getSymbolTable().getJ3dNode(bodyAppearance));
      ((Cone) node)
          .setAppearance(Cone.CAP, (Appearance) control.getSymbolTable().getJ3dNode(capAppearance));
    }

    super.buildGraph(); // This must be the last call in the method
  }
Beispiel #4
0
 @Override
 public void readObject(DataInput in) throws IOException {
   super.readObject(in);
   bodyAppearance = in.readInt();
   capAppearance = in.readInt();
 }
Beispiel #5
0
 @Override
 public void writeObject(DataOutput out) throws IOException {
   super.writeObject(out);
   out.writeInt(bodyAppearance);
   out.writeInt(capAppearance);
 }