www.pudn.com > vrmlExample.rar > BLUR2.WRL


#VRML V2.0 utf8 
 
Viewpoint 
{ 
	position 0 0 15 
	orientation 0 0 1 0 
	fieldOfView 0.8 
} 
 
Background 
{ 
	skyColor		 
			[	0 	0 	0.2, 
				0.1 	0.1 	0.8, 
				0.7 	0.8 	0.9 
			] 
 
	skyAngle 	[1 	1.57] 
	groundColor 	 
			[	0.0 	0.0 	0.0, 
				0.5 	0.4 	0.3, 
				0.3 	0.3 	0.3 
			] 
	groundAngle 	[1	1.57] 
} 
 
DEF box0 Transform 
{ 
	children 
	[ 
		Shape 
		{ 
			appearance Appearance 
			{ 
				material DEF Co Material 
				{  
					diffuseColor 1,0,0 
					emissiveColor 0.0 0.0 0.0 
					shininess 0.2 
					specularColor 0.0 0.0 0.0 
					transparency 0.0 
				} 
				texture NULL 
				textureTransform NULL 
			} 
			geometry Box 
			{ 
				size 1 3 1.5		 
			} 
		} 
	] 
} 
 
DEF box1 Transform 
{ 
	children 
	[ 
		Shape 
		{ 
			appearance Appearance 
			{ 
				material DEF Co1 Material 
				{  
					diffuseColor 1,0,0 
					emissiveColor 0.0 0.0 0.0 
					shininess 0.2 
					specularColor 0.0 0.0 0.0 
					transparency 0.5 
				} 
				texture NULL 
				textureTransform NULL 
			} 
			geometry Box 
			{ 
				size 1 3 1.5		 
			} 
		} 
	] 
} 
 
DEF box2 Transform 
{ 
	children 
	[ 
		Shape 
		{ 
			appearance Appearance 
			{ 
				material DEF Co2 Material 
				{  
					diffuseColor 1,0,0 
					emissiveColor 0.0 0.0 0.0 
					shininess 0.2 
					specularColor 0.0 0.0 0.0 
					transparency 0.8 
				} 
				texture NULL 
				textureTransform NULL 
			} 
			geometry Box 
			{ 
				size 1 3 1.5		 
			} 
		} 
	] 
} 
 
DEF Time TimeSensor 
{  
	cycleInterval 10  
	loop TRUE 
} 
 
DEF Time2 TimeSensor 
{  
	cycleInterval 0.05 
	loop TRUE 
} 
 
 
DEF position PositionInterpolator 
{ 
	key [0 0.4 0.6 1] 
	keyValue  [	-10 0 0, 
				-6 0 0, 
				6 0 0, 
			10 0 0 
		] 
} 
 
 
DEF Orientation OrientationInterpolator 
		{ 
			 key 
				[ 
				    0.00, 
				    0.20, 
				    0.40, 
				    0.60, 
				    0.80, 
				    1.00, 
			        ] 
			keyValue[ 
					0.0 1.0 0.0  0.0, 
					1.0 0.0 1.0  3.14,			 
					0.0 1.0 0.0  6.28,	 
					1.0 1.0 0.0  0.0,	 
					0.0 0.0 1.0  3.14, 
					1.0 1.0 0.0  6.28, 
				 ] 
	     	} 
DEF getstatue Script 
{ 
	url "blur2.class" 
	eventIn  SFTime  refresh 
	eventOut SFVec3f setTranslation1 
	eventOut SFVec3f setTranslation2 
	eventOut SFRotation setrotation1 
	eventOut SFRotation setrotation2 
	field SFNode box0 USE box0 
	field SFNode box1 USE box1 
	field SFNode box2 USE box2 
 
} 
 
 
ROUTE Time.fraction_changed  TO  position.set_fraction 
ROUTE Time.fraction_changed  TO  Orientation.set_fraction 
ROUTE position.value_changed  TO  box0.translation 
ROUTE Orientation.value_changed TO box0.set_rotation 
 
 
ROUTE Time2.cycleTime TO getstatue.refresh 
ROUTE getstatue.setTranslation1 TO box1.set_translation 
ROUTE getstatue.setTranslation2 TO box2.set_translation 
ROUTE getstatue.setrotation1 TO box1.set_rotation 
ROUTE getstatue.setrotation2 TO box2.set_rotation