Package com.szuppe.jakub.common

Examples of com.szuppe.jakub.common.LineSegment2D


    // spód
    Coordinates2D bottomStart = getBottomLeftCornerCoordinates().moveAlongVector(
        new Coordinates2D(0, -radius));
    Coordinates2D bottomEnd = getBottomRightCornerCoordinates().moveAlongVector(
        new Coordinates2D(0, -radius));
    brickLineSegments.add(new LineSegment2D(bottomStart, bottomEnd));
    // prawa ściana
    Coordinates2D rightSideStart = getBottomRightCornerCoordinates().moveAlongVector(
        new Coordinates2D(radius, 0));
    Coordinates2D rightSideEnd = getTopRightCornerCoordinates().moveAlongVector(
        new Coordinates2D(radius, 0));
    brickLineSegments.add(new LineSegment2D(rightSideStart, rightSideEnd));
    // wierzch
    Coordinates2D topStart = getTopRightCornerCoordinates().moveAlongVector(
        new Coordinates2D(0, radius));
    Coordinates2D topEnd = getTopLeftCornerCoordinates().moveAlongVector(
        new Coordinates2D(0, radius));
    brickLineSegments.add(new LineSegment2D(topStart, topEnd));
    // Lewa ściana przesunięte o radius na zewnątrz.
    Coordinates2D leftSideStart = getTopLeftCornerCoordinates().moveAlongVector(
        new Coordinates2D(-radius, 0));
    Coordinates2D leftSideEnd = getBottomLeftCornerCoordinates().moveAlongVector(
        new Coordinates2D(-radius, 0));
    brickLineSegments.add(new LineSegment2D(leftSideStart, leftSideEnd));
    // lewy-dolny róg
    brickLineSegments.add(new LineSegment2D(leftSideEnd, bottomStart));
    // prawy-dolny róg
    brickLineSegments.add(new LineSegment2D(bottomEnd, rightSideStart));
    // prawy-górny róg
    brickLineSegments.add(new LineSegment2D(rightSideEnd, topStart));
    // lewy-górny róg
    brickLineSegments.add(new LineSegment2D(topEnd, leftSideStart));
    return brickLineSegments;
  }
View Full Code Here

TOP

Related Classes of com.szuppe.jakub.common.LineSegment2D

Copyright © 2018 www.massapicom. 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.