Class SAINode
- All Implemented Interfaces:
X3DNode
- Direct Known Subclasses:
SAIAnchor
,SAIAppearance
,SAIAudioClip
,SAIBackground
,SAIBallJoint
,SAIBillboard
,SAIBooleanFilter
,SAIBooleanSequencer
,SAIBooleanToggle
,SAIBooleanTrigger
,SAIBox
,SAICADAssembly
,SAICADFace
,SAICADLayer
,SAICADPart
,SAICollidableOffset
,SAICollidableShape
,SAICollision
,SAICollisionCollection
,SAICollisionSensor
,SAICollisionSpace
,SAIColor
,SAIColorInterpolator
,SAIColorRGBA
,SAICone
,SAIContact
,SAICoordinate
,SAICoordinateInterpolator
,SAICoordinateInterpolator2D
,SAICylinder
,SAICylinderSensor
,SAIDirectionalLight
,SAIDISEntityManager
,SAIDISEntityTypeMapping
,SAIDoubleAxisHingeJoint
,SAIElevationGrid
,SAIEspduTransform
,SAIExplosionEmitter
,SAIExtrusion
,SAIFog
,SAIFogCoordinate
,SAIFontStyle
,SAIGeoCoordinate
,SAIGeoElevationGrid
,SAIGeoLocation
,SAIGeoLOD
,SAIGeoMetadata
,SAIGeoOrigin
,SAIGeoPositionInterpolator
,SAIGeoTouchSensor
,SAIGeoTransform
,SAIGeoViewpoint
,SAIGravityPhysicsModel
,SAIGroup
,SAIHAnimDisplacer
,SAIHAnimHumanoid
,SAIHAnimJoint
,SAIHAnimSegment
,SAIHAnimSite
,SAIImageTexture
,SAIIndexedFaceSet
,SAIIndexedLineSet
,SAIIndexedTriangleFanSet
,SAIIndexedTriangleSet
,SAIIndexedTriangleStripSet
,SAIInline
,SAIIntegerSequencer
,SAIIntegerTrigger
,SAIKeySensor
,SAILinePickSensor
,SAILineProperties
,SAILineSet
,SAILoadSensor
,SAILocalFog
,SAILOD
,SAIMaterial
,SAIMetadataDouble
,SAIMetadataFloat
,SAIMetadataInteger
,SAIMetadataSet
,SAIMetadataString
,SAIMotorJoint
,SAIMultiTexture
,SAIMultiTextureCoordinate
,SAIMultiTextureTransform
,SAINavigationInfo
,SAINormal
,SAINormalInterpolator
,SAIOrientationInterpolator
,SAIOrthoViewpoint
,SAIParticleSystem
,SAIPickableGroup
,SAIPixelTexture
,SAIPlaneSensor
,SAIPointEmitter
,SAIPointLight
,SAIPointPickSensor
,SAIPointSet
,SAIPolyline2D
,SAIPolylineEmitter
,SAIPolypoint2D
,SAIPositionInterpolator
,SAIPositionInterpolator2D
,SAIPrimitivePickSensor
,SAIProtoInstance
,SAIProximitySensor
,SAIQuadSet
,SAIRectangle2D
,SAIRigidBodyCollection
,SAIScalarInterpolator
,SAIScript
,SAIShape
,SAISingleAxisHingeJoint
,SAISliderJoint
,SAISound
,SAISphere
,SAISphereSensor
,SAISpotLight
,SAIStaticGroup
,SAIStringSensor
,SAISwitch
,SAIText
,SAITextureBackground
,SAITextureCoordinate
,SAITextureCoordinateGenerator
,SAITextureProperties
,SAITextureTransform
,SAITimeSensor
,SAITimeTrigger
,SAITouchSensor
,SAITransform
,SAITriangleFanSet
,SAITriangleSet
,SAITriangleSet2D
,SAITriangleStripSet
,SAITwoSidedMaterial
,SAIUniversalJoint
,SAIViewpoint
,SAIVisibilitySensor
,SAIVolumePickSensor
,SAIWindPhysicsModel
,SAIWorldInfo
- Version:
- 1.0
- Author:
- Brad Vender
-
Constructor Summary
ConstructorsConstructorDescriptionSAINode
(VRMLNodeType theRealNode, SAINodeFactory aNodeFactory, SAIFieldFactory aFieldFactory, ExternalEventQueue queue) Basic constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Dispose of this node's resources.boolean
Get a field for this node.Get the list of fields that this node contains.Get the metadata object associated with this node.Get the type of this node.int[]
Get the basic categorisation type(s) of this node.int
hashCode()
Returns a hash code value for the object.boolean
Check to see if this node has completed its setup either by being directly informed of it or through implicit measures (see the specification for details).void
realize()
Notify this node that its setup stage is now complete.void
setMetadata
(X3DMetadataObject node) Set the Metadata object that belongs to this node.
-
Constructor Details
-
SAINode
public SAINode(VRMLNodeType theRealNode, SAINodeFactory aNodeFactory, SAIFieldFactory aFieldFactory, ExternalEventQueue queue) Basic constructor.- Parameters:
theRealNode
- The original VRMLNodeType instanceaNodeFactory
- The SAINodeFactory instance to use for mapping between VRMLNodeType and vrml.eai.Node.aFieldFactory
- The SAIFieldFactory instance to use for making EventOut's and EventIn's.queue
- The event processing queue
-
-
Method Details
-
setMetadata
Set the Metadata object that belongs to this node. If the object instance is null, then it clears the currently set node instance.- Specified by:
setMetadata
in interfaceX3DNode
- Parameters:
node
- The new node instance to use
-
getMetadata
Get the metadata object associated with this node. If none is set, it will return null.- Specified by:
getMetadata
in interfaceX3DNode
- Returns:
- The metadata object instance or null
-
getFieldDefinitions
Description copied from interface:X3DNode
Get the list of fields that this node contains. This will return one definition for each field regardless of whether it is eventIn/Out, exposedField or field access type.- Specified by:
getFieldDefinitions
in interfaceX3DNode
- Returns:
- The definitions for all fields of this node
- Throws:
InvalidNodeException
- The node has had it's resources disposed of
-
getField
Description copied from interface:X3DNode
Get a field for this node.If the basic field required is an exposedField you can use either the standard name (such as translation) or you can use the set_ / _changed modifier (such as set_translation). If the field asked for is of field access type then an object is returned that cannot be read or written to. However, this allows the option for building editor type applications that may permit reading and writing of field access types when not running the VRML event model.
- Specified by:
getField
in interfaceX3DNode
- Parameters:
name
- The name of the field that is required- Returns:
- A reference to the field requested.
- Throws:
InvalidFieldException
- The named field does not exist for this node.InvalidNodeException
- The node has had it's resources disposed of
-
getNodeName
Description copied from interface:X3DNode
Get the type of this node. The string returned should be the name of the VRML node or the name of the proto instance this node represents.- Specified by:
getNodeName
in interfaceX3DNode
- Returns:
- The type of this node.
- Throws:
InvalidNodeException
- The node has had it's resources disposed of
-
getNodeType
Description copied from interface:X3DNode
Get the basic categorisation type(s) of this node. The types values are provided in the array of values. There is no specific order of the returned types. It is expected that most node types, which only descend from a single parent type would return an array of length 1. The returned value(s) should be the most derived type applicable for that node. For example, a Material node should return MaterialNodeType value, not AppearanceChildNodeType value.- Specified by:
getNodeType
in interfaceX3DNode
- Returns:
- The primary type(s) of this node
- Throws:
InvalidNodeException
- The node has had it's resources disposed of
-
equals
-
hashCode
-
dispose
Description copied from interface:X3DNode
Dispose of this node's resources. This is used to indicate to the browser that the java side of the application does not require the resources represented by this node. The browser is now free to do what it likes with the node.This in no way implies that the browser is to remove this node from the scene graph, only that the java code is no longer interested in this particular node through this reference.
Once this method has been called, any further calls to methods of this instance of the class is shall generate an InvalidNodeException.
- Specified by:
dispose
in interfaceX3DNode
- Throws:
InvalidNodeException
- The node is no longer valid and can't be disposed of again.- See Also:
-
isRealized
public boolean isRealized()Description copied from interface:X3DNode
Check to see if this node has completed its setup either by being directly informed of it or through implicit measures (see the specification for details).- Specified by:
isRealized
in interfaceX3DNode
- Returns:
- true if this node has completed the setup stage, false otherwise
-
realize
public void realize()Description copied from interface:X3DNode
Notify this node that its setup stage is now complete. This will cause all its fields to become non-writable, leaving only eventIns and exposedFields writable. A user is not required to call this method as it will be implicitly called immediately before this node is added to any other node. Any call after the first is ignored.
-