media @ VU
[]
readme
course
preface
I
1
2
II
3
4
III
5
6
7
IV
8
9
10
V
11
12
afterthoughts
appendix
references
examples
resources
_
vr-example-goal.vr
(wrl
/pl
)
[ flux /
bitmanagement /
cortona /
octaga
]
#:@* soccer
#@ extern
#@extern vr/extern/proto/avatar/sport.wrl
#@extern vr/extern/proto/avatar/cutie.wrl
#@ scene
Background {
skyColor [
0.0 0.2 0.75,
0.0 0.56 1.0,
1.0 1.0 1.0
]
skyAngle [ 1.309, 1.571]
groundColor [
0.1 0.50 0.0,
0.4 0.55, 0.2,
#0.6, 0.70, 0.6
1.0 1.0 1.0
]
groundAngle [ 1.109, 1.571]
}
PROTO MyViewPoint [ exposedField SFVec3f position 0 0 0
exposedField SFRotation orientation 0 1 0 0
exposedField SFBool set_bind TRUE]
{ Viewpoint { position IS position
orientation IS orientation
set_bind is set_bind } }
DEF Viewpoint MyViewPoint { position 35 1.75 0 orientation 0 1 0 -1.5708 set_bind TRUE}
# normal viewpoint
#DEF Viewpoint MyViewPoint { position 0 80 0 orientation 1 0 0 -1.5708 set_bind FALSE}
#viewpoint from top
#@ sensors
DEF ProxSensor ProximitySensor {center 0 0 0 size 1000 1000 1000 enabled TRUE isActive TRUE}
ROUTE ProxSensor.isActive TO Viewpoint.set_bind
ROUTE ProxSensor.position_changed TO Viewpoint.set_position
ROUTE ProxSensor.orientation_changed TO Viewpoint.set_orientation
Transform {
translation 0 0 0
children [
Shape {
appearance Appearance {
texture ImageTexture { url "@archive/soccer/field1.gif" }
textureTransform TextureTransform {scale 1 1}
}
geometry Box {size 100 .2 64}
}
]
}
PROTO Gate [field MFString GateName [ ]
exposedField SFVec3f translation 0 0 0
exposedField SFRotation rotation 0 1 0 0]
{
Transform { translation IS translation
rotation IS rotation
children [
Transform {
translation 0 2.43 0
children [
Shape {
appearance Appearance {material DEF ColorofGate Material {diffuseColor 0.2 0.2 0.2
emissiveColor .5 .5 .5}}
geometry Box {size 7.4 .2 .2}
} ] }# gate top
Transform {
translation -3.6 1.22 0
children [
Shape {
appearance Appearance {material USE ColorofGate}
geometry Box {size .2 2.44 .2}
} ] } # gate left
Transform {
translation 3.6 1.22 0
children [
Shape {
appearance Appearance {material USE ColorofGate}
geometry Box {size .2 2.44 .2}
} ] } # gate right
Transform {
translation -3.6 1.22 -0.5
children [
Shape { appearance Appearance {
material Material {diffuseColor 0.6 0.6 0.6
emissiveColor 1 1 1
transparency .7}
}
geometry Box {size .05 2.44 1}
}]}# left back of gate
Transform {
translation 3.6 1.22 -0.5
children [
Shape { appearance Appearance {
material Material {diffuseColor 0.6 0.6 0.6
emissiveColor 1 1 1
transparency .7}
}
geometry Box {size .05 2.44 1}
}]}# right back of gate
Transform {
translation 0 1.22 -1
children [
Shape { appearance Appearance {
material Material {diffuseColor 0.6 0.6 0.6
emissiveColor 1 1 1
transparency .7}
}
geometry Box {size 7.4 2.44 .05}
}]}# middle back of gate
] } } # end of proto Gate
Transform {children [ DEF leftGate Gate { GateName [ leftgate] translation -49 0 0 rotation 0 1 0 1.5708} ] }
Transform {children [ DEF rightGate Gate { GateName [ rightgate] translation 49 0 0 rotation 0 1 0 -1.5708} ] }
PROTO Ball [field MFString BallName [ ]
exposedField SFVec3f translation 0 0 0
exposedField SFRotation rotation 0 1 0 0]
{
Transform { translation IS translation
rotation IS rotation
children [
Transform {
translation 0 0 0
children [
Shape {
appearance Appearance {material Material {diffuseColor .9 .9 .9
emissiveColor .9 .9 .9}
texture ImageTexture { url "@archive/soccer/ball1.gif" }
textureTransform TextureTransform {scale 2 2}
}
geometry Sphere {radius .35}
} ] }# end of transform
] } } # end of proto ball
Transform {
translation 40 0 0
children [
DEF ball Ball { BallName [ mainball] translation 0 .35 0 rotation 0 1 0 0}
Transform {
translation -1 1.75 0
rotation 0 1 0 1.56
##scale 1.5 1.5 1.5
children [
]
}
] }
PROTO FlagPost [
exposedField SFVec3f translation 0 0 0
exposedField SFRotation rotation 0 1 0 0]
{
Transform { translation IS translation
rotation IS rotation
children [
Transform {
translation 0 1 0
children [
Shape {
appearance Appearance {material Material {diffuseColor 0.9 0.9 0.2
emissiveColor .9 .9 .2}}
geometry Cylinder {height 2 radius .1}
} ] }# end of pole
Transform {
translation 0.25 1.75 0
children [
Shape {
appearance Appearance {material Material {diffuseColor 1 0 0
emissiveColor 1 0 0}}
geometry Box {size .5 .5 .05}
} ] }# end of flag
]}} # end of proto flagpost
Transform {children [ DEF lefttopflagpost FlagPost { translation -49 0 -31 rotation 0 1 0 0} ] }
Transform {children [ DEF leftbottomflagpost FlagPost { translation 49 0 -31 rotation 0 1 0 0} ] }
Transform {children [ DEF righttopflagpost FlagPost { translation -49 0 31 rotation 0 1 0 0} ] }
Transform {children [ DEF rightbottomflagpost FlagPost { translation 49 0 31 rotation 0 1 0 0} ] }
PROTO GoalKeeper [
exposedField SFVec3f translation 0 0 0
exposedField SFRotation rotation 0 1 0 0
exposedField SFInt32 gesture 0
]{
Transform { translation IS translation
rotation IS rotation
children [ avatar-sport {
avatarSize[ 0.25 1.7500]
isAvatar TRUE
##gestureNames ["","Likes jim","Agrees jim","Smiles jim","Frowns jim","Disagrees jim","No likes jim","Good by lil","Superzen lil","Rire jim"]
rotation 0 1 0 0
whichChoice 0
gesture IS gesture
isOver FALSE
touchTime 0
##position 0 0 0
##isPilot FALSE
##nickname "goalKeeper"
}
]
}} # end of proto GoalKeeper
Transform { children [
DEF goalkeeper GoalKeeper {
translation 48 1.8 0 rotation 0 1 0 -1.5708 } ]
}
#</>
<phrase dir=b turn=0 id=_ level=_ right="haven t~nI seen this~nbefore?"/>
<phrase dir=b turn=0 id=_ level=_ left="I am glad~nyou re paying~nattention!!">
<gesture dir=b id=_ level=_ right=0 pause=500/>
<gesture dir=b id=_ level=_ left=0 pause=600/>
[]
readme
course
preface
I
1
2
II
3
4
III
5
6
7
IV
8
9
10
V
11
12
afterthoughts
appendix
references
examples
resources
_
(C) A. Eliëns
9/8/2006
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.