Class SubunitGraphic

java.lang.Object
  extended byjavax.media.j3d.SceneGraphObject
      extended byjavax.media.j3d.Node
          extended byjavax.media.j3d.Group
              extended byjavax.media.j3d.BranchGroup
                  extended bySubunitGraphic

public class SubunitGraphic
extends javax.media.j3d.BranchGroup

extends branchGroup to make a complete Subunit graphic using BindingSiteGraphic components: SubunitGraphic / | Lights TRansformGroup | protein / \ ... sphere TransformGroup ... | ... cone ...


Field Summary
 
Fields inherited from class javax.media.j3d.BranchGroup
ALLOW_DETACH
 
Fields inherited from class javax.media.j3d.Group
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE
 
Fields inherited from class javax.media.j3d.Node
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
SubunitGraphic()
          Constructs a SubunitGraphic with a default BranchGroup leading to the main TransformGroup and a sphere for the basic Subunit
SubunitGraphic(Subunit sub)
          Constructs a SubunitGraphic based on sub.
 
Method Summary
 javax.media.j3d.BranchGroup branchGroup()
          Return SubunitGraphic as a BranchGroup
 void changeConformation(Conformation oldConf, Conformation newConf)
           
 javax.vecmath.Vector3d getBindingSitePos(BindingSite bs)
          Returns the position of the BindingSite bs in relation to the Assembly
 javax.vecmath.Quat4d getBindingSiteRot(BindingSite bs)
          Returns the actual rotation of the binding site bs in relation to the Assembly
 javax.vecmath.Vector3d getPos()
           
 javax.vecmath.Quat4d getRot()
           
 javax.media.j3d.Transform3D getTransform()
          Gets the Transform3D of this SubunitGraphic
 void realRotate(javax.vecmath.Quat4d rot)
           
 void rotate(javax.vecmath.Quat4d q)
          Rotates this SubunitGraphic by q
 void translate(javax.vecmath.Vector3d v)
          Translates this SubunitGraphic by v
 void updateLocation(javax.vecmath.Quat4d rot, javax.vecmath.Vector3d pos)
          Sets the location of this SubunitGraphic to specified rotation and position
 void updateLocation(javax.media.j3d.Transform3D t)
          Sets location of this SubunitGraphic to Transform3D t
 
Methods inherited from class javax.media.j3d.BranchGroup
cloneNode, compile, detach, pickAll, pickAllSorted, pickAny, pickClosest
 
Methods inherited from class javax.media.j3d.Group
addChild, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds
 
Methods inherited from class javax.media.j3d.Node
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setUserData, updateNodeReferences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubunitGraphic

public SubunitGraphic()
Constructs a SubunitGraphic with a default BranchGroup leading to the main TransformGroup and a sphere for the basic Subunit


SubunitGraphic

public SubunitGraphic(Subunit sub)
Constructs a SubunitGraphic based on sub. the main TransformGroup is parent to the Subunit sphere and graphics for all the BindingSites found in sub.

Parameters:
sub - Subunit
Method Detail

updateLocation

public void updateLocation(javax.vecmath.Quat4d rot,
                           javax.vecmath.Vector3d pos)
Sets the location of this SubunitGraphic to specified rotation and position

Parameters:
rot - Quat4d
pos - Vector3d

changeConformation

public void changeConformation(Conformation oldConf,
                               Conformation newConf)

updateLocation

public void updateLocation(javax.media.j3d.Transform3D t)
Sets location of this SubunitGraphic to Transform3D t

Parameters:
t -

realRotate

public void realRotate(javax.vecmath.Quat4d rot)

rotate

public void rotate(javax.vecmath.Quat4d q)
Rotates this SubunitGraphic by q

Parameters:
q - Quat4d

getRot

public javax.vecmath.Quat4d getRot()

getPos

public javax.vecmath.Vector3d getPos()

translate

public void translate(javax.vecmath.Vector3d v)
Translates this SubunitGraphic by v

Parameters:
v - Vector3d

branchGroup

public javax.media.j3d.BranchGroup branchGroup()
Return SubunitGraphic as a BranchGroup

Returns:
BranchGroup

getTransform

public javax.media.j3d.Transform3D getTransform()
Gets the Transform3D of this SubunitGraphic

Returns:
Transform3D

getBindingSitePos

public javax.vecmath.Vector3d getBindingSitePos(BindingSite bs)
Returns the position of the BindingSite bs in relation to the Assembly

Parameters:
bs - BindingSite
Returns:
Vector3d

getBindingSiteRot

public javax.vecmath.Quat4d getBindingSiteRot(BindingSite bs)
Returns the actual rotation of the binding site bs in relation to the Assembly

Parameters:
bs -
Returns:
Quat4d