Layers
Layers are transparent rectangular areas on the screen in which VRML scenes are rendered. These areas always face the viewer.
Layer2D
EXTERNPROTO Layer2D [
eventIn MFNode addChildren
eventIn MFNode removeChildren
exposedField MFNode children
exposedField SFVec2f size
exposedField SFNode background
]
[
"urn:inet:parallelgraphics.com:cortona:Layer2D"
"http://www.parallelgraphics.com/vrml/proto/Cortona/extensions.wrl
#Layer2D"
]
The Layer2D node represents an area where 2D scene is rendered.
Its coordinate system's origin is positioned in the center of the rendering area, the x-axis is positive to the right and y-axis in positive upwards.
The width of the rendering area represents -1.0 to +1.0 on the x-axis. The extent of the y-axis in the positive and negative directions is determined by the aspect ratio of the rendering area so that the unit of distance is equal in both directions.
The children field may contain any 2D nodes. The addChildren and removeChildren fields are lists of 2D nodes to add and, respectively, remove from the layer.
The size parameter specifies width and height of layer rectangle in local coordinate system.
The background field specifies the Background of the current layer. It may only contain Background2D node.
Layer3D
EXTERNPROTO Layer3D [
eventIn MFNode addChildren
eventIn MFNode removeChildren
exposedField MFNode children
exposedField SFVec2f size
exposedField SFNode background
exposedField SFNode fog
exposedField SFNode navigationInfo
exposedField SFNode viewpoint
]
[
"urn:inet:parallelgraphics.com:cortona:Layer3D"
"http://www.parallelgraphics.com/vrml/proto/Cortona/extensions.wrl
#Layer3D"
]
The Layer3D node represents an area where 3D scene is rendered. Its coordinate system is the same as used in VRML scene.
The children field may contain any 3D nodes. The addChildren and removeChildren fields are lists of 3D nodes to add and, respectively, remove from the layer.
The size parameter specifies width and height of layer rectangle in local coordinate system.
The background field specifies the Background of the current layer. It may only contain Background node.
The fog field specifies the Fog node.
The navigationInfo field specifies the NavigationInfo node.
The viewpoint field specifies the Viewpoint node.
Example
2D Nodes
2D geometry nodes specify the planar type of geometry nodes. All 2D geometry nodes are used in the two-dimensional coordinate system. The origin and direction of x- and y-axes in the 2D coordinate system coincides with the origin and direction of x- and y-axes in the 3D coordinate system correspondingly. Z-component is set to null (z=0). As 2D geometry nodes come from geometry component they are defined in the geometry field of the Shape node. As all geometry nodes, 2D geometry nodes are affected by the Appearance node, which describes by the appearance properties (material and texture) that is applied to the geometry. Only emissivecolor and transparency of the Material properties are applied to 2D geometry, other properties have no effect.
2D geometry is mainly implemented (designed) for use in Layer2D nodes.
Circle
EXTERNPROTO Circle [
field SFFloat radius
]
[
"urn:inet:parallelgraphics.com:cortona:Circle"
"http://www.parallelgraphics.com/vrml/proto/Cortona/extensions.wrl#Circle"
]
The Circle node specifies a circle centred at (0,0) in the local 2D coordinate system. The radius field specifies the radius of the Circle. The value of radius should be greater than zero.
Rectangle
EXTERNPROTO Rectangle [
field SFVec2f size
]
[
"urn:inet:parallelgraphics.com:cortona:Rectangle"
"http://www.parallelgraphics.com/vrml/proto/Cortona/extensions.wrl#Rectangle"
]
The Rectangle node specifies a rectangle centred at (0, 0) in the current local 2D coordinate system and aligned with the local coordinate axes. The size field specifies the values of the rectangle's sides. Each component value should be greater than zero.
IndexedLineSet2D
EXTERNPROTO IndexedLineSet2D [
eventIn MFInt32 set_colorIndex
eventIn MFInt32 set_coordIndex
exposedField SFNode color
exposedField SFNode coord
field MFInt32 colorIndex
field SFBool colorPerVertex
field MFInt32 coordIndex
]
[
"urn:inet:parallelgraphics.com:cortona:IndexedLineSet2D"
"http://www.parallelgraphics.com/vrml/proto/Cortona/extensions.wrl#IndexedLineSet2D"
]
The IndexedLineSet2D represents a 2D shape consisting of 2D lines. The coord field contains the Coordinate2D node that specifies coordinates of the vertices, from which lines are formed. IndexedFaceSet2D is a 2D equivalent of the IndexedLineSet node.
IndexedFaceSet2D
EXTERNPROTO IndexedFaceSet2D [
eventIn MFInt32 set_colorIndex
eventIn MFInt32 set_coordIndex
eventIn MFInt32 set_texCoordIndex
exposedField SFNode color
exposedField SFNode coord
exposedField SFNode texCoord
field MFInt32 colorIndex
field SFBool colorPerVertex
field SFBool convex
field MFInt32 coordIndex
field MFInt32 texCoordIndex
]
[
"urn:inet:parallelgraphics.com:cortona:IndexedFaceSet2D"
"http://www.parallelgraphics.com/vrml/proto/Cortona/extensions.wrl#IndexedFaceSet2D"
]
The IndexedFaceSet2D represents a 2D shape consisting of 2D faces. The coord field contains the Coordinate2D node that specifies coordinates of the vertices from which faces are formed. IndexedFaceSet2D is a 2D equivalent of the IndexedFaceSet node.
PointSet2D
EXTERNPROTO PointSet2D [
exposedField SFNode color
exposedField SFNode coord
]
[
"urn:inet:parallelgraphics.com:cortona:PointSet2D"
"http://www.parallelgraphics.com/vrml/proto/Cortona/extensions.wrl#PointSet2D"
]
The PointSet2D node specifies a set of 2D points. The coord field contains the Coordinate2D node. The PointSet2D node is a 2D equivalent of the PointSet node.
Coordinate2D
EXTERNPROTO Coordinate2D [
exposedField MFVec2f point
]
[
"urn:inet:parallelgraphics.com:cortona:Coordinate2D"
"http://www.parallelgraphics.com/vrml/proto/Cortona/extensions.wrl#Coordinate2D"
]
The Coordinate2D node specifies a set of 2D coordinates, which is used in the coord field of PointSet2D, IndexedLineSet2D and IndexedFaceSet2D nodes.
CoordinateInterpolator2D
EXTERNPROTO CoordinateInterpolator2D [
eventIn SFFloat set_fraction
exposedField MFFloat key
exposedField MFVec2f keyValue
eventOut MFVec2f value_changed
]
[
"urn:inet:parallelgraphics.com:cortona:CoordinateInterpolator2D"
"http://www.parallelgraphics.com/vrml/proto/Cortona/extensions.wrl#CoordinateInterpolator2D"
]
The CoordinateInterpolator2D node is the 2D equivalent of the CoordinateInterpolator node.
Transform2D
EXTERNPROTO Transform2D [
eventIn MFNode addChildren
eventIn MFNode removeChildren
exposedField SFVec2f center
exposedField MFNode children
exposedField SFFloat rotationAngle
exposedField SFVec2f scale
exposedField SFFloat scaleOrientation
exposedField SFVec2f translation
]
[
"urn:inet:parallelgraphics.com:cortona:Transform2D"
"http://www.parallelgraphics.com/vrml/proto/Cortona/extensions.wrl#Transform2D"
]
The Transform2D node is a 2D equivalent of the Transform node. It is a grouping node that allows translation, rotation and scaling of its 2D children. The translation field specifies translation of the children objects. The rotationAngle field specifies rotation of the children objects. The centre of rotation is the point specified in the center field. The scale field specifies scaling of the children nodes. The scaleOrientation specifies a rotation of the coordinate system before the scale (to specify scales in arbitrary orientations). The scaleOrientation field applies only to the scale operation.
Background2D
EXTERNPROTO Background2D [
eventIn SFBool set_bind
exposedField SFColor backColor
exposedField MFString url
eventOut SFBool isBound
]
[
"urn:inet:parallelgraphics.com:cortona:Background2D"
"http://www.parallelgraphics.com/vrml/proto/Cortona/extensions.wrl#Background2D"
]
Background2D node is a 2D equivalent of the Background node. Background2D is used only in 2D context, such as Layer2D node.
backColor field specifies the color of the of the background. url field specifies an image which is applied to the 2D background.
As there is no background stack in the layer nodes, set_bind and isBound fields are ignored.
|