示例#1
0
 /**
  * Creates a render pass position.
  *
  * @param pass The render pass.
  * @param list The animation list.
  */
 public RenderpassPosition(final T pass, final AnimationList list) {
   super(new Point2D.Double(pass.getOffsetX(), pass.getOffsetY()));
   bbox = new Rectangle2D.Double();
   pass.getBoundingBox(bbox);
   this.pass = pass;
   list.addAnimated(this);
   pass.setAnimationList(list);
 }
示例#2
0
 /**
  * Getter.
  *
  * @param rect When the position is in animation the resulting frame is the destination
  *     bounding-box of the render pass. Otherwise the current bounding box is used.
  */
 public void getPredictBBox(final Rectangle2D rect) {
   pass.getBoundingBox(rect);
   final Point2D pred = getPredict();
   rect.setFrame(
       rect.getX() + pred.getX(), rect.getY() + pred.getY(), rect.getWidth(), rect.getHeight());
 }