showStructure
Class UnitCell

java.lang.Object
  extended by javax.media.j3d.SceneGraphObject
      extended by javax.media.j3d.Node
          extended by javax.media.j3d.Group
              extended by javax.media.j3d.BranchGroup
                  extended by showStructure.UnitCell
Direct Known Subclasses:
HexagonalCell

public class UnitCell
extends javax.media.j3d.BranchGroup


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_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
 
Constructor Summary
UnitCell()
          Default constructor creates a simple cubic cell with dimension 1.0
UnitCell(int t, float d)
          Creates a cubic cell of arbitrary dimension
UnitCell(int t, float a, float b, float c)
          Creates a cubic cell of arbitrary dimension
 
Method Summary
 float getAlpha()
           
 float getBeta()
           
 float getCellA()
           
 float getCellB()
           
 float getCellC()
           
 int getCellType()
          Cell Types: 1 cubic (simple cubic) 2 body-centered cubic (bcc) 3 face-centered cubic (fcc)
 float getGamma()
           
 javax.vecmath.Vector3f getPointTranslation(int idx)
          Returns the virtual world translation of the specified point.
 void mulRotation(float x, float y, float z, float a)
          Multiplies the existing transform by the new rotation
 void mulTranslation(float x, float y, float z)
          Multiplies the existing transform by the new translation
 void setFacesVisible(boolean s)
          Sets the visibility of the unit cell faces
 void setLinesVisible(boolean s)
          Sets the visibility of the unit cell lines
 void setRotation(float x, float y, float z, float a)
          Sets the UnitCell rotation
 void setTranslation(float x, float y, float z)
          Sets the UnitCell translation.
 
Methods inherited from class javax.media.j3d.BranchGroup
cloneNode, compile, detach, pickAll, pickAll, pickAllSorted, pickAllSorted, pickAny, pickAny, pickClosest, 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, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
 
Methods inherited from class javax.media.j3d.SceneGraphObject
clearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnitCell

public UnitCell()
Default constructor creates a simple cubic cell with dimension 1.0


UnitCell

public UnitCell(int t,
                float d)
Creates a cubic cell of arbitrary dimension

Parameters:
t - cell type (1 = sc, 2 = bcc, 3 = fcc)
d - cell dimension

UnitCell

public UnitCell(int t,
                float a,
                float b,
                float c)
Creates a cubic cell of arbitrary dimension

Parameters:
t - cell type (1 = sc, 2 = bcc, 3 = fcc)
a - cell a dimension
b - cell b dimension
c - cell c dimension
Method Detail

getCellType

public int getCellType()
Cell Types: 1 cubic (simple cubic) 2 body-centered cubic (bcc) 3 face-centered cubic (fcc)

Returns:
cell type

getCellA

public float getCellA()

getCellB

public float getCellB()

getCellC

public float getCellC()

getAlpha

public float getAlpha()

getBeta

public float getBeta()

getGamma

public float getGamma()

getPointTranslation

public javax.vecmath.Vector3f getPointTranslation(int idx)
Returns the virtual world translation of the specified point.

Parameters:
idx - index of point

setFacesVisible

public void setFacesVisible(boolean s)
Sets the visibility of the unit cell faces

Parameters:
s - visibility state

setLinesVisible

public void setLinesVisible(boolean s)
Sets the visibility of the unit cell lines

Parameters:
s - visibility state

setTranslation

public void setTranslation(float x,
                           float y,
                           float z)
Sets the UnitCell translation.

Parameters:
x -
y -
z -

setRotation

public void setRotation(float x,
                        float y,
                        float z,
                        float a)
Sets the UnitCell rotation

Parameters:
x - x component of axis of rotation
y - y component of axis of rotation
z - z component of axis of rotation
a - angle of rotation

mulRotation

public void mulRotation(float x,
                        float y,
                        float z,
                        float a)
Multiplies the existing transform by the new rotation


mulTranslation

public void mulTranslation(float x,
                           float y,
                           float z)
Multiplies the existing transform by the new translation