|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.media.j3d.SceneGraphObject
javax.media.j3d.Node
javax.media.j3d.Group
javax.media.j3d.BranchGroup
frontend.java3d.SphereWorld
public class SphereWorld
SphereWorld represents the Sphere in a graphical sense
| 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 | |
|---|---|
SphereWorld(SphereWorldModel theWorld)
SphereWorld default constructor |
|
| Method Summary | |
|---|---|
void |
addChildToMainGroup(javax.media.j3d.Node myChild)
addChildToMainGroup will add a child to the correct Group |
javax.media.j3d.Background |
getBkg()
getBkg returns the background to display |
void |
getCameraToMouseVec(java.awt.Point clickPos,
javax.vecmath.Point3d cameraPoint,
javax.vecmath.Vector3d dir)
getCameraToMouseVec will initialize the given vector to be a vector from the current camera location to the mouse location provided |
javax.vecmath.Point3f |
getClosestPointToClick(java.awt.Point clickPos)
getClosestPointToClick will return a valid point on the sphere based on where the user has clicked |
javax.vecmath.Point3f |
getClosestPointToClick(java.awt.Point clickPos,
javax.vecmath.Point3d cameraPoint,
javax.vecmath.Vector3d dir)
getClosestPointToClick will return a valid point on the sphere based on where the user has clicked |
javax.media.j3d.BranchGroup |
getLighting()
getLighting returns the lighting information for the Sphere |
javax.vecmath.Point3f |
getSphereCenter()
A function to get where the sphere is centered at |
float |
getSphereRadius()
Returns the radius of the sphere |
float |
getSphereRadiusSquared()
getSphereRadiusSquared returns the radius of the sphere squared it is sorted so it does not do the multiplcation each time |
void |
setCanvas(javax.media.j3d.Canvas3D myCanv)
setCanvas will setup the current Canvas3D |
void |
setLabelState(boolean newState)
setLabelState allows one to change whether point labels are displayed or not |
void |
setTransparency(boolean newTrans)
setTransparency can be used to set the transparency of the sphere |
void |
update(java.util.Observable arg0,
java.lang.Object arg1)
|
| 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 |
|---|
public SphereWorld(SphereWorldModel theWorld)
theWorld - is the SphereWorldModel to model| Method Detail |
|---|
public javax.media.j3d.BranchGroup getLighting()
public javax.media.j3d.Background getBkg()
public float getSphereRadius()
public float getSphereRadiusSquared()
public javax.vecmath.Point3f getSphereCenter()
public void addChildToMainGroup(javax.media.j3d.Node myChild)
myChild - the child to add to the Sphere
public void update(java.util.Observable arg0,
java.lang.Object arg1)
update in interface java.util.Observerpublic void setCanvas(javax.media.j3d.Canvas3D myCanv)
myCanv - public javax.vecmath.Point3f getClosestPointToClick(java.awt.Point clickPos)
clickPos - is the location of the mouse click
public void getCameraToMouseVec(java.awt.Point clickPos,
javax.vecmath.Point3d cameraPoint,
javax.vecmath.Vector3d dir)
clickPos - is the point clicked oncameraPoint - will be used to store the location of the cameradir - will be used to store the final vector from the camera to the
mouse
public javax.vecmath.Point3f getClosestPointToClick(java.awt.Point clickPos,
javax.vecmath.Point3d cameraPoint,
javax.vecmath.Vector3d dir)
clickPos - is the point the user clickedcameraPoint - will be set to the position of the cameradir - will be set to the direction from the camera to the point that
was clicked on
public void setTransparency(boolean newTrans)
newTrans - true to make transparent false to make normal.public void setLabelState(boolean newState)
newState - if set to true labels are displayed and if set to false
labels are disabled
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||