unbboolean.bool
Class Bound

java.lang.Object
  |
  +--unbboolean.bool.Bound

public class Bound
extends java.lang.Object

Representation of a bound - the extremes of a 3d component for each coordinate.

See: D. H. Laidlaw, W. B. Trumbore, and J. F. Hughes. "Constructive Solid Geometry for Polyhedral Objects" SIGGRAPH Proceedings, 1986, p.161.

Author:
Danilo Balby Silva Castanheira (danbalby@yahoo.com)

Constructor Summary
Bound(javax.vecmath.Point3d[] vertices)
          Bound constructor for a object 3d
Bound(javax.vecmath.Point3d p1, javax.vecmath.Point3d p2, javax.vecmath.Point3d p3)
          Bound constructor for a face
 
Method Summary
 boolean overlap(Bound bound)
          Checks if a bound overlaps other one
 java.lang.String toString()
          Makes a string definition for the bound object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Bound

public Bound(javax.vecmath.Point3d p1,
             javax.vecmath.Point3d p2,
             javax.vecmath.Point3d p3)
Bound constructor for a face

Parameters:
p1 - point relative to the first vertex
p2 - point relative to the second vertex
p3 - point relative to the third vertex

Bound

public Bound(javax.vecmath.Point3d[] vertices)
Bound constructor for a object 3d

Parameters:
vertices - the object vertices
Method Detail

toString

public java.lang.String toString()
Makes a string definition for the bound object

Overrides:
toString in class java.lang.Object
Returns:
the string definition

overlap

public boolean overlap(Bound bound)
Checks if a bound overlaps other one

Parameters:
bound - other bound to make the comparison
Returns:
true if they insersect, false otherwise