2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2012 - Scilab Enterprises - Bruno JOFRET
5 * This file must be used under the terms of the CeCILL.
6 * This source file is licensed as described in the file COPYING, which
7 * you should have received as part of this distribution. The terms
8 * are also available at
9 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
12 package org.scilab.modules.renderer.JoGLView.interaction;
14 import java.awt.Point;
16 import org.scilab.forge.scirenderer.tranformations.Vector3d;
17 import org.scilab.modules.renderer.JoGLView.DrawerVisitor;
20 * @author Bruno JOFRET
22 public class TwoPointsRubberBox extends RubberBox implements PointRubberBox {
25 * Default constructor.
27 * @param drawerVisitor parent drawer visitor.
29 public TwoPointsRubberBox(DrawerVisitor drawerVisitor) {
33 public double[] getResults() {
36 Math.min(firstPoint.getX(), secondPoint.getX()),
37 Math.max(firstPoint.getY(), secondPoint.getY()),
38 Math.max(firstPoint.getZ(), secondPoint.getZ()),
39 Math.abs(firstPoint.getX() - secondPoint.getX()),
40 Math.abs(firstPoint.getY() - secondPoint.getY()),
41 Math.abs(firstPoint.getZ() - secondPoint.getZ())