Renderer
Class MetaOverlayPair

java.lang.Object
  |
  +--Renderer.MetaOverlayPair

public class MetaOverlayPair
extends java.lang.Object

Serves as a collection to join the two presentation forms of a MetaOverlay into a unit that can be manipulated as one. A single overlay cannot be rendered as both the frame and the fill of its defining Region. To do so would normally require one overlay for the frame and one for the fill, each using the same Region.

This class eliminates the need to add two MetaOverlays for each Region. It also allows the visibility of both to set with a single call.

Version:
Created 27 February 2003
Author:
Dan Tappan
See Also:
MetaOverlay, Region

Field Summary
private  MetaOverlay m_overlay_fill
           
private  MetaOverlay m_overlay_frame
           
 
Constructor Summary
MetaOverlayPair(int overlay_pair_type, boolean is_special, Toy toy)
          Creates a pair of MetaOverlays, one as the frame and the other as the fill of the given type.
MetaOverlayPair(java.lang.String name, Region region, javax.vecmath.Color3f color, boolean is_frame_otherwise_fill, boolean show_topology, Toy toy)
          Creates a pair of MetaOverlays, one as the frame and the other as the fill of the given Region.
 
Method Summary
 MetaOverlay getFill()
          Returns the fill component of a MetaOverlayPair.
 MetaOverlay getFrame()
          Returns the frame component of a MetaOverlayPair.
 boolean getVisible()
          Returns whether both components of the MetaOverlayPair are visible.
 void setVisible(boolean is_visible)
          Sets whether both components of the MetaOverlayPair are 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

m_overlay_frame

private MetaOverlay m_overlay_frame

m_overlay_fill

private MetaOverlay m_overlay_fill
Constructor Detail

MetaOverlayPair

public MetaOverlayPair(java.lang.String name,
                       Region region,
                       javax.vecmath.Color3f color,
                       boolean is_frame_otherwise_fill,
                       boolean show_topology,
                       Toy toy)
                throws java.lang.Exception
Creates a pair of MetaOverlays, one as the frame and the other as the fill of the given Region.

Parameters:
name - - the name of the overlay to create
region - - the region defining the bounds of the overlay
color - - the frame and fill color
is_frame_otherwise_fill - - whether the presentation is as a frame or a fill
show_topology - - whether the topology mesh should be displayed
toy - - the toy this overlay will be associated with
Throws:
java.lang.Exception - - if the overlay cannot be created

MetaOverlayPair

public MetaOverlayPair(int overlay_pair_type,
                       boolean is_special,
                       Toy toy)
                throws java.lang.Exception
Creates a pair of MetaOverlays, one as the frame and the other as the fill of the given type.

Parameters:
overlay_pair_type - - the special type of overlay (see below)
is_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
toy - - the toy this overlay will be associated with
Throws:
java.lang.Exception - - if the overlay cannot be created
See Also:
MetaOverlay.OVERLAY_PAIR_TYPE_PLANE_LATERAL, MetaOverlay.OVERLAY_PAIR_TYPE_PLANE_LONGITUDINAL, MetaOverlay.OVERLAY_PAIR_TYPE_PLANE_DIRECTIONAL, MetaOverlay.OVERLAY_PAIR_TYPE_SHELL
Method Detail

getFrame

public MetaOverlay getFrame()
Returns the frame component of a MetaOverlayPair. This is what encloses the fill component.

Returns:
the frame component

getFill

public MetaOverlay getFill()
Returns the fill component of a MetaOverlayPair. This is area enclosed within the frame component.

Returns:
the fill component

getVisible

public boolean getVisible()
Returns whether both components of the MetaOverlayPair are visible. Since both components are treated as a single overlay, there is no way here to determine whether just one is visible.

Returns:
the visibility

setVisible

public void setVisible(boolean is_visible)
Sets whether both components of the MetaOverlayPair are visible. Since both components are treated as a single overlay, there is no way here to set whether just one is visible.

Parameters:
is_visible - - the visibility

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
the String representation
See Also:
Support