NAME

VRML::VRML2::Standard.pm - implements VRML 2.0/97 standard nodes


SYNOPSIS

    use VRML::VRML2::Standard;


DESCRIPTION

Following nodes are currently implemented.

[Grouping Nodes] [Special Groups] [Common Nodes]

[Geometry] [Geometric Properties] [Appearance]

[Sensors] [Interpolators] [Bindable Nodes]

Grouping Nodes

These nodes NEED End if the $children parameter is empty !

Anchor
Anchor($url, $description, $parameter, $bboxSize, $bboxCenter, $children)

Currently only the first part of $parameter is supported.

Billboard
Billboard($axisOfRotation, $children)

Collision
Collision($collide, $proxy, $children)

Group
Group($bboxSize, $bboxCenter)

Transform
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

Special Groups

Inline
Inline($url, $bboxSize, $bboxCenter)

LOD
LOD($range, $center)

$range is a MFFloat

$center is a SFVec3f

Example: LOD([1, 2, 5], '0 0 0')

Switch
Switch($whichChoice)

Common Nodes

DirectionalLight
DirectionalLight($direction, $intensity, $ambientIntensity, $color, $on)

PointLight
PointLight($location, $intensity, $ambientIntensity, $color, $on)

SpotLight
SpotLight($location, $direction, $intensity, $color, $on)

Sound
Sound($source, $location, $direction, $intensity, $maxFront, $maxBack, $minFront, $minBack, $priority, $spatialize)

AudioClip
AudioClip($url, $description, $loop, $pitch, $startTime, $stopTime)

WorldInfo
WorldInfo($title, $info)

Shape
Shape($geometry, $appearance)

Geometry

Box
Box($size)

Cone
Cone($radius, $height, $side, $bottom)

Cylinder
Cylinder($radius, $height, $top, $side, $bottom)

ElevationGrid
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
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
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
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
PointSet($coord, $color)

Sphere
Sphere($radius)

$radius have to be > 0

Text
Text($string, $fontStyle, $length, $maxExtent)

Geometric Properties

Coordinate
Coordinate(@point)

@point should be a list of points with strings like '1.0 0.0 0.0', '-1 2 0'

Color
Color(@color)

@color should be a list of colors with strings like '1.0 0.0 0.0', '.3 .2 .1'

Normal
Normal(@vector)

@vector should be a list of vectors with strings like '1.0 0.0 0.0', '.4 .2 0'

Appearance

Appearance
Appearance($material, $texture, $textureTransform)

Fontstyle
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
Material(%materials)

ImageTexture
ImageTexture($url)

MovieTexture
MovieTexture($url)

Sensors

CylinderSensor
CylinderSensor($maxAngle, $minAngle, $diskAngle, $offset, $autoOffset, $enabled)

PlaneSensor
PlaneSensor($maxPosition, $minPosition, $offset, $autoOffset, $enabled)

ProximitySensor
ProximitySensor($size, $center, $enabled)

SphereSensor
SphereSensor($offset, $autoOffset, $enabled)

TimeSensor
TimeSensor($cycleInterval, $loop, $startTime, $stopTime, $enabled)

TouchSensor
TouchSensor($enabled)

VisibilitySensor
VisibilitySensor($size, $center, $enabled)

Interpolators

ColorInterpolator
ColorInterpolator($key, $keyValue)

CoordinateInterpolator
CoordinateInterpolator($key, $keyValue)

OrientationInterpolator
OrientationInterpolator($key, $keyValue)

NormalInterpolator
NormalInterpolator($key, $keyValue)

PositionInterpolator
PositionInterpolator($key, $keyValue)

ScalarInterpolator
ScalarInterpolator($key, $keyValue)

$key MFFloat $keyValue MFFloat

Bindable Nodes

Background
Background($hash)

You only can use a hash. Parameter see VRML Spec

NavigationInfo
NavigationInfo($type, $speed, $headlight, $visibilityLimit, $avatarSize)

You can use a hash reference or all parameter in the same order above

Viewpoint
Viewpoint($description, $position, $orientation, $fieldOfView, $jump)

PROTO
PROTO($name, $declaration, $definition)

other

USE
USE($name)

DEF
DEF($name)

ROUTE
ROUTE($from, $to)

End
End($comment)

Close an open node with }

EndChildren
EndChildren($comment)

Close an open children part with ]

EndTransform
EndTransform($comment)

Close an open children part with ] and the node with }


SEE ALSO

VRML::VRML2::Standard

VRML::Base

http://www.gfz-potsdam.de/~palm/vrmlperl/ for a description of VRML-modules and how to obtain it.


BUGS

Compatibility with VRML1.pm is only given if you use IndexedFaceSet and IndexedLineSet with references


AUTHOR

Hartmut Palm <palm@gfz-potsdam.de>

Homepage http://www.gfz-potsdam.de/~palm/