Class BoundsCalculator


  • public class BoundsCalculator
    extends Object
    Utility class for calculating the 2D bounding rectangles (bounds) of various IChemObject subtypes - IChemModel, IReactionSet, IReaction, IAtomContainerSet, and IAtomContainer.
    Author:
    maclean
    Source code:
    main
    Belongs to CDK module:
    renderbasic
    • Constructor Detail

      • BoundsCalculator

        public BoundsCalculator()
    • Method Detail

      • calculateBounds

        public static Rectangle2D calculateBounds​(IChemModel chemModel)
        Calculate the bounding rectangle for a chem model.
        Parameters:
        chemModel - the chem model to use
        Returns:
        the bounding rectangle of the chem model
      • calculateBounds

        public static Rectangle2D calculateBounds​(IReactionSet reactionSet)
        Calculate the bounding rectangle for a reaction set.
        Parameters:
        reactionSet - the reaction set to use
        Returns:
        the bounding rectangle of the reaction set
      • calculateBounds

        public static Rectangle2D calculateBounds​(IReaction reaction)
        Calculate the bounding rectangle for a reaction.
        Parameters:
        reaction - the reaction to use
        Returns:
        the bounding rectangle of the reaction
      • calculateBounds

        public static Rectangle2D calculateBounds​(IAtomContainerSet moleculeSet)
        Calculate the bounding rectangle for a molecule set.
        Parameters:
        moleculeSet - the molecule set to use
        Returns:
        the bounding rectangle of the molecule set
      • calculateBounds

        public static Rectangle2D calculateBounds​(IAtomContainer atomContainer)
        Calculate the bounding rectangle for an atom container.
        Parameters:
        atomContainer - the atom container to use
        Returns:
        the bounding rectangle of the atom container