Package wolf.city.buildings

Source Code of wolf.city.buildings.Floor

package wolf.city.buildings;

import java.util.ArrayList;

import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;

import wolf.city.buildings.shape.WallContainer;

public class Floor {

  public ArrayList<WallContainer> exterior;
  public float height;

  public Floor(Geometry shape, float height) {
    this.height = height;
    exterior = new ArrayList<WallContainer>();
    Coordinate[] cs = shape.getCoordinates();
    exterior.add(new WallContainer(this, cs[cs.length-1], cs[0]));
    for(int i=1; i<cs.length; i++){
      Coordinate p0 = cs[i-1];
      Coordinate p1 = cs[i];
      exterior.add(new WallContainer(this, p0, p1));
     
    }
  }
}
TOP

Related Classes of wolf.city.buildings.Floor

TOP
Copyright © 2018 www.massapi.com. 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.