VRML::VRML2::Standard.pm - implements VRML 2.0/97 standard nodes
use VRML::VRML2::Standard;
Following nodes are currently implemented.
[Grouping Nodes
]
[Special Groups
]
[Common Nodes
]
[Geometry
]
[Geometric Properties
]
[Appearance
]
[Sensors
]
[Interpolators
]
[Bindable Nodes
]
These nodes NEED End if the $children parameter is empty !
Anchor($url, $description, $parameter, $bboxSize, $bboxCenter, $children)
Currently only the first part of $parameter is supported.
Billboard($axisOfRotation, $children)
Collision($collide, $proxy, $children)
Group($bboxSize, $bboxCenter)
Transform($translation, $rotation, $scale, $scaleOrientation, $center, $bboxSize, $bboxCenter)
$translation is a SFVec3f
$rotation is a SFRotation
$scale is a SFVec3f
$scaleOrientation is a SFRotation
$center is a SFVec3f
Inline($url, $bboxSize, $bboxCenter)
LOD($range, $center)
$range is a MFFloat
$center is a SFVec3f
Example: LOD([1, 2, 5], '0 0 0')
Switch($whichChoice)
DirectionalLight($direction, $intensity, $ambientIntensity, $color, $on)
PointLight($location, $intensity, $ambientIntensity, $color, $on)
SpotLight($location, $direction, $intensity, $color, $on)
Sound($source, $location, $direction, $intensity, $maxFront, $maxBack, $minFront, $minBack, $priority, $spatialize)
AudioClip($url, $description, $loop, $pitch, $startTime, $stopTime)
WorldInfo($title, $info)
Shape($geometry, $appearance)
Box($size)
Cone($radius, $height, $side, $bottom)
Cylinder($radius, $height, $top, $side, $bottom)
ElevationGrid($xDimension, $zDimension, $xSpacing, $zSpacing, $height, $creaseAngle, $color, $colorPerVertex, $solid)
$height should be a reference of a list of height values
like ['0 1 3 2', '2 3 5 4', ...]
$color can be a reference to a subroutine or list of color values
Extrusion($crossSection, $spine, $scale, $orientation, $beginCap, $endCap, $creaseAngle, $solid, $convex, $ccw)
$crossSection must be a reference of a list of XY values
like [ '1 1', '1 -1', '-1 -1', '-1 1', '1 1' ]
$spine must be a reference of a list of spine values
like ['0 0 0', '0 1 0', ...]
IndexedFaceSet($coord, $coordIndex, $color, $colorIndex, $colorPerVertex, $normal, $normalIndex, $texCoord, $texCoordIndex)
$coordIndex can be a string with a list of point index
like '0 1 3 2', '2 3 5 4', ...
or a reference of list of point index
$coordIndex can be a string or a reference of a list of colors index
$normalIndex can be a string or a reference of a list of normals index
$texCoordIndex can be a string or a reference of a list of textures index
IndexedLineSet($coord, $coordIndex, $color, $colorIndex, $colorPerVertex)
$coord can be a string with the Coordinate
node or a reference to a
Coordinate
method
$coordIndex can be a string or a reference of a list of point index
like '0, 1, 3, 2', '2, 3, 5, 4', ...
$color can be a string with the <Color> node or a reference of a <Color> method
$colorIndex can be a string or a reference of a list of color index
PointSet($coord, $color)
Sphere($radius)
$radius have to be > 0
Text($string, $fontStyle, $length, $maxExtent)
Coordinate(@point)
@point should be a list of points with strings like '1.0 0.0 0.0', '-1 2 0'
Color(@color)
@color should be a list of colors with strings like '1.0 0.0 0.0', '.3 .2 .1'
Normal(@vector)
@vector should be a list of vectors with strings like '1.0 0.0 0.0', '.4 .2 0'
Appearance($material, $texture, $textureTransform)
FontStyle($size, $family, $style, $justify, $language)
defines the current font style for the current Text
Nodes
$style can be 'PLAIN','BOLD','ITALIC','BOLD ITALIC'
$familiy can be 'SERIF','SANS','TYPEWRITER'
$justify can be 'BEGIN', 'MIDDLE', 'END'
Material(%materials)
ImageTexture($url)
MovieTexture($url)
CylinderSensor($maxAngle, $minAngle, $diskAngle, $offset, $autoOffset, $enabled)
PlaneSensor($maxPosition, $minPosition, $offset, $autoOffset, $enabled)
ProximitySensor($size, $center, $enabled)
SphereSensor($offset, $autoOffset, $enabled)
TimeSensor($cycleInterval, $loop, $startTime, $stopTime, $enabled)
TouchSensor($enabled)
VisibilitySensor($size, $center, $enabled)
ColorInterpolator($key, $keyValue)
CoordinateInterpolator($key, $keyValue)
OrientationInterpolator($key, $keyValue)
NormalInterpolator($key, $keyValue)
PositionInterpolator($key, $keyValue)
ScalarInterpolator($key, $keyValue)
$key MFFloat $keyValue MFFloat
Background($hash)
You only can use a hash. Parameter see VRML Spec
NavigationInfo($type, $speed, $headlight, $visibilityLimit, $avatarSize)
You can use a hash reference or all parameter in the same order above
Viewpoint($description, $position, $orientation, $fieldOfView, $jump)
PROTO($name, $declaration, $definition)
USE($name)
DEF($name)
ROUTE($from, $to)
End($comment)
Close an open node with }
EndChildren($comment)
Close an open children part with ]
EndTransform($comment)
Close an open children part with ] and the node with }
VRML::VRML2::Standard
VRML::Base
http://www.gfz-potsdam.de/~palm/vrmlperl/ for a description of VRML-modules and how to obtain it.
Compatibility with VRML1.pm is only given if you use IndexedFaceSet
and IndexedLineSet
with references
Hartmut Palm <palm@gfz-potsdam.de>
Homepage http://www.gfz-potsdam.de/~palm/