de.fhg.igd.earth.model.graph
Class Shape

java.lang.Object
  extended byde.fhg.igd.earth.model.graph.ProjectorObject
      extended byde.fhg.igd.earth.model.graph.ModelGraphObject
          extended byde.fhg.igd.earth.model.graph.Node
              extended byde.fhg.igd.earth.model.graph.Leaf
                  extended byde.fhg.igd.earth.model.graph.Shape
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
Polygon, Primitive, Text

public abstract class Shape
extends Leaf
implements Serializable, Cloneable

This class represents a shape. A shape has got a color, a style, a transparency, an image and a cullingMode. (HighLight is under construction) Title : Earth Copyright : Copyright (c) 2001 Organisation : IGD FhG

Version:
: 1.0
Author:
: Werner Beutel
See Also:
Serialized Form

Field Summary
private  Color color_
          the color of the shape
static int CULL_BACKFACE
          Cull mode: Backface
static int CULL_FRONTFACE
          Cull mode: Frontface
static int CULL_NONE
          Cull mode: None
private  int cullingMode_
           
private  boolean highLight_
          under construction
private  Color highLightColor_
          under construction
private  String image_
           
private  int style_
          the style of the shape (solid...)
static int STYLE_SOLID
          Style: Solid
static int STYLE_TEXTURE
          Style: Texture
static int STYLE_WIRE_FRAME
          Style: Wire Frame
private  float transparency_
          transparency: 0.0 (no transparence) -> 1.0 (100% transparent)
 
Fields inherited from class de.fhg.igd.earth.model.graph.Leaf
 
Fields inherited from class de.fhg.igd.earth.model.graph.Node
boundless_, collidable_, icon_, parent_, pickable_
 
Fields inherited from class de.fhg.igd.earth.model.graph.ModelGraphObject
CHANGE_AddChild, CHANGE_Anything, CHANGE_Appearance, CHANGE_Color, CHANGE_Create, CHANGE_Delete, CHANGE_Focus, CHANGE_HistoryGroup, CHANGE_InfoTable, CHANGE_Object, CHANGE_RemoveChild, CHANGE_Shape, CHANGE_Trace, CHANGE_Update, CHANGE_Visibility, changes_, infoTable_, mutable_, name_, subChanges_, SUBTYPE_BackGround, SUBTYPE_Box, SUBTYPE_BranchGroup, SUBTYPE_Cone, SUBTYPE_Cylinder, SUBTYPE_DetailGroup, SUBTYPE_DistanceDetailGroup, SUBTYPE_Group, SUBTYPE_HistoryGroup, SUBTYPE_LatchGroup, SUBTYPE_ModelGraph, SUBTYPE_Polygon, SUBTYPE_Primitive, SUBTYPE_Sphere, SUBTYPE_Text, SUBTYPE_TransformGroup, SUBTYPE_WireBoxGroup, timeStamp_, trace_, traceable_, TYPE_Group, TYPE_Leaf
 
Fields inherited from class de.fhg.igd.earth.model.graph.ProjectorObject
projectorObject_
 
Constructor Summary
Shape()
          Creates an instance of this class.
 
Method Summary
 Object clone()
          Clones this shape
 Color getColor()
          Returns the color
 int getCullingMode()
          Returns the culling mode
 boolean getHighLight()
          under construction
 Color getHighLightColor()
          under construction
 String getImage()
          Returns the image filename
 int getStyle()
          Returns the style
 float getTransparency()
          Returns the transparency
 boolean setColor(Color c)
          Sets the color (blocked by mutable).
 boolean setCullingMode(int c)
          Sets the culling mode (blocked by mutable).
 boolean setHighLight(boolean on)
          under construction
 boolean setHighLightColor(Color c)
          under construction
 boolean setImage(String i)
          Sets the image filename (blocked by mutable).
 boolean setStyle(int s)
          Sets the style (blocked by mutable).
 boolean setTransparency(float t)
          Sets the transparency (blocked by mutable).
 
Methods inherited from class de.fhg.igd.earth.model.graph.Leaf
createLeafList, createSubGroupList, createSubNodeList, detach, getVisible, searchDown, searchDown, searchDown, searchDown, searchDownInserter, searchDownInserter, setMutable, setVisible
 
Methods inherited from class de.fhg.igd.earth.model.graph.Node
broadcastCreation, broadcastResetChanges, calcBoundingBox, createParentGroupList, delete, delete, getBoundingBox, getBoundless, getBranchGroup, getCollidable, getGroup, getIcon, getLeafList, getModelGraph, getParent, getParentGroupList, getPickable, getSubGroupList, getSubNodeList, isFocused, move, move, moveTo, publishChanges, resetProjectorObject, searchUp, searchUp, searchUp, searchUp, setBoundless, setCollidable, setIcon, setParent, setPickable
 
Methods inherited from class de.fhg.igd.earth.model.graph.ModelGraphObject
anyChanges, anySubChanges, getChanges, getChanges, getInfoTable, getInfoTableElements, getInfoTableKeys, getInfoTableSize, getInfoTableValues, getMutable, getName, getSubChanges, getSubChanges, getSubType, getSubTypeName, getTimeStamp, getTrace, getTraceable, getType, putInfo, resetChanges, setChanges, setInfoTable, setName, setSubChanges, setTrace, VectorClone
 
Methods inherited from class de.fhg.igd.earth.model.graph.ProjectorObject
getProjectorObject, setProjectorObject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STYLE_WIRE_FRAME

public static final int STYLE_WIRE_FRAME
Style: Wire Frame

See Also:
Constant Field Values

STYLE_SOLID

public static final int STYLE_SOLID
Style: Solid

See Also:
Constant Field Values

STYLE_TEXTURE

public static final int STYLE_TEXTURE
Style: Texture

See Also:
Constant Field Values

CULL_NONE

public static final int CULL_NONE
Cull mode: None

See Also:
Constant Field Values

CULL_BACKFACE

public static final int CULL_BACKFACE
Cull mode: Backface

See Also:
Constant Field Values

CULL_FRONTFACE

public static final int CULL_FRONTFACE
Cull mode: Frontface

See Also:
Constant Field Values

color_

private Color color_
the color of the shape


highLightColor_

private Color highLightColor_
under construction


style_

private int style_
the style of the shape (solid...)


transparency_

private float transparency_
transparency: 0.0 (no transparence) -> 1.0 (100% transparent)


image_

private String image_

cullingMode_

private int cullingMode_

highLight_

private boolean highLight_
under construction

Constructor Detail

Shape

public Shape()
Creates an instance of this class. Color=white, style=STYLE_WIRE_FRAME, cullingMode=CULL_NONE, transparency=0 and image="".

Method Detail

setColor

public boolean setColor(Color c)
Sets the color (blocked by mutable). Released changes: CHANGE_UPDATE, CHANGE_APPEARANCE, CHANGE_COLOR

Specified by:
setColor in class Node
Parameters:
c - Color
Returns:
true on success

getColor

public Color getColor()
Returns the color

Returns:
Color

setHighLightColor

public boolean setHighLightColor(Color c)
under construction


getHighLightColor

public Color getHighLightColor()
under construction


setHighLight

public boolean setHighLight(boolean on)
under construction

Specified by:
setHighLight in class Node
Parameters:
on - The new HighLight flag
Returns:
true on success

getHighLight

public boolean getHighLight()
under construction


setStyle

public boolean setStyle(int s)
Sets the style (blocked by mutable). Released changes: CHANGE_UPDATE, CHANGE_APPEARANCE

Parameters:
s - Style
Returns:
true on success

getStyle

public int getStyle()
Returns the style

Returns:
Style

setTransparency

public boolean setTransparency(float t)
Sets the transparency (blocked by mutable). Released changes: CHANGE_UPDATE, CHANGE_APPEARANCE

Parameters:
t - Transparency
Returns:
true on success

getTransparency

public float getTransparency()
Returns the transparency

Returns:
Transparency

setImage

public boolean setImage(String i)
Sets the image filename (blocked by mutable). Released changes: CHANGE_UPDATE, CHANGE_APPEARANCE

Parameters:
i - image filename
Returns:
true on success

getImage

public String getImage()
Returns the image filename

Returns:
image filename

setCullingMode

public boolean setCullingMode(int c)
Sets the culling mode (blocked by mutable). Released changes: CHANGE_UPDATE, CHANGE_APPEARANCE

Parameters:
c - Culling mode
Returns:
true on success

getCullingMode

public int getCullingMode()
Returns the culling mode

Returns:
Culling mode

clone

public Object clone()
Clones this shape

Overrides:
clone in class Leaf


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.