Package framework.spacial

Examples of framework.spacial.Line


    return line != null ? line.getFrom() : null;
  }

  @Override
  public void renderForDebug(Graphics g, Vector2f pos) {
    Line l = getLine().translate(pos);
    int x1 = Math.round(l.getFrom().getX());
    int y1 = Math.round(l.getFrom().getY());
    int x2 = Math.round(l.getTo().getX());
    int y2 = Math.round(l.getTo().getY());
    g.drawLine(x1, y1, x2, y2);
  }
View Full Code Here


  private static ParentComponent generateGridLine(float screenX, float screenY, boolean isHorizontal){
    ParentComponent lineParent = new ParentComponent();

    int lineWidth = 50;

    lineParent.addComponent(new CollisionComponent(new LineCollisionMask(new Line(0, 0, 0,lineWidth))));

    lineParent.addComponent(new SpriteComponent(ColourManager.getUnplacedLine()));
   
    if(isHorizontal){
      lineParent.addComponent(new OrientationComponent(270));
View Full Code Here

    root.addComponent(gridLine);
    gridLine.addComponent(new GridLine());
    gridLine.addComponent(new SpriteComponent("res/img/square.png", 10, 50));
    gridLine.addComponent(new PositionComponent(500,500));
    gridLine.addComponent(new OrientationComponent(100));
    gridLine.addComponent(new CollisionComponent(new LineCollisionMask(new Line(0, 0, 0, 100))));
    //gridLine.addComponent(new CollisionComponent(new RectangularCollisionMask(new Rectangle(10, 50))));
   
    ParentComponent cursor = new ParentComponent();
    root.addComponent(cursor);
    cursor.addComponent(new MouseFollowerComponent());
View Full Code Here

TOP

Related Classes of framework.spacial.Line

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.