Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/12/16 19:54:35 (8 years ago)
Author:
gkronber
Message:

#1966: renamed *PackingDimension -> PackingPosition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/CuboidPackingShape.cs

    r14046 r14048  
    3131  [Item("CuboidPackingShape", "Represents the cuboid measures (width, height, depth) of a three-dimensional cuboidic bin-packing object.")]
    3232  [StorableClass]
    33   public class CuboidPackingShape : PackingShape<ThreeDimensionalPacking>, IComparable<CuboidPackingShape> {
     33  public class CuboidPackingShape : PackingShape<PackingPosition>, IComparable<CuboidPackingShape> {
    3434    public IFixedValueParameter<IntValue> HeightParameter {
    3535      get { return (IFixedValueParameter<IntValue>)Parameters["Height"]; }
     
    128128      public int y2;
    129129      public int z2;
    130       public CuboidDiagonal(CuboidPackingShape myShape) : this(new ThreeDimensionalPacking(0, 0, 0, 0), myShape) { }
    131       public CuboidDiagonal(ThreeDimensionalPacking myPosition, CuboidPackingShape myShape) {
     130      public CuboidDiagonal(CuboidPackingShape myShape) : this(new PackingPosition(0, 0, 0, 0), myShape) { }
     131      public CuboidDiagonal(PackingPosition myPosition, CuboidPackingShape myShape) {
    132132        x1 = myPosition.X;
    133133        y1 = myPosition.Y;
     
    141141
    142142    #region Helpers
    143     public override ThreeDimensionalPacking Origin { get { return new ThreeDimensionalPacking(0, 0, 0, 0); } }
     143    public override PackingPosition Origin { get { return new PackingPosition(0, 0, 0, 0); } }
    144144    public override int Volume { get { return Width * Height * Depth; } }
    145145
    146     public override bool EnclosesPoint(ThreeDimensionalPacking myPosition, ThreeDimensionalPacking checkedPoint) {
     146    public override bool EnclosesPoint(PackingPosition myPosition, PackingPosition checkedPoint) {
    147147      return (myPosition.X <= checkedPoint.X &&
    148148                (myPosition.X + (myPosition.Rotated ? Depth : Width) - 1) >= checkedPoint.X &&
     
    152152                (myPosition.Z + (myPosition.Rotated ? Width : Depth) - 1) >= checkedPoint.Z);
    153153    }
    154     public override bool Encloses(ThreeDimensionalPacking checkedPosition, PackingShape<ThreeDimensionalPacking> checkedShape) {
     154    public override bool Encloses(PackingPosition checkedPosition, PackingShape<PackingPosition> checkedShape) {
    155155      return Encloses(checkedPosition, (CuboidPackingShape)checkedShape);
    156156    }
    157     private bool Encloses(ThreeDimensionalPacking checkedPosition, CuboidPackingShape checkedShape) {
     157    private bool Encloses(PackingPosition checkedPosition, CuboidPackingShape checkedShape) {
    158158      return Encloses(new CuboidDiagonal(this), new CuboidDiagonal(checkedPosition, checkedShape));
    159159    }
     
    167167    }
    168168
    169     public override bool Overlaps(ThreeDimensionalPacking myPosition, ThreeDimensionalPacking checkedPosition, PackingShape<ThreeDimensionalPacking> checkedShape) {
     169    public override bool Overlaps(PackingPosition myPosition, PackingPosition checkedPosition, PackingShape<PackingPosition> checkedShape) {
    170170      return Overlaps(myPosition, checkedPosition, (CuboidPackingShape)checkedShape);
    171171    }
    172     private bool Overlaps(ThreeDimensionalPacking myPosition, ThreeDimensionalPacking checkedPosition, CuboidPackingShape checkedShape) {
     172    private bool Overlaps(PackingPosition myPosition, PackingPosition checkedPosition, CuboidPackingShape checkedShape) {
    173173      return Overlaps(new CuboidDiagonal(myPosition, this), new CuboidDiagonal(checkedPosition, checkedShape));
    174174    }
Note: See TracChangeset for help on using the changeset viewer.