edu.sdsc.mbt.util
Class PickUtils

java.lang.Object
  extended byedu.sdsc.mbt.util.PickUtils

public class PickUtils
extends java.lang.Object

This class provides a number of utility methods for handling picking and subsequent selection. Provides pick-level behavior mapping (eg: Atoms->Residues->Fragments->Chains). Provides closestAtom method to determine the closest atom relative to a specified StructureComponent and point in 3D space.

Author:
John L. Moreland
See Also:
StructureComponent

Field Summary
static int PICK_ATOMS
           
static int PICK_AUTO
           
static int PICK_CHAINS
           
static int PICK_FRAGMENTS
           
static int PICK_MOLECULES
           
static int PICK_RESIDUES
           
static int pickLevel
           
 
Constructor Summary
PickUtils()
           
 
Method Summary
static Atom closestAtom(StructureComponent sc, double[] coord)
          Find the atom object within the specified structure component which is closest to the given coordinate.
static int getPickLevel()
          Get the structure component pick level.
static StructureComponent pickLevelComponent(StructureComponent sc, double[] coord)
          Walk the data hierarchy (atom/bond-residue-fragment-chain-molecule) from the given structure component level toward the current pick level, and return the current pick level component.
static void setPickLevel(int level)
          Set the structure component pick level.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PICK_AUTO

public static final int PICK_AUTO
See Also:
Constant Field Values

PICK_ATOMS

public static final int PICK_ATOMS
See Also:
Constant Field Values

PICK_RESIDUES

public static final int PICK_RESIDUES
See Also:
Constant Field Values

PICK_FRAGMENTS

public static final int PICK_FRAGMENTS
See Also:
Constant Field Values

PICK_CHAINS

public static final int PICK_CHAINS
See Also:
Constant Field Values

PICK_MOLECULES

public static final int PICK_MOLECULES
See Also:
Constant Field Values

pickLevel

public static int pickLevel
Constructor Detail

PickUtils

public PickUtils()
Method Detail

setPickLevel

public static void setPickLevel(int level)
Set the structure component pick level.


getPickLevel

public static int getPickLevel()
Get the structure component pick level.


pickLevelComponent

public static StructureComponent pickLevelComponent(StructureComponent sc,
                                                    double[] coord)
Walk the data hierarchy (atom/bond-residue-fragment-chain-molecule) from the given structure component level toward the current pick level, and return the current pick level component.


closestAtom

public static Atom closestAtom(StructureComponent sc,
                               double[] coord)
Find the atom object within the specified structure component which is closest to the given coordinate.