light.1.wrl

来自「虚拟现实课件 教会你应用特定软件模拟现实电脑重现现实环境」· WRL 代码 · 共 86 行

WRL
86
字号
#创建交通灯造型
#VRML V2.0 utf8
Group{
	children[
		Transform{
			translation 0.0 4.0 0.0
			children[
			Shape{
				appearance DEF Bwhite Appearance{
					material Material{
						diffuseColor 0.0 0.0 1.0
							}
						}
				geometry Box{
					size 3.0 0.6 3.0
						}
					},
			Transform{
				translation 0.0 -2.0 0.0
				children Shape{
						appearance Appearance{
							material Material{
								diffuseColor 0.5 0.5 0.5
									}
								}
						geometry Cylinder{
								radius 0.2
								height 4.0
								}
							}
						},
			DEF Llights Transform{
				translation 1.5 0.0 0.0
				children[
					Shape{
						appearance Appearance{
							material Material{
								diffuseColor  0.0 1.0 0.0
									}
								}
						geometry DEF Blight Sphere{
							radius 0.2
								}
							},
					Transform{
						translation 0.0 0.0 -1.0
						children Shape{
							appearance Appearance{
								material Material{
									diffuseColor 1.0 0.0 0.0
										}
									}
							geometry USE Blight
								}
							},
					Transform{
						translation 0.0 0.0 1.0
						children Shape{
							appearance Appearance{
								material Material{
									diffuseColor 1.0 1.0 0.0
										}
								}
							geometry USE Blight
								}
							}
						]
			
					},
		
			Transform{
				rotation 0.0 1.0 0.0 1.57
				children USE Llights
				},
			Transform{
				rotation 0.0 1.0 0.0 -1.57
				children USE Llights
				},
			Transform{
				rotation 0.0 1.0 0.0 3.14
				children USE Llights
				}
			]
		}
	]
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?