|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--Renderer.Toy
Defines a Toy in a Sandbox, which is the graphical counterpart to an Object in the Reasoner. It maintains a set of properties (position, dimensions, attitude, etc.) that are based on the Reasoner output but tailored for graphical rendering.
Sandbox,
Attitude,
Dimensions,
Position| Field Summary | |
private Attitude |
m_attitude
|
private javax.media.j3d.BranchGroup |
m_branch_group
|
private Dimensions |
m_dimensions
|
private java.util.Hashtable |
m_metaoverlays
|
private ModelTemplate |
m_model
|
private java.lang.String |
m_name
|
private Position |
m_position
|
private javax.media.j3d.TransformGroup |
m_transform_group_front_oriented_metaoverlays
|
private javax.media.j3d.TransformGroup |
m_transform_group_north_oriented_metaoverlays
|
private javax.media.j3d.TransformGroup |
m_transform_group_toy
|
| Constructor Summary | |
Toy(java.lang.String toy_name,
java.lang.String model_name,
ModelLibrary model_library,
boolean is_wireframe,
float transparency,
javax.vecmath.Color3f override_color,
int instantiation_key)
Creates a new toy. |
|
| Method Summary | |
void |
addMetaOverlay(MetaOverlay metaoverlay)
Adds a MetaOverlay to this toy. |
void |
addMetaOverlay(MetaOverlayPair metaoverlay_pair)
Adds a MetaOverlayPair, which is a convenience wrapper around a pair of MetaOverlays. |
Attitude |
getAttitude()
Returns the attitude of this toy. |
javax.media.j3d.BranchGroup |
getBranchGroup()
Returns the Java3D branch group containing all the graphical components of this toy. |
Dimensions |
getDimensions()
Returns the dimensions of this toy. |
MetaOverlay |
getMetaOverlay(java.lang.String name)
Returns a metaoverlay associated with this toy. |
int |
getMetaOverlayCount()
Returns the number of metaoverlays associated with this toy. |
java.util.Enumeration |
getMetaOverlayNames()
Returns the name of the of metaoverlays associated with this toy. |
ModelTemplate |
getModelTemplate()
Returns the model template defining this toy in the model library. |
java.lang.String |
getName()
Returns the name of this toy. |
Position |
getPosition()
Returns the position of this toy. |
java.lang.String |
toHTMLString()
Returns an indented HTML string representation of this object to be displayed by the Representation Viewer. |
java.lang.String |
toString()
Returns a string representation of this object. |
void |
update()
Updates the graphical components of this toy after its position, attitude, and/or dimensions are changed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.lang.String m_name
private Position m_position
private Dimensions m_dimensions
private Attitude m_attitude
private javax.media.j3d.BranchGroup m_branch_group
private javax.media.j3d.TransformGroup m_transform_group_toy
private javax.media.j3d.TransformGroup m_transform_group_front_oriented_metaoverlays
private javax.media.j3d.TransformGroup m_transform_group_north_oriented_metaoverlays
private java.util.Hashtable m_metaoverlays
private ModelTemplate m_model
| Constructor Detail |
public Toy(java.lang.String toy_name,
java.lang.String model_name,
ModelLibrary model_library,
boolean is_wireframe,
float transparency,
javax.vecmath.Color3f override_color,
int instantiation_key)
throws java.lang.Exception
toy_name - - the name of this toymodel_name - - the name of the model to render for this toymodel_library - - the model libraryis_wireframe - - whether the model will be rendered in wireframetransparency - - the transparency at which the model will be renderedoverride_color - - the optional color overriding the defined color of this model; otherwise nullinstantiation_key - - the "secret code" to prevent unintentional uses of this constructor
java.lang.Exception - - if this constructor is called from an unapproved locationSandbox| Method Detail |
public void addMetaOverlay(MetaOverlay metaoverlay)
throws java.lang.Exception
metaoverlay - - the metaoverlay
java.lang.Exception - - if a metaoverlay with the same name is already associated with this toy
public void addMetaOverlay(MetaOverlayPair metaoverlay_pair)
throws java.lang.Exception
metaoverlay_pair - - the metaoverlay pair
java.lang.Exception - - if either metaoverlay could not be addedpublic Attitude getAttitude()
public javax.media.j3d.BranchGroup getBranchGroup()
public Dimensions getDimensions()
public MetaOverlay getMetaOverlay(java.lang.String name)
throws java.lang.Exception
name - - the metaoverlay name
java.lang.Exception - - if the metaoverlay is not associated with this toypublic int getMetaOverlayCount()
public java.util.Enumeration getMetaOverlayNames()
public ModelTemplate getModelTemplate()
public java.lang.String getName()
public Position getPosition()
public java.lang.String toHTMLString()
RepresentationViewerpublic java.lang.String toString()
toString in class java.lang.ObjectSupport.toPrettyString(java.lang.String)public void update()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||