Lighthouse3d.com

uW(.JUMLO-O)ͭKLSW(L)ɰU7TWHL(3RRl bJP< Send me bugs and suggestions, please
VRML Script Tutorial
Full list

VRML Interactive Tutorial

Introduction
VRML File Structure
Drawing: Shape node
Geometry Nodes:
Box
Sphere
Cone
Cylinder
PointSet
IndexedLineSet
IndexedFaceSet
Extrusion
ElevationGrid
Example: Chessboard
Text
FontStyle
Appearance
Material
Textures
Image Texture
Movie Texture
Pixel Texture
Texture Coordinate
Texture Transform
Let there be Light
Directional Light
Point Light
Spot Light
Materials with Colored Lights
Hierarchical Node Structures
Group
Transform
Collision
Anchor
Billboard
Switch
Inlining Files
Defining and Instancing Nodes
Defining Levels of Detail
Events in VRML
Creating Paths between events: ROUTE
Generating Events based on Timers or User Actions
Timers
Touch Sensor
Visibility Sensor
Dragging Sensors
Plane Sensor
Sphere Sensor
Cylinder Sensor
Proximity Sensors
Example: Proximity sensor
Interpolators
Color
Coordinate
Normal
Orientation
Position
Scalar
Example
Let the Music Play
Sound
AudioClip
Bindable Nodes
Who Am I: NavigationInfo
Where Am I: ViewPoint
Adding Realism to the world
Background
Fog
Information about your world
WorldInfo
Definition for Auxiliary Nodes
Coordinate
Color
Normal

Z6y ];CƼ.YN%s*[Tlש-Ϭ "AcBёd<)Hu)n4ݛ0cյ~\׷B [튂OX(<~X1C]Kl:/e}ݝ8y6K9fԏu{jS[@O4t<^UմGiׯiZ¹[_Dk- Wf8{PF{F/*T  b ,n[tfQҖñA$xs1 y̧w2B1o5WzN{Ubߦ(avώ\C I5x)&gA{lJċ&cd12h@S=\7K(sRQ`EF@IN ~Ur]mohV(ƷyRL }|dJ!lvKO܁d,^M ’&^z!K0lɆB0I0;crUuq)gYЁTh+Qb$m%鬩,80Ds m2cc=3ϜG㠍E3u8! (IӗOxzVng_(uNIA.D7Q@x'b U'[\?I^{͵у28R~L|qXwSEN#zs;hf=g"^yKϷ@QT.EH?`nVv m?s! U٤0j-BH?6^Y",Ry0C)sg,k;WWļgQ`]F-E_߿o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es in the Y axis of its local coordinate system. See Dragging Sensors for more information on this type of sensors. This node allows you to limit the draggin operation between two angles. The offset field is relative to the X axis.

In addition to the fields which are common to all dragging sensors, this node has the following fields:

maxAngle which specifies the maximum rotation.

minAngle which specifies the minimum rotation.

diskAngle: I still haven't found how this field affects the behaviour of the node

Note: if maxAngle is smaller than minAngle, then the rotation is not limited.. By default the rotation is not limited.

Syntax:
PlaneSensor {
enabled TRUE
offset 0
autoOffset TRUE
maxAngle -1
minAngle 0
diskAngle 0.262
}


In addition to the exposed fields presented in the syntax the CylinderSensor node generates the following events (see Dragging Sensors for a description of their meaning):
  • isActive (boolean)
  • rotation_changed (3D vector plus an angle, the 3D vector is the Y axis of the local coordinate system)
  • trackPoint_changed (3D point)
  • The following example uses a CylinderSensor to rotate a Cone limited between 0 and 1.57 (+- 90 degrees).

    First one needs to create a group node which will include both the sensor and a Transform node containg a Cone geometry.

    Example:
    #VRML V2.0 utf8

    Group {
    children [
    DEF cs CylinderSensor {
    minAngle 0
    maxAngle 1.57
    }
    DEF tr Transform {
    children Shape {geometry Cylinder {}}
    }
    ]
    }


    Now we need to create a route between the eventOut rotation_changed from the CylinderSensor to the exposed field rotation of the Transform node. The route to achieve this is:

    ROUTE cs.rotation_changed TO tr.set_rotation

    Note: On the VRML example provided the axes are not inside the same group as the sensor.