org.jdelaunay.delaunay.geometries
Class BoundaryBox

java.lang.Object
  extended by org.jdelaunay.delaunay.geometries.BoundaryBox
All Implemented Interfaces:
Serializable

public class BoundaryBox
extends Object
implements Serializable

A parallepiped defined by two points.

Author:
Adelin Piau, Jean-Yves Martin, Erwan Bocher, Alexis Guéganno
See Also:
Serialized Form

Constructor Summary
BoundaryBox()
          generate an empty box centered on 0,0,0
BoundaryBox(BoundaryBox aBox)
          set a box according to another existing box.
BoundaryBox(double pminx, double pmaxx, double pminy, double pmaxy, double pminz, double pmaxz)
          set a box according to coordinates
 
Method Summary
 void alterBox(com.vividsolutions.jts.geom.Coordinate aPoint)
          alter box coordinates according to the new point
 void alterBox(double x, double y, double z)
          alter box coordinates according to the new point
 void alterBox(DPoint point)
          alter box coordinates according to the new point
 com.vividsolutions.jts.geom.Coordinate getMiddle()
           
 List<DPoint> getPoints()
          Get the list of points that define this boundary box.
 void setBox(double x1, double x2, double y1, double y2, double z1, double z2)
          Set the coordinates of the extremities of this box.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BoundaryBox

public BoundaryBox()
generate an empty box centered on 0,0,0


BoundaryBox

public BoundaryBox(double pminx,
                   double pmaxx,
                   double pminy,
                   double pmaxy,
                   double pminz,
                   double pmaxz)
set a box according to coordinates

Parameters:
pminx - The first x value
pmaxx - The second x value
pminy - The first y value
pmaxy - The second y value
pminz - The first z value
pmaxz - The second z value

BoundaryBox

public BoundaryBox(BoundaryBox aBox)
set a box according to another existing box.

Parameters:
aBox -
Method Detail

setBox

public final void setBox(double x1,
                         double x2,
                         double y1,
                         double y2,
                         double z1,
                         double z2)
Set the coordinates of the extremities of this box.

Parameters:
x1 - The first x value
x2 - The second x value
y1 - The first y value
y2 - The second y value
z1 - The first z value
z2 - The second z value

alterBox

public final void alterBox(double x,
                           double y,
                           double z)
alter box coordinates according to the new point

Parameters:
x -
y -
z -

alterBox

public final void alterBox(com.vividsolutions.jts.geom.Coordinate aPoint)
alter box coordinates according to the new point

Parameters:
aPoint -

alterBox

public final void alterBox(DPoint point)
alter box coordinates according to the new point

Parameters:
aPoint -

getMiddle

public final com.vividsolutions.jts.geom.Coordinate getMiddle()
Returns:
Coordinate of the middle of the box.

toString

public final String toString()
Overrides:
toString in class Object

getPoints

public final List<DPoint> getPoints()
                             throws DelaunayError
Get the list of points that define this boundary box. We just need two of them, as we can build a parallelepiped just from two opposite points of it.

Returns:
The min and max apex of the box, in a List of DPoint instances, if it is not empty. The List contains two DPoint instances, consequently.
An empty list if the box is empty.
Throws:
DelaunayError


Copyright © 2014 IRSTV CNRS-FR-2488. All Rights Reserved.