ParallelGraphics  
Home  »  Developer Zone  »  Products  »  Cortona VRML Client for Mac OS X  »  VRML Extensions  »  SFVec2f Interpolator
SFVec2f Interpolator
Position2Interpolator

Scene size: 3.0KB
The Position2Interpolator node linearly interpolates among a list of 2D vectors. This node allows a dynamic transformation that is applied to texture coordinates without implementation of the Script node.

Node description
Position2Interpolator { 
 eventIn		SFFloat set_fraction
 exposedField	MFFloat key		[]
 exposedField	MFVec2f keyValue		[]
 eventOut		SFVec2f value_changed
}

All definitions of the fields are similar to the VRML97 definitions of the PositionInterpolator node.



Example
#VRML V2.0 utf8
NavigationInfo {
 type "EXAMINE"
}
Transform {
 rotation 1 1 1 1
 children [
  Shape {
   geometry Box {}
   appearance Appearance {
    texture ImageTexture {
     url "sky01.gif"
    }
    textureTransform
     DEF TT TextureTransform {}
   }
  }
 ]
}
DEF TIS TimeSensor {
 loop TRUE
 cycleInterval 5
}
DEF PI2 Position2Interpolator {
 key [0 1]
 keyValue [0 0, 1 1]
}
ROUTE TIS.fraction_changed
TO PI2.set_fraction
ROUTE PI2.value_changed
TO TT.translation

You can see this example in Cortona at top left corner of this page.





Last updated: Sun, 07 Sep 2008
© 2000-2008 ParallelGraphics. All rights reserved.