|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--Renderer.MetaOverlay
Handles the myriad forms of graphical objects that can be associated with a Toy. A MetaOverlay is not technically part of a toy. Rather it is a graphical presentation of some part of the information that defines the toy. For example, a Region is a named zone somewhere around an object/toy. This information is important in reasoning and elsewhere but has no visual component. To help show how it contributes, it can be shown as a special object that does whatever its toy does (i.e., in attitude, position, and typically dimensions).
Many built-in overlays are available and can be enabled just by adding them to a toy:
Any combination of Regions can be added. It is also possible to treat other Java3D objects as metaoverlays.
MetaOverlayPair,
Region| Constructor Summary | |
MetaOverlay(int overlay_type,
boolean is_special)
Creates a new overlay of an axis, plane, or shell. |
|
MetaOverlay(int overlay_type,
boolean is_special,
Toy toy)
Creates a new overlay of an axis, plane, or shell. |
|
MetaOverlay(java.lang.String name,
javax.media.j3d.BranchGroup branch,
javax.media.j3d.Appearance appearance,
Toy toy)
Creates a new overlay based on an existing Java3D branch group. |
|
MetaOverlay(java.lang.String name,
Region region,
javax.vecmath.Color3f color,
boolean is_frame_otherwise_fill,
boolean show_topology,
Toy toy)
Creates a new overlay based on a Region. |
|
| Method Summary | |
private javax.media.j3d.BranchGroup |
createAxis(int axis,
boolean is_coned)
Creates an overlay of the axis of a geometric plane. |
private javax.media.j3d.BranchGroup |
createBranch(javax.media.j3d.BranchGroup branch,
javax.media.j3d.Appearance appearance)
Creates a Java3D branch group based on an existing branch group. |
private javax.media.j3d.BranchGroup |
createBranch(int overlay_type,
boolean is_special)
Creates a Java3D branch group based on an overlay type. |
private javax.media.j3d.BranchGroup |
createOverlay(javax.media.j3d.BranchGroup branch)
Creates an overlay based on an existing Java3D branch group. |
private javax.media.j3d.BranchGroup |
createPlane(int overlay_type)
Creates a single geometric plane, either framed or filled. |
private javax.media.j3d.BranchGroup |
createProjection(java.util.ArrayList polygon_list)
Builds a projection based on a list of polygons built with setCell. |
private javax.media.j3d.BranchGroup |
createRegion(Region region,
javax.vecmath.Color3f color,
boolean is_frame_otherwise_fill,
boolean show_topology)
Creates the graphical rendering that corresponds to the definition in a Region. |
private javax.media.j3d.BranchGroup |
createShell(int overlay_type,
boolean is_back_culled)
Creates the graphical rendering of a shell around the outside surface of a projection. |
java.lang.String |
getName()
Returns the name of this overlay. |
protected javax.media.j3d.Node |
getNode()
Returns the Java3D Node of this overlay. |
boolean |
getVisible()
Returns whether this overlay is visible. |
boolean |
isFrontOriented()
Gets the region orientation, which forces the first sector always to point toward either the front of the object this metaoverlay is associated with or toward north. |
private void |
setAppearance(javax.media.j3d.PolygonAttributes polygon_attributes,
javax.media.j3d.LineAttributes line_attributes,
javax.media.j3d.TransparencyAttributes transparency_attributes,
javax.media.j3d.ColoringAttributes coloring_attributes)
Sets the global appearance parameters for this overlay. |
private void |
setCell(java.util.ArrayList polygon_list,
float region_ring,
float region_sector,
float topology_elevation)
Adds one two-dimensional point to a list of polygons that will be rendered as a set of region cells. |
private void |
setCell(java.util.ArrayList polygon_list,
int region_ring,
int region_sector)
Adds one two-dimensional point to a list of polygons that will be rendered as a set of region cells. |
void |
setVisible(boolean is_visible)
Sets whether this overlay is visible. |
java.lang.String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int OVERLAY_TYPE_AXIS_LATERAL
public static final int OVERLAY_TYPE_AXIS_LONGITUDINAL
public static final int OVERLAY_TYPE_AXIS_DIRECTIONAL
public static final int OVERLAY_TYPE_PLANE_LATERAL_FRAME
public static final int OVERLAY_TYPE_PLANE_LATERAL_FILL
public static final int OVERLAY_TYPE_PLANE_LONGITUDINAL_FRAME
public static final int OVERLAY_TYPE_PLANE_LONGITUDINAL_FILL
public static final int OVERLAY_TYPE_PLANE_DIRECTIONAL_FRAME
public static final int OVERLAY_TYPE_PLANE_DIRECTIONAL_FILL
public static final int OVERLAY_TYPE_SHELL_FRAME
public static final int OVERLAY_TYPE_SHELL_FILL
public static final int OVERLAY_PAIR_TYPE_PLANE_LATERAL
public static final int OVERLAY_PAIR_TYPE_PLANE_LONGITUDINAL
public static final int OVERLAY_PAIR_TYPE_PLANE_DIRECTIONAL
public static final int OVERLAY_PAIR_TYPE_SHELL
private static final java.lang.String[] OVERLAY_NAMES
private final float REGION_TRANSPARENCY
private final boolean ANTIALIAS_ENABLED
private java.lang.String m_overlay_name
private javax.media.j3d.Node m_overlay_node
private javax.media.j3d.Appearance m_overlay_appearance
private final float BASE_Y
private final float CELL_SUBDIVISION_OFFSET
private final float TOPOLOGY_HEIGHT_FACTOR
private final float TOY_EXTENT_FACTOR
private float m_region_horizon
private float m_bounding_cylinder
private Region m_region
| Constructor Detail |
public MetaOverlay(java.lang.String name,
Region region,
javax.vecmath.Color3f color,
boolean is_frame_otherwise_fill,
boolean show_topology,
Toy toy)
throws java.lang.Exception
name - - the name of the overlayregion - - the region defining the overlaycolor - - the color of the overlayis_frame_otherwise_fill - - whether the rendering is a frame or fillshow_topology - - whether the topology mesh should be displayedtoy - - the toy this overlay is associated with
java.lang.Exception - - if the overlay cannot be createdcreateRegion(Geometry.Region, javax.vecmath.Color3f, boolean, boolean)
public MetaOverlay(int overlay_type,
boolean is_special)
throws java.lang.Exception
overlay_type - - the overlay typeis_special - - for overlay_type=OVERLAY_PAIR_TYPE_SHELL, whether the shell will be back-culled;
for overlay_type=OVERLAY_PAIR_TYPE_PLANE_?, whether the axes will have cones; otherwise
this is ignored
java.lang.Exception - - if the overlay cannot be createdcreateBranch(javax.media.j3d.BranchGroup, javax.media.j3d.Appearance),
OVERLAY_TYPE_AXIS_LATERAL,
OVERLAY_TYPE_AXIS_DIRECTIONAL,
OVERLAY_TYPE_AXIS_LONGITUDINAL,
OVERLAY_TYPE_PLANE_LONGITUDINAL_FRAME,
OVERLAY_TYPE_PLANE_LONGITUDINAL_FILL,
OVERLAY_TYPE_PLANE_DIRECTIONAL_FRAME,
OVERLAY_TYPE_PLANE_DIRECTIONAL_FILL,
OVERLAY_TYPE_PLANE_LATERAL_FRAME,
OVERLAY_TYPE_PLANE_LATERAL_FILL,
OVERLAY_TYPE_SHELL_FRAME,
OVERLAY_TYPE_SHELL_FILL
public MetaOverlay(int overlay_type,
boolean is_special,
Toy toy)
throws java.lang.Exception
overlay_type - - the overlay typeis_special - - for overlay_type=OVERLAY_PAIR_TYPE_SHELL, whether the shell will be back-culled;
for overlay_type=OVERLAY_PAIR_TYPE_PLANE_?, whether the axes will have cones; otherwise
this is ignoredtoy - - the toy this overlay is associated with
java.lang.Exception - - if the overlay cannot be createdcreateBranch(javax.media.j3d.BranchGroup, javax.media.j3d.Appearance),
OVERLAY_TYPE_AXIS_LATERAL,
OVERLAY_TYPE_AXIS_DIRECTIONAL,
OVERLAY_TYPE_AXIS_LONGITUDINAL,
OVERLAY_TYPE_PLANE_LONGITUDINAL_FRAME,
OVERLAY_TYPE_PLANE_LONGITUDINAL_FILL,
OVERLAY_TYPE_PLANE_DIRECTIONAL_FRAME,
OVERLAY_TYPE_PLANE_DIRECTIONAL_FILL,
OVERLAY_TYPE_PLANE_LATERAL_FRAME,
OVERLAY_TYPE_PLANE_LATERAL_FILL,
OVERLAY_TYPE_SHELL_FRAME,
OVERLAY_TYPE_SHELL_FILL
public MetaOverlay(java.lang.String name,
javax.media.j3d.BranchGroup branch,
javax.media.j3d.Appearance appearance,
Toy toy)
throws java.lang.Exception
name - - the name of the overlaybranch - - the branch groupappearance - - the appearance of the branch grouptoy - - the toy this overlay is associated with
java.lang.Exception - - if the overlay cannot be createdcreateBranch(javax.media.j3d.BranchGroup, javax.media.j3d.Appearance)| Method Detail |
private javax.media.j3d.BranchGroup createAxis(int axis,
boolean is_coned)
throws java.lang.Exception
axis - - the axisis_coned - - whether a directional cone should be rendered at the tip
java.lang.Exception - - if the axis is invalidOVERLAY_TYPE_AXIS_LATERAL,
OVERLAY_TYPE_AXIS_DIRECTIONAL,
OVERLAY_TYPE_AXIS_LONGITUDINAL
private javax.media.j3d.BranchGroup createBranch(javax.media.j3d.BranchGroup branch,
javax.media.j3d.Appearance appearance)
branch - - the branch groupappearance - - the appearance of the branch group
private javax.media.j3d.BranchGroup createBranch(int overlay_type,
boolean is_special)
throws java.lang.Exception
overlay_type - - the overlay typeis_special - - for overlay_type=OVERLAY_PAIR_TYPE_SHELL, whether the shell will be back-culled;
for overlay_type=OVERLAY_PAIR_TYPE_PLANE_?, whether the axes will have cones; otherwise
this is ignored
java.lang.Exception - - if the overlay type is invalidOVERLAY_TYPE_AXIS_LATERAL,
OVERLAY_TYPE_AXIS_DIRECTIONAL,
OVERLAY_TYPE_AXIS_LONGITUDINAL,
OVERLAY_TYPE_PLANE_LONGITUDINAL_FRAME,
OVERLAY_TYPE_PLANE_LONGITUDINAL_FILL,
OVERLAY_TYPE_PLANE_DIRECTIONAL_FRAME,
OVERLAY_TYPE_PLANE_DIRECTIONAL_FILL,
OVERLAY_TYPE_PLANE_LATERAL_FRAME,
OVERLAY_TYPE_PLANE_LATERAL_FILL,
OVERLAY_TYPE_SHELL_FRAME,
OVERLAY_TYPE_SHELL_FILLprivate javax.media.j3d.BranchGroup createOverlay(javax.media.j3d.BranchGroup branch)
This feature is not currently in use and may not be up to date.
private javax.media.j3d.BranchGroup createPlane(int overlay_type)
throws java.lang.Exception
overlay_type - - the overlay type
java.lang.Exception - - if the overlay type is invalidOVERLAY_TYPE_PLANE_LONGITUDINAL_FRAME,
OVERLAY_TYPE_PLANE_LONGITUDINAL_FILL,
OVERLAY_TYPE_PLANE_DIRECTIONAL_FRAME,
OVERLAY_TYPE_PLANE_DIRECTIONAL_FILL,
OVERLAY_TYPE_PLANE_LATERAL_FRAME,
OVERLAY_TYPE_PLANE_LATERAL_FILL
private javax.media.j3d.BranchGroup createRegion(Region region,
javax.vecmath.Color3f color,
boolean is_frame_otherwise_fill,
boolean show_topology)
throws java.lang.Exception
region - - the regioncolor - - the color of the regionis_frame_otherwise_fill - - whether the rendering is a frame or fill
java.lang.Exception - - if creation fails
private javax.media.j3d.BranchGroup createShell(int overlay_type,
boolean is_back_culled)
throws java.lang.Exception
overlay_type - - the overlay typeis_back_culled - - whether the back face of the shell is hidden
java.lang.Exception - - if the overlay type is invalidOVERLAY_TYPE_SHELL_FRAME,
OVERLAY_TYPE_SHELL_FILL
private javax.media.j3d.BranchGroup createProjection(java.util.ArrayList polygon_list)
throws java.lang.Exception
polygon_list - - the polygon list of Point3f objects
java.lang.Exception - - if creation failssetCell(java.util.ArrayList, int, int)public java.lang.String getName()
protected javax.media.j3d.Node getNode()
public boolean getVisible()
public boolean isFrontOriented()
private void setAppearance(javax.media.j3d.PolygonAttributes polygon_attributes,
javax.media.j3d.LineAttributes line_attributes,
javax.media.j3d.TransparencyAttributes transparency_attributes,
javax.media.j3d.ColoringAttributes coloring_attributes)
polygon_attributes - - the polygon attributesline_attributes - - the line attributestransparency_attributes - - the transparency attributescoloring_attributes - - the coloring attributes
private void setCell(java.util.ArrayList polygon_list,
int region_ring,
int region_sector)
polygon_list - - the polygons composed of cells built through calls here. This is an in/out parameterregion_ring - - the ring of the cell to addregion_sector - - the sector of the cell to add
private void setCell(java.util.ArrayList polygon_list,
float region_ring,
float region_sector,
float topology_elevation)
polygon_list - - the polygons composed of cells built through calls here. This is an in/out parametertopology_elevation - - the topology elevationpublic void setVisible(boolean is_visible)
is_visible - - the visibilitypublic java.lang.String toString()
toString in class java.lang.ObjectSupport.toPrettyString(java.lang.String)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||