Xj3D 2.0 VRML/X3D Code API

org.web3d.x3d.sai
Interface X3DNode

All Known Subinterfaces:
Anchor, Appearance, AudioClip, Background, BallJoint, Billboard, BooleanFilter, BooleanSequencer, BooleanToggle, BooleanTrigger, Box, CADAssembly, CADFace, CADLayer, CADPart, CollidableOffset, CollidableShape, Collision, CollisionCollection, CollisionSensor, CollisionSpace, Color, ColorInterpolator, ColorRGBA, Cone, Contact, Coordinate, CoordinateInterpolator, CoordinateInterpolator2D, CustomViewport, Cylinder, CylinderSensor, DirectionalLight, DISEntityManager, DISEntityTypeMapping, DoubleAxisHingeJoint, ElevationGrid, EspduTransform, ExplosionEmitter, Extrusion, FixedViewport, Fog, FogCoordinate, FontStyle, GeoCoordinate, GeoElevationGrid, GeoLocation, GeoLOD, GeoMetadata, GeoOrigin, GeoPositionInterpolator, GeoTouchSensor, GeoViewpoint, GravityPhysicsModel, Group, HAnimDisplacer, HAnimHumanoid, HAnimJoint, HAnimSegment, HAnimSite, ImageTexture, IndexedFaceSet, IndexedLineSet, IndexedTriangleFanSet, IndexedTriangleSet, IndexedTriangleStripSet, Inline, IntegerSequencer, IntegerTrigger, KeySensor, Layer, LayerSet, LinePicker, LineProperties, LineSet, LoadSensor, LocalFog, LOD, Material, MetadataDouble, MetadataFloat, MetadataInteger, MetadataSet, MetadataString, MotorJoint, MovieTexture, MultiTexture, MultiTextureCoordinate, MultiTextureTransform, NavigationInfo, Normal, NormalInterpolator, OrientationInterpolator, OrthoViewpoint, ParticleSystem, PickableGroup, PixelTexture, PlaneSensor, PointEmitter, PointLight, PointPicker, PointSet, Polyline2D, PolylineEmitter, Polypoint2D, PositionInterpolator, PositionInterpolator2D, PrimitivePicker, ProportionalViewport, ProximitySensor, QuadSet, Rectangle2D, RigidBodyCollection, ScalarInterpolator, Script, Shape, SingleAxisHingeJoint, SliderJoint, Sound, Sphere, SphereSensor, SpotLight, StaticGroup, StringSensor, Switch, Text, TextureBackground, TextureCoordinate, TextureCoordinate3D, TextureCoordinateGenerator, TextureProperties, TextureTransform, TextureTransform3D, TimeSensor, TimeTrigger, TouchSensor, Transform, TriangleFanSet, TriangleSet, TriangleSet2D, TriangleStripSet, TwoSidedMaterial, UniversalJoint, Viewpoint, VisibilitySensor, VolumePicker, WindPhysicsModel, WorldInfo, X3DAppearanceChildNode, X3DAppearanceNode, X3DBackgroundNode, X3DBindableNode, X3DChildNode, X3DColorNode, X3DComposedGeometryNode, X3DCoordinateNode, X3DDragSensorNode, X3DEnvironmentalSensorNode, X3DFontStyleNode, X3DGeometricPropertyNode, X3DGeometryNode, X3DGroupingNode, X3DInfoNode, X3DInterpolatorNode, X3DKeyDeviceSensorNode, X3DLayerNode, X3DLightNode, X3DMaterialNode, X3DNBodyCollidableNode, X3DNBodyCollisionSpaceNode, X3DNetworkSensorNode, X3DNormalNode, X3DParametricGeometryNode, X3DParticleEmitterNode, X3DParticlePhysicsModelNode, X3DPickingNode, X3DPointingDeviceSensorNode, X3DProductStructureChildNode, X3DProtoInstance, X3DRigidJointNode, X3DScriptNode, X3DSensorNode, X3DSequencerNode, X3DShapeNode, X3DSoundNode, X3DSoundSourceNode, X3DTexture2DNode, X3DTextureCoordinateNode, X3DTextureNode, X3DTextureTransform2DNode, X3DTextureTransformNode, X3DTimeDependentNode, X3DTouchSensorNode, X3DTriggerNode, X3DViewpointNode, X3DViewportNode
All Known Implementing Classes:
BaseNode, SAINode, SAIProtoInstance

public interface X3DNode

The base representation of any VRML node in the system whether built in or a proto.

Version:
$Revision: 1.6 $
Author:
Justin Couch

Method Summary
 void dispose()
          Dispose of this node's resources.
 X3DField getField(java.lang.String name)
          Get a field for this node.
 X3DFieldDefinition[] getFieldDefinitions()
          Get the list of fields that this node contains.
 X3DMetadataObject getMetadata()
          Get the metadata object associated with this node.
 java.lang.String getNodeName()
          Get the type of this node.
 int[] getNodeType()
          Get the basic categorisation type(s) of this node.
 boolean isRealized()
          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.
 

Method Detail

setMetadata

void setMetadata(X3DMetadataObject node)
Set the Metadata object that belongs to this node. If the object instance is null, then it clears the currently set node instance.

Parameters:
node - The new node instance to use

getMetadata

X3DMetadataObject getMetadata()
Get the metadata object associated with this node. If none is set, it will return null.

Returns:
The metadata object instance or null

getNodeName

java.lang.String getNodeName()
                             throws InvalidNodeException
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.

Returns:
The type of this node.
Throws:
InvalidNodeException - The node has had it's resources disposed of

getFieldDefinitions

X3DFieldDefinition[] getFieldDefinitions()
                                         throws InvalidNodeException
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.

Returns:
The definitions for all fields of this node
Throws:
InvalidNodeException - The node has had it's resources disposed of

realize

void realize()
             throws InvalidNodeException
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 this node is added to any other node. Any call after the first is ignored.

Throws:
InvalidNodeException - The node has had it's resources disposed of

isRealized

boolean isRealized()
                   throws InvalidNodeException
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).

Returns:
true if this node has completed the setup stage, false otherwise
Throws:
InvalidNodeException - The node has had it's resources disposed of

getNodeType

int[] getNodeType()
                  throws InvalidNodeException
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.

Returns:
The primary type(s) of this node
Throws:
InvalidNodeException - The node has had it's resources disposed of

getField

X3DField getField(java.lang.String name)
                  throws InvalidFieldException,
                         InvalidNodeException
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.

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

dispose

void dispose()
             throws InvalidNodeException
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.

Throws:
InvalidNodeException - The node is no longer valid and can't be disposed of again.

Xj3D 2.0 VRML/X3D Code API

Copyright © 2001 - 2006 Web3D Consortium