harmonic.mz.data
Class ShapeNode

java.lang.Object
  |
  +--harmonic.mz.data.ModelNode
        |
        +--harmonic.mz.data.ShapeNode
All Implemented Interfaces:
java.awt.event.ActionListener, DataNode, Documentable, java.util.EventListener, Interpolater, harmonic.meshGeom.math.MarkableObject, NodeListener, harmonic.viewer3D.ShapeOwner, Transformable
Direct Known Subclasses:
BoundingBoxShape, BoundingRectShape, BoundingSphereShape, ClippingPlaneNode, DumbGeometryShape, EdgeFaceMapShape, EdgeIndexPainter, FaceCenterPointShape, FaceIndexPainter, FaceNormalArrowShape, FatArrowPainter, LightNode, LinkedGeometryShape, VertIndexShape, VertNormalArrowShape, VertValueShape, VoxelShape

public class ShapeNode
extends ModelNode
implements Transformable, harmonic.viewer3D.ShapeOwner

This is the database node for geometric objects. Geometries are added with addPainter(). PaintStructs are transfered from these nodes the viewer core.


Field Summary
static java.lang.String ANY_GEOM
          Any geometry type (matches all) for getGeom
static java.lang.String ARRAY_GEOM
          Any vertex array geometry for getGeom
static java.lang.String ATTRIBUTE_FIELD_TYPE
          The render attribute field type.
 boolean bAssignMaterialColors
          Set to false to stop validateAttributes() from assign material colors to object - it will only assign highlights then.
 boolean bAttribsValid
          A simple rendering attribute has changed
 boolean bBaseGeometryValid
          Geometry is not syncronized with fields if false
 boolean bSelectionValid
          Selection state changed
 boolean bTSelectionValid
          Tentative selection state changed
 boolean bVisibilityValid
          Visiblity state changed
 CoordSystemField coordSystem
          Coordinate system field, controls coordinate system of ShapeNode.
static java.lang.String COORDSYSTEM_FIELD_TYPE
           
 harmonic.viewer3D.PaintStructArray existingPainters
           
 harmonic.viewer3D.PaintStructArray fastPainters
           
static java.lang.String GEOMETRY_FIELD_TYPE
          The geometry field type.
static java.lang.String LINES_GEOM
          Lines type for getGeom
static boolean localKludge
           
 MaterialField material
           
 harmonic.viewer3D.PaintStructArray painters
           
static java.lang.String POINT_GEOM
          Point type for getGeom
static java.lang.String POLYGON_GEOM
          Polygon type for getGeom
static java.lang.String REGION_GEOM
          Region type for getGeom
static java.lang.String SOLID_GEOM
          Solid type for getGeom
static java.lang.String SURFACE_GEOM
          Surface type for getGeom
 ScalarField transparency
          Transparency field.
 BooleanField visibility
          Visibiliy field.
 
Fields inherited from class harmonic.mz.data.ModelNode
_fileRoot_, _thread_, ATTRIB_CONTROL_WIDGET, ATTRIB_LISTABLE, ATTRIB_PRESENTABLE, ATTRIB_PRIVATE, ATTRIB_REMOVEABLE, ATTRIB_RENAMEABLE, ATTRIB_SHOW_CONTEXT_MENU, ATTRIB_TYPE_FILTER, ATTRIB_USERGROUP, ATTRIB_VALUE_GROUP, ATTRIB_VE_LISTENER, bCustomCS, bDebug, bValid, name
 
Constructor Summary
ShapeNode()
          Construct a ShapeNode with an empty name.
ShapeNode(java.lang.String name)
          Construct a ShapeNode with givin name.
 
Method Summary
 harmonic.viewer3D.PaintStruct addFastGeometry(harmonic.meshGeom.geom.Geom geom)
          Calls addFastPainter()
 harmonic.viewer3D.PaintStruct addFastGeometry(harmonic.meshGeom.geom.Geom geom, harmonic.viewer3D.PaintAttrib ap)
          Calls addFastPainter()
 harmonic.viewer3D.PaintStruct addFastGeometry(harmonic.meshGeom.geom.Geom geom, harmonic.viewer3D.PaintAttrib ap, harmonic.meshGeom.math.TMat mat)
          Calls addFastPainter()
 harmonic.viewer3D.PaintStruct addFastGeometry(harmonic.meshGeom.geom.Geom geom, harmonic.viewer3D.PaintAttrib ap, harmonic.meshGeom.math.TMat mat, java.lang.String geomType)
          Calls addFastPainter()
 void addFastPainter(harmonic.viewer3D.PaintStruct p)
          Adds a "fast painter" to this ShapeNode.
 harmonic.viewer3D.PaintStruct addGeometry(harmonic.meshGeom.geom.Geom geom)
          Calls addPainter()
 harmonic.viewer3D.PaintStruct addGeometry(harmonic.meshGeom.geom.Geom geom, harmonic.viewer3D.PaintAttrib ap)
          Calls addPainter()
 harmonic.viewer3D.PaintStruct addGeometry(harmonic.meshGeom.geom.Geom geom, harmonic.viewer3D.PaintAttrib ap, harmonic.meshGeom.math.TMat mat)
          Calls addPainter()
 harmonic.viewer3D.PaintStruct addGeometry(harmonic.meshGeom.geom.Geom geom, harmonic.viewer3D.PaintAttrib ap, harmonic.meshGeom.math.TMat mat, java.lang.String geomType)
          Calls addPainter()
 void addNetworkOutput(ModelNode output)
          Supports network editor.
 void addPainter(harmonic.viewer3D.PaintStruct p)
          Adds renderable object to the ShapeNode
 void addWithUndo()
          Attach to database, after going through undo system.
 void beginTransform()
          Implements Transformable interface, with a no op.
 boolean bigValidation()
          This is a helper for expectedValidationTime() overrides.
 void calcGeometricProps()
           
 float calcSurfaceArea()
           
 float calcVolume()
           
 java.lang.String checkRequirements(int n)
           
 void clearFastGeometries()
          Remove all "fast painters" from this ShapeNode.
 void clearFastPainters()
          Remove all "fast painters" from this ShapeNode.
 void clearGeometries()
          Remove all painters from this ShapeNode, disposing any display lists
 void clearGeometryCache()
          Suports binary geometry caching
 void clearPainters()
          Remove all painters from this ShapeNode, disposing any display lists
 void defaultPickPriority()
          Reset pick priority to default value (the value is 1).
 void endTransform()
          Implements Transformable interface, with a no op.
 int expectedValidationTime()
          ShapeNode.expectedValidationTime() returns 10 ms if geometry is invalid, and shape is not marked transient.
 int fastPainterCount()
          Return number of fast painters
 void findPointSnaps(java.lang.String type, java.util.Vector s)
          Point snaps need to be searched for in shape def that is not a link Think names of get and find should be switched??
 java.util.Enumeration getCachedGeometries()
          Suports binary geometry caching
 harmonic.meshGeom.geom.Geom getCachedGeometry(java.lang.String key)
          Suports binary geometry caching
 int getChildRequirements(ShapeNode child)
           
 harmonic.viewer3D.CoordSystem getCoordSystem()
          Convinience for this.coordSystem.getCoordSystem()
 DataTransfer[] getDataTransfer(java.lang.String type)
          Return all data transfer nodes returnable for the type.
 java.lang.String[] getDataTransferTypes()
          Override to let users of node know what types of data this node represents.
 boolean getDragable()
          Returns draggable attribute.
 harmonic.meshGeom.geom.ArrayGeom getEdges(harmonic.viewer3D.PaintStruct p)
          Return the line representation for this geometry.
 harmonic.viewer3D.PaintStruct getFastPainter(int i)
          Return the fast painter at index.
 harmonic.viewer3D.PaintStruct[] getFastPainters()
          Returns all fast PaintStruct's
 boolean getFitable()
          Returns fittable attribute.
 harmonic.meshGeom.geom.ArrayGeom getGDIEdges(harmonic.viewer3D.PaintStruct p)
          Return geometry to be used for drawing XOR style
 harmonic.meshGeom.geom.Geom getGeom(java.lang.String type)
          Return first geometry to match type of null if none is found
 harmonic.meshGeom.geom.Geom getGeom(java.lang.String[] types)
          Return first geometry to match types of null if none is found
 harmonic.meshGeom.geom.Geom getGeomAt(int i)
          Return the geometry at i in the painter list
 harmonic.meshGeom.geom.Geom[] getGeoms()
           
 harmonic.meshGeom.geom.Geom[] getGeoms(java.lang.String type)
          Return a list of geometries matching the geomTypes.
 harmonic.meshGeom.geom.Geom[] getGeoms(java.lang.String[] types)
          Return a list of geometries matching the geomTypes.
 harmonic.meshGeom.math.TMat getGlobalPerLocal()
          Convience call through to coordSystem
 harmonic.meshGeom.geom.IndexedLineArrayGeom getILAEdges(harmonic.viewer3D.PaintStruct p)
          Return edges in IndexedLineArrayGeom form
 harmonic.viewer3D.CoordSystem getMoveableCoordSystem()
          Implements Transformable interface
 java.util.Vector getObjectChildren()
          Return a list of ShapeDefs that are part of NodeSetFields owned by this.
 harmonic.viewer3D.PaintStruct getPainter(int i)
          Return the painter at index.
 harmonic.viewer3D.PaintStruct getPainter(java.lang.String type)
          Return first geometry to match type of null if none is found
 harmonic.viewer3D.PaintStruct[] getPainters()
          Returns all PaintStruct's
 harmonic.viewer3D.PaintStruct[] getPainters(java.lang.String type)
          This works like getGeoms(), but it returns the PaintStructs of the Geoms
 harmonic.viewer3D.PaintStruct[] getPainters(java.lang.String[] types)
          This works like getGeoms(), but it returns the PaintStructs of the Geoms
 boolean getPaintOnTransient()
          Returns paint on transient setting.
 boolean getPickable()
          Returns pickable attributes.
 void getPointSnaps(java.lang.String type, java.util.Vector s)
          Override to return point snaps of the given type.
 int getRequirements()
           
 boolean getSerializeGeometry()
           
static ShapeNode getShapeDefOwner(ModelNode field)
          Return the owner of the field.
 Transformable getTransformable()
          Returns Transformable for this - which defaults to this
 java.awt.Image getTypeImage()
          Returns the image to be used for this node in list interfaces that may put an image by node
 boolean getViewpointDependantGeometry()
          Return setting controlling whether geometry is invalidate when viewpoint changes.
 boolean getVisibility(harmonic.viewer3D.Viewport view)
          Return whether this can paint in the given viewport.
 boolean hasFixedCS()
          Return whether coord system should be reparented as object is moved in tree
 boolean hasGeometryLock(harmonic.viewer3D.PaintStruct paintStruct)
          Implements ShapeOwner interface
 void hide()
          Calls setVisibility( false, null )
 void hide(harmonic.viewer3D.Viewport view)
          Calls setVisibility( false, view )
 void invalidate()
          Marks this node as invalid, and add to the invalid object list.
 void invalidateAttribs()
          Invalidate this ShapeNode at the attribute level.
 void invalidateCoordSystem()
          Invalidate coordinate system.
 void invalidateGeometry()
          Invalidate this ShapeNode at the geometry level.
 void invalidateGeometryDependants()
           
 boolean isAttribsValid()
          Returns attributes are valid state, which sais whether rendering attributes are currently following higher level data.
 boolean isGeomComposite()
          Return whether this is composed of other ShapeDefs
 boolean isGeometryValid()
          Returns geometry is valid state, which sais whether geometric objects are currently following higher level data.
 boolean isSelectionValid()
          Returns whether selection visual state current follows tentatives selection settings
 boolean isTentativeSelectionValid()
          Returns whether tentative selection visual state current follows tentatives selection settings
 boolean isVisibilityValid()
          Returns visbility is valid state, which sais whether visibility state is currently following higher level data.
 void makeContextMenu_ShapeFns(HWM_GroupData menu)
          Add functions functions pertaining to ShapesDefs
 void makeContextMenu(HWM_GroupData menu)
          Overrides version in ModelNode to add some functions pertaining to ShapesDefs
 void nodeChanged(NodeEvent event)
          This is overridden from ModelNode to mark what part of this shape is invalid, geometry or attributes.
 int painterCount()
          Return number of painters
 void processMouseDragged(harmonic.viewer3D.event.ViewportMouseEvent e, Selector selector)
          Called when mouse is dragged over this ShapeNode in viewport.
 void processMouseEntered(harmonic.viewer3D.event.ViewportMouseEvent e, Selector selector)
          Called when mouse is moved out of ShapeNode region in viewport.
 void processMouseExited(harmonic.viewer3D.event.ViewportMouseEvent e, Selector selector)
          Called when mouse is moved out of ShapeNode region in viewport.
 void processMouseMoved(harmonic.viewer3D.event.ViewportMouseEvent e, Selector selector)
          Called when mouse is moved over this ShapeNode in viewport.
 void processMousePressed(harmonic.viewer3D.event.ViewportMouseEvent e, Selector selector)
          Called when mouse is pressed over this ShapeNode in viewport.
 void processMouseReleased(harmonic.viewer3D.event.ViewportMouseEvent e, Selector selector)
          Called when mouse is released over this ShapeNode in viewport.
 void purge()
          Gets rid of geometries.
 void purgeFinal()
          This is overriden to clear painters in the event this this ShapeNode is not garbage collected.
 void removeFastPainter(harmonic.viewer3D.PaintStruct p)
          Remove a "fast painter" from this ShapeNode.
 void removePainter(harmonic.viewer3D.PaintStruct p)
          Remove PaintStruct from this ShapeNode, disposing any display lists
 void scaleCoordSystem(harmonic.meshGeom.math.TMat t, harmonic.meshGeom.math.Pnt3f gcsPoint)
          Implements Transformable interface, by transforming coord system returned by getMoveableCoordSystem().
 void selfNodeChanged(NodeEvent e)
          Overrides to listen to ADDED and REMOVED events
 void setDragable(boolean bDragable)
          Transfers setting to PaintStructs.
 void setExclusiveVisibility(boolean bShow, harmonic.viewer3D.Viewport view)
          Set the visibilitly state with respect to the givin view, so that this object will appear only in the given viewport if bShow is true, or in no viewports if false.
 void setFieldCoordSystems()
          Set coordinate system of direct children fields to this ShapeDefs coord system
 void setFitable(boolean bFitable)
          Sets fittable attributes, which controls whether object will be considered by viewport fitter.
 void setMoveableCoordSystem(harmonic.viewer3D.CoordSystem coordSystem)
          Set the reference returned by getMoveableCoordSystem()
 void setPaintOnTransient(boolean b)
          Controls whether paint structs should be drawn during gradual viewport transformations.
 void setPickable(boolean bPickable)
          Sets pickable attribute, which controls whether object will be considered by picker.
 void setPickPriority(int p)
          Set the priority to be used when objects that are picked are nearly equal along ray depth.
 void setSelect(boolean b, Selector selector)
          Overrides ModelNode.setSelect to change rendering state
 void setSerializeGeometry(boolean b)
           
 void setTempVisibility(boolean bShow)
          Sets a flag to enable the temporary hide/show of this object, without changing visibility field.
 void setTentativeSelect(boolean b, Selector selector)
          Overrides ModelNode.setTentativeSelect to change rendering state
 void setTransform(harmonic.meshGeom.math.TMat mat)
          Convinience for this.coordSystem.getCoordSystem().setParentPerLocal(mat);
 void setTransient(boolean b)
          Set whether or not this object is gradually changing.
 void setViewpointDependantGeometry(boolean b)
          Controls whether geometry is invalidate when viewpoint changes.
 void setVisibility(boolean bShow, harmonic.viewer3D.Viewport view)
          Set the visibilitly state with respect to the givin view.
 boolean shouldSpawnThread()
          Return whether database should spawn a thread to validate this ShapeNode
 void show()
          Calls setVisibility( true, null )
 void show(harmonic.viewer3D.Viewport view)
          Calls setVisibility( true, view )
 void transferAttributes()
          Transfers flags to all painters.
 void transferAttributes(harmonic.viewer3D.PaintStruct p)
          Transfers flags to painter.
 void transform(harmonic.meshGeom.math.TMat mat)
          Convinience for this.coordSystem.getCoordSystem().transformInParent(mat);
 void transformFields(harmonic.meshGeom.math.TMat mat)
          Transform by changing fields instead of coord system
 void translateCoordSystem(harmonic.meshGeom.math.TMat t)
          Implements Transformable interface, by transforming coord system returned by getMoveableCoordSystem().
 void validate()
          The default implementation of valdate for a ShapeNode looks at the invalidation flags for the shape def and calls the various validation functions.
 void validateAttribs()
          Base shape def knows no attributes, execpt transparency.
 void validateGeometry()
          Override to validate geometry.
 void validateSelection()
          This can be overridden to change the geometry of attributes in response to a tentative selection change, if the global selection preview setting is true.
 void validateTransform(harmonic.viewer3D.PaintStruct paintStruct, harmonic.viewer3D.Viewport vp)
          Implements ShapeOwner interface.
 
Methods inherited from class harmonic.mz.data.ModelNode
actionPerformed, addAll, addAlphaed, addField, addField, addField, addFields, addNetworkInput, addNode, addNodeListener, addNodeListener, addNodes, addNodes, addToCurrent, addToGlobals, addToNetworkEditor, addToTemps, allFieldsAreFinal, applyDataTransfer, areFieldsValid, assignFromMetaFields, assignFromXMLAttributes, assignFromXMLString, assignToMetaFields, assignToXMLAttributes, assignToXMLString, at, bind, canSelect, castSelection, checkFileRead, checkNetworkInput, childCount, clean, clearAttrib, clearNotified, compare, copyFrom, createControlWidget, createCopy, createXMLElement, deepCopy, defeatNodeEvents, disableEvents, enableEvents, fileRoot, finalize, findFieldElement, findNode, fromXMLNodes, getAttrib, getBound, getCatagory, getControlWidget, getCurrentNames, getDeleted, getDirectInputs, getDirectOutputs, getEffectors, getEntryListener, getErrorState, getFilterType, getFullName, getHandles, getInstanceURL, getInterpolater, getIsLeaf, getListable, getMark, getMetaFields, getName, getNodeChildren_V, getNodeChildren, getNodeID, getNodeParent, getObjectRep, getPresentable, getPrivate, getReferencePoolName, getRemoteOwner, getRemoveable, getRenameable, getSaveable, getSavedChildren, getSelect, getSeparateDirectInputs, getSeparateDirectOutputs, getSequenced, getSerialNo, getTags, getTentativeSelect, getTransformableParent, getTransient, getTreeName, getTypeURL, getUnfoldedChildren, getUpdateTime, getUserGroup, getValidates, getValue, getXMLNodes, hasDependants, hasExternalRef, hashKey, hasValidationLock, hideControlWidget, indexOf, initControlWidget, insertNode, interpolate_Linear, interpolate_Quadratic, isField, isFinal, isInSubtree, isInTree, isLinked, isNotified, isPurged, isSet, isTemporary, isValid, linkedTo, linksChildren, makeFixed, makePrototype, makeReferenced, makeUnreferenced, makeVisibleInGUI, markNotified, mayValidate, notifyListeners, postAssignFromXMLElement, preAssignToXMLElement, printChildren, printTags, printTree, printTree, pythonString, remove, removeAll, removeAll, removeHandles, removeNetworkInput, removeNetworkOutput, removeNode, removeNode, removeNode, removeNodeListener, replace, set, setActualName, setAttrib, setBound, setCatagory, setChildrenExcept, setCoordSystem, setCurrentControlWidget, setCurrentNames, setDeleted, setEntryListener, setErrorState, setFromPrototype, setIsField, setIsLeaf, setIsSet, setListable, setMark, setMetaFields, setName, setNodeParent, setPresentable, setPrivate, setRemoteOwner, setRemoveable, setRenameable, setSaveable, setSelect, setSequenced, setSerialNo, setTentativeSelect, setToLink, setTransientChildren, setUpdateTime, setUserGroup, setValidates, setValidationLock, setValue, setValueGroup, showControlWidget, showControlWidget, showControlWidget, showHandles, startRename, tag, toString, unlinkListeners, unmarkNotified, untag, updateBindable, valChanged, valChanged, valueString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

coordSystem

public CoordSystemField coordSystem
Coordinate system field, controls coordinate system of ShapeNode.


visibility

public BooleanField visibility
Visibiliy field. Controls whether the shape is show in viewport


transparency

public ScalarField transparency
Transparency field. Controls the transparency for all painters.


material

public MaterialField material

painters

public harmonic.viewer3D.PaintStructArray painters

fastPainters

public harmonic.viewer3D.PaintStructArray fastPainters

existingPainters

public harmonic.viewer3D.PaintStructArray existingPainters

bBaseGeometryValid

public boolean bBaseGeometryValid
Geometry is not syncronized with fields if false


bAttribsValid

public boolean bAttribsValid
A simple rendering attribute has changed


bVisibilityValid

public boolean bVisibilityValid
Visiblity state changed


bTSelectionValid

public boolean bTSelectionValid
Tentative selection state changed


bSelectionValid

public boolean bSelectionValid
Selection state changed


bAssignMaterialColors

public boolean bAssignMaterialColors
Set to false to stop validateAttributes() from assign material colors to object - it will only assign highlights then. The default is now false.


GEOMETRY_FIELD_TYPE

public static java.lang.String GEOMETRY_FIELD_TYPE
The geometry field type. A change of a field given this type will invalidate the geometry of ShapeNode. Follow this example to add additional types in sub class: nodeChanged(NodeEvent){ if(f.getCatagory().equals(GEOMETRTY_FIELD_TYPE))
invalidateGeometry();
else
invalidateAttribs();
}


ATTRIBUTE_FIELD_TYPE

public static java.lang.String ATTRIBUTE_FIELD_TYPE
The render attribute field type. A change of a field given this type will invalidate the attributes of ShapeNode


COORDSYSTEM_FIELD_TYPE

public static java.lang.String COORDSYSTEM_FIELD_TYPE

ANY_GEOM

public static final java.lang.String ANY_GEOM
Any geometry type (matches all) for getGeom

See Also:
Constant Field Values

ARRAY_GEOM

public static final java.lang.String ARRAY_GEOM
Any vertex array geometry for getGeom

See Also:
Constant Field Values

POLYGON_GEOM

public static final java.lang.String POLYGON_GEOM
Polygon type for getGeom

See Also:
Constant Field Values

SOLID_GEOM

public static final java.lang.String SOLID_GEOM
Solid type for getGeom

See Also:
Constant Field Values

REGION_GEOM

public static final java.lang.String REGION_GEOM
Region type for getGeom

See Also:
Constant Field Values

SURFACE_GEOM

public static final java.lang.String SURFACE_GEOM
Surface type for getGeom

See Also:
Constant Field Values

POINT_GEOM

public static final java.lang.String POINT_GEOM
Point type for getGeom

See Also:
Constant Field Values

LINES_GEOM

public static final java.lang.String LINES_GEOM
Lines type for getGeom

See Also:
Constant Field Values

localKludge

public static boolean localKludge
Constructor Detail

ShapeNode

public ShapeNode()
Construct a ShapeNode with an empty name.


ShapeNode

public ShapeNode(java.lang.String name)
Construct a ShapeNode with givin name. The fields coordSystem, visibility, and transparency are automatically added.

Parameters:
name - Name of this object
Method Detail

getTypeImage

public java.awt.Image getTypeImage()
Description copied from class: ModelNode
Returns the image to be used for this node in list interfaces that may put an image by node

Specified by:
getTypeImage in interface DataNode
Overrides:
getTypeImage in class ModelNode

addWithUndo

public void addWithUndo()
Attach to database, after going through undo system.

Overrides:
addWithUndo in class ModelNode

getCoordSystem

public harmonic.viewer3D.CoordSystem getCoordSystem()
Convinience for this.coordSystem.getCoordSystem()


transform

public void transform(harmonic.meshGeom.math.TMat mat)
Convinience for this.coordSystem.getCoordSystem().transformInParent(mat);


setTransform

public void setTransform(harmonic.meshGeom.math.TMat mat)
Convinience for this.coordSystem.getCoordSystem().setParentPerLocal(mat);


purgeFinal

public void purgeFinal()
This is overriden to clear painters in the event this this ShapeNode is not garbage collected. At least its painters and geometries will be. This also does the important job removing the coordinate system from its parent.

Specified by:
purgeFinal in interface DataNode
Overrides:
purgeFinal in class ModelNode

purge

public void purge()
Gets rid of geometries. This object is now in an invalid state, but will only be validated if its visibility is enabled.

Specified by:
purge in interface DataNode
Overrides:
purge in class ModelNode

getDataTransferTypes

public java.lang.String[] getDataTransferTypes()
Description copied from class: ModelNode
Override to let users of node know what types of data this node represents. The default returns an empty array.

Overrides:
getDataTransferTypes in class ModelNode

getDataTransfer

public DataTransfer[] getDataTransfer(java.lang.String type)
Description copied from class: ModelNode
Return all data transfer nodes returnable for the type. The default returns an empty array.

Overrides:
getDataTransfer in class ModelNode

getCachedGeometry

public harmonic.meshGeom.geom.Geom getCachedGeometry(java.lang.String key)
Suports binary geometry caching


getCachedGeometries

public java.util.Enumeration getCachedGeometries()
Suports binary geometry caching


clearGeometryCache

public void clearGeometryCache()
Suports binary geometry caching


addGeometry

public harmonic.viewer3D.PaintStruct addGeometry(harmonic.meshGeom.geom.Geom geom)
Calls addPainter()


addGeometry

public harmonic.viewer3D.PaintStruct addGeometry(harmonic.meshGeom.geom.Geom geom,
                                                 harmonic.viewer3D.PaintAttrib ap)
Calls addPainter()


addGeometry

public harmonic.viewer3D.PaintStruct addGeometry(harmonic.meshGeom.geom.Geom geom,
                                                 harmonic.viewer3D.PaintAttrib ap,
                                                 harmonic.meshGeom.math.TMat mat)
Calls addPainter()


addGeometry

public harmonic.viewer3D.PaintStruct addGeometry(harmonic.meshGeom.geom.Geom geom,
                                                 harmonic.viewer3D.PaintAttrib ap,
                                                 harmonic.meshGeom.math.TMat mat,
                                                 java.lang.String geomType)
Calls addPainter()


transferAttributes

public void transferAttributes()
Transfers flags to all painters. This should be called by validation functions if switches may have changed. It is called by the default ShapeNode validate() function.


transferAttributes

public void transferAttributes(harmonic.viewer3D.PaintStruct p)
Transfers flags to painter.


addPainter

public void addPainter(harmonic.viewer3D.PaintStruct p)
Adds renderable object to the ShapeNode


removePainter

public void removePainter(harmonic.viewer3D.PaintStruct p)
Remove PaintStruct from this ShapeNode, disposing any display lists


clearGeometries

public void clearGeometries()
Remove all painters from this ShapeNode, disposing any display lists


clearPainters

public void clearPainters()
Remove all painters from this ShapeNode, disposing any display lists


addFastGeometry

public harmonic.viewer3D.PaintStruct addFastGeometry(harmonic.meshGeom.geom.Geom geom)
Calls addFastPainter()


addFastGeometry

public harmonic.viewer3D.PaintStruct addFastGeometry(harmonic.meshGeom.geom.Geom geom,
                                                     harmonic.viewer3D.PaintAttrib ap)
Calls addFastPainter()


addFastGeometry

public harmonic.viewer3D.PaintStruct addFastGeometry(harmonic.meshGeom.geom.Geom geom,
                                                     harmonic.viewer3D.PaintAttrib ap,
                                                     harmonic.meshGeom.math.TMat mat)
Calls addFastPainter()


addFastGeometry

public harmonic.viewer3D.PaintStruct addFastGeometry(harmonic.meshGeom.geom.Geom geom,
                                                     harmonic.viewer3D.PaintAttrib ap,
                                                     harmonic.meshGeom.math.TMat mat,
                                                     java.lang.String geomType)
Calls addFastPainter()


addFastPainter

public void addFastPainter(harmonic.viewer3D.PaintStruct p)
Adds a "fast painter" to this ShapeNode. The fast painters are used when the user changs the viewpoint interactivly, or the individual object is changed interactively. Fast painters should have a geometry that is simpler than the full fledged geometry, preferably being some type of line outline.


removeFastPainter

public void removeFastPainter(harmonic.viewer3D.PaintStruct p)
Remove a "fast painter" from this ShapeNode.


clearFastGeometries

public void clearFastGeometries()
Remove all "fast painters" from this ShapeNode.


clearFastPainters

public void clearFastPainters()
Remove all "fast painters" from this ShapeNode.


getFastPainter

public harmonic.viewer3D.PaintStruct getFastPainter(int i)
Return the fast painter at index. The index is defined by the order of addition.


getPainter

public harmonic.viewer3D.PaintStruct getPainter(int i)
Return the painter at index. The index is defined by the order of addition.


painterCount

public int painterCount()
Return number of painters


fastPainterCount

public int fastPainterCount()
Return number of fast painters


getGeomAt

public harmonic.meshGeom.geom.Geom getGeomAt(int i)
Return the geometry at i in the painter list


getGeoms

public harmonic.meshGeom.geom.Geom[] getGeoms()

getGeoms

public harmonic.meshGeom.geom.Geom[] getGeoms(java.lang.String type)
Return a list of geometries matching the geomTypes. This provides as stable mechanism to get geometries from shapes for calculation purposes. The function may be overridden is needed, but the default should work if as shapes add painters they specify the geometry type.


getGeoms

public harmonic.meshGeom.geom.Geom[] getGeoms(java.lang.String[] types)
Return a list of geometries matching the geomTypes. This provides as stable mechanism to get geometries from shapes for calculation purposes. The function may be overridden is needed, but the default should work if as shapes add painters they specify the geometry type.


getGeom

public harmonic.meshGeom.geom.Geom getGeom(java.lang.String type)
Return first geometry to match type of null if none is found


getGeom

public harmonic.meshGeom.geom.Geom getGeom(java.lang.String[] types)
Return first geometry to match types of null if none is found


getPainter

public harmonic.viewer3D.PaintStruct getPainter(java.lang.String type)
Return first geometry to match type of null if none is found


getPainters

public harmonic.viewer3D.PaintStruct[] getPainters(java.lang.String type)
This works like getGeoms(), but it returns the PaintStructs of the Geoms


getPainters

public harmonic.viewer3D.PaintStruct[] getPainters(java.lang.String[] types)
This works like getGeoms(), but it returns the PaintStructs of the Geoms


getPainters

public harmonic.viewer3D.PaintStruct[] getPainters()
Returns all PaintStruct's


getFastPainters

public harmonic.viewer3D.PaintStruct[] getFastPainters()
Returns all fast PaintStruct's


getObjectChildren

public java.util.Vector getObjectChildren()
Return a list of ShapeDefs that are part of NodeSetFields owned by this. This hides the details of how the children are stored, making for stability.


getShapeDefOwner

public static ShapeNode getShapeDefOwner(ModelNode field)
Return the owner of the field. Goes up the tree untill it hits a ShapeNode and returns that.


setFitable

public void setFitable(boolean bFitable)
Sets fittable attributes, which controls whether object will be considered by viewport fitter. Transfers setting to PaintStructs.


getFitable

public boolean getFitable()
Returns fittable attribute.


setSerializeGeometry

public void setSerializeGeometry(boolean b)

getSerializeGeometry

public boolean getSerializeGeometry()

setPaintOnTransient

public void setPaintOnTransient(boolean b)
Controls whether paint structs should be drawn during gradual viewport transformations. Transfers setting to PaintStructs.


getPaintOnTransient

public boolean getPaintOnTransient()
Returns paint on transient setting.


setPickable

public void setPickable(boolean bPickable)
Sets pickable attribute, which controls whether object will be considered by picker. Transfers setting to PaintStructs.


getPickable

public boolean getPickable()
Returns pickable attributes.


setViewpointDependantGeometry

public void setViewpointDependantGeometry(boolean b)
Controls whether geometry is invalidate when viewpoint changes.


getViewpointDependantGeometry

public boolean getViewpointDependantGeometry()
Return setting controlling whether geometry is invalidate when viewpoint changes.


setDragable

public void setDragable(boolean bDragable)
Transfers setting to PaintStructs.


getDragable

public boolean getDragable()
Returns draggable attribute.


setPickPriority

public void setPickPriority(int p)
Set the priority to be used when objects that are picked are nearly equal along ray depth. A higher number means it will be favored for picking. Transfers setting to PaintStructs.


defaultPickPriority

public void defaultPickPriority()
Reset pick priority to default value (the value is 1).


invalidate

public void invalidate()
Description copied from class: ModelNode
Marks this node as invalid, and add to the invalid object list. This may be subclassed to cause a redraw.

Overrides:
invalidate in class ModelNode

invalidateGeometry

public void invalidateGeometry()
Invalidate this ShapeNode at the geometry level. This is usually the most costly invalidation. The geometry will be recaulculated when the database validates the scene


invalidateCoordSystem

public void invalidateCoordSystem()
Invalidate coordinate system. Call when ever coordinate system changes.


invalidateGeometryDependants

public void invalidateGeometryDependants()

isGeometryValid

public boolean isGeometryValid()
Returns geometry is valid state, which sais whether geometric objects are currently following higher level data.


isAttribsValid

public boolean isAttribsValid()
Returns attributes are valid state, which sais whether rendering attributes are currently following higher level data.


isVisibilityValid

public boolean isVisibilityValid()
Returns visbility is valid state, which sais whether visibility state is currently following higher level data.


isTentativeSelectionValid

public boolean isTentativeSelectionValid()
Returns whether tentative selection visual state current follows tentatives selection settings


isSelectionValid

public boolean isSelectionValid()
Returns whether selection visual state current follows tentatives selection settings


setTransient

public void setTransient(boolean b)
Description copied from class: ModelNode
Set whether or not this object is gradually changing. This effects a few things, such as how the viewport is updated and the avalibility of point snap to the object. Also, parent nodes will not be notified of changes to this if it is transient. Transientness is usually controled by the user interface that controls the node.

Overrides:
setTransient in class ModelNode

invalidateAttribs

public void invalidateAttribs()
Invalidate this ShapeNode at the attribute level. The attributes such as color will be reassigned during validation.


getTransformable

public Transformable getTransformable()
Returns Transformable for this - which defaults to this

Overrides:
getTransformable in class ModelNode

getMoveableCoordSystem

public harmonic.viewer3D.CoordSystem getMoveableCoordSystem()
Implements Transformable interface

Sp