com.tensegrity.composite
Class CompositeBBoxOperations

java.lang.Object
  extended bycom.tensegrity.composite.CompositeBBoxOperations

public final class CompositeBBoxOperations
extends java.lang.Object

This clas provides static utilitiy methods useful when working with Boundaries and BoundingBoxes.

Version:
$Id: CompositeBBoxOperations.java,v 1.11 2005/06/17 08:36:07 BurkhardWick Exp $
Author:
MichaelKegel

Field Summary
static int CHECK_AGAINST_BBOX
          Constants specifying the different modes for method contains.
static int CHECK_AGAINST_CENTER
          Constants specifying the different modes for method contains.
 
Method Summary
static Boundary computeBoundingBox(java.util.Iterator it)
          Returns a Boundary containing all Boundaries belonging to the BaseComposites that are accessible by the given Iterator.
static boolean contains(int checkAgainstMode, Boundary bboxCheckFor, Boundary bboxCheckAgainst)
          Checking whether the given Boundary bboxCheckAgainst contains the Boundary bboxCheckFor.
static boolean contains(int checkAgainstMode, Boundary bboxCheckFor, BoundingBox bboxCheckAgainst)
          Checking whether the given BoundingBox bboxCheckAgainst contains the Boundary bboxCheckFor.
static Boundary transform_createnew(Transform2D xform, Boundary bbox)
          Returns a new Boundary that is a transformation of the given Boundary by meams of the given Tramsform2D.
static void transform(Transform2D xform, Boundary bbox)
          Transforms the given Boundary by meams of the given Tramsform2D.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHECK_AGAINST_CENTER

public static final int CHECK_AGAINST_CENTER
Constants specifying the different modes for method contains.

See Also:
Constant Field Values

CHECK_AGAINST_BBOX

public static final int CHECK_AGAINST_BBOX
Constants specifying the different modes for method contains.

See Also:
Constant Field Values
Method Detail

computeBoundingBox

public static final Boundary computeBoundingBox(java.util.Iterator it)
Returns a Boundary containing all Boundaries belonging to the BaseComposites that are accessible by the given Iterator.

Parameters:
it - an Iterator holding BaseComposites.
Returns:
a Boundary containing all Boundaries.

contains

public static final boolean contains(int checkAgainstMode,
                                     Boundary bboxCheckFor,
                                     Boundary bboxCheckAgainst)
Checking whether the given Boundary bboxCheckAgainst contains the Boundary bboxCheckFor.

Parameters:
checkAgainstMode - the mode to use. Valid modes are CHECK_AGAINST_CENTER and CHECK_AGAINST_BBOX.
bboxCheckFor - the Boundary to check.
bboxCheckAgainst - the Boundary to check against.
Returns:
true, if the given Boundary bboxCheckAgainst contains the Boundary bboxCheckFor.

contains

public static final boolean contains(int checkAgainstMode,
                                     Boundary bboxCheckFor,
                                     BoundingBox bboxCheckAgainst)
Checking whether the given BoundingBox bboxCheckAgainst contains the Boundary bboxCheckFor.

Parameters:
checkAgainstMode - the mode to use. Valid modes are CHECK_AGAINST_CENTER and CHECK_AGAINST_BBOX.
bboxCheckFor - the Boundary to check.
bboxCheckAgainst - the BoundingBox to check against.
Returns:
true, if the given BoundingBox bboxCheckAgainst contains the Boundary bboxCheckFor.

transform

public static final void transform(Transform2D xform,
                                   Boundary bbox)
Transforms the given Boundary by meams of the given Tramsform2D.

Parameters:
xform - the Transform2D to apply.
bbox - the Boundary to transform.

transform_createnew

public static final Boundary transform_createnew(Transform2D xform,
                                                 Boundary bbox)
Returns a new Boundary that is a transformation of the given Boundary by meams of the given Tramsform2D. The given Boundary is left unchanged.

Parameters:
xform - the Transform2D to apply.
bbox - the Boundary to transform.
Returns:
a new transformed Boundary.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.