Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/14/15 20:23:19 (8 years ago)
Author:
gkronber
Message:

#1966: general code cleanup ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/PackingPlanVisualizations/3D/BasicCuboidShape.cs

    r13032 r13465  
    2525
    2626namespace PackingPlanVisualizations {
    27  
     27
    2828  public class BasicCuboidShape {
    2929    //Basic information
    30     private Vector3 shapeSize;
     30    private readonly Vector3 shapeSize;
    3131    public Vector3 ShapeSize { get { return shapeSize; } }
    32     private Vector3 shapePosition;
     32    private readonly Vector3 shapePosition;
    3333    public Vector3 ShapePosition { get { return shapePosition; } }
    34     private int shapeID;
     34    private readonly int shapeID;
    3535    public int ShapeID { get { return shapeID; } }
    3636    public int Material { get; set; }
    3737
    3838
    39     //Vertices                                       
     39    //Vertices
    4040    private VertexPositionColorNormal[] shapeTriangleVertices;
    4141    private VertexPositionColorNormal[] shapeLineVertices;
    4242
    4343    public BasicCuboidShape(Vector3 size, Vector3 position, int shapeNr, int material) {
    44       shapeSize       = size;
    45       shapePosition   = position;
    46       shapeID     = shapeNr;
     44      shapeSize = size;
     45      shapePosition = position;
     46      shapeID = shapeNr;
    4747      this.Material = material;
    4848    }
     
    6565
    6666    public void RenderShapeTriangles(GraphicsDevice device) {
    67       RenderShapeTriangles(device, Material == 0 ? new Color(60,60,60) :new Color (0,0,0));
     67      RenderShapeTriangles(device, Material == 0 ? new Color(60, 60, 60) : new Color(0, 0, 0));
    6868    }
    6969
     
    8585    }
    8686
    87     public Vector3 CalculatePositionRelativeToBottomLeftBackCorner(Vector3 itemSize, Vector3 itemPosition) {     
    88       //Vector3 bottomLeftBack = shapePosition + new Vector3(-1.0f, -1.0f, 1.0f) * shapeSize;
    89       Vector3 newPosition = itemPosition - (shapeSize/2 - itemSize/2);
     87    public Vector3 CalculatePositionRelativeToBottomLeftBackCorner(Vector3 itemSize, Vector3 itemPosition) {
     88      Vector3 newPosition = itemPosition - (shapeSize / 2 - itemSize / 2);
    9089      return newPosition;
    9190    }
Note: See TracChangeset for help on using the changeset viewer.