Gavin Bell, RobMyers and Mitra met to see if we could come up with a more composable approach. We explored decoupling the sensing, control logic, and resultant action, such that future VRML extensions can independently address each of these three different description problems.
We came up with the following angle of approach, although more work is needed, especially in the re-composition of these nodes into concise kits which support common idioms.
This is a discussion document at this time, and feedback is welcome to the authors.
RegionSensor {
bboxCenter # as per WWWInline, defines spatial target region
bboxSize
target NODENAME # or reference geometry to be used as spatial target
sense NODENAME # node whose position is checked; default is camera
isIn # TRUE while camera position remains inside region
{} # child geometry is traversed for rendering
}
PickSensor {
target NODENAME # reference to geometry to be picked
{} # child geometry is traversed for rendering
}
Connection { # perhaps ValueConnection ?
from FIELDNAME # pass the value of a named field ...
to FIELDNAME # to update another named field
} # NOTE new syntax added for field names
inline.inline.node.field
DEF DoorPad RegionSensor {
bbox ~~~~~~ # define a volume above the doormat for sensing
Separator {
# draw a picture of the doormat here
}
}
Connection {
from DoorPad.isIn # connect value of isIn field
to DoorSwing.whichChild # OK for names to look ahead?
}
Separator {
# draw door frame here
DEF DoorSwing Switch {
whichChild 0
Separator { RotationXYZ { axis Y angle 0 } }
Separator { RotationXYZ { axis Y angle 1.5708 } }
}
# draw door here
}
DEF DP WWWInline { "http:/~~~/doorpad.wrl" } # contains DoorPad
DEF D WWWInline { "http:/~~~/doorway.wrl" } # contains DoorSwing
Connection { # perhaps StateConnection ?
while DP.DoorPad.isIn # NOTE: alternative syntax
to D.DoorSwing.whichChild
}
Trigger { # perhaps TriggerConnection ?
condition FIELDNAME
action ""
}
DEF MyAnchor PickSensor {
sense Body
DEF Body Separator {
# draw anchor's geometry here
}
}
Trigger {
condition MyAnchor.picked
action "open http://~~~~" # open new .wrl
}
Trigger {
condition "DP.DoorPad.isIn"
action "set D.DoorSwing.whichChild = 1"
}
Trigger {
condition "DP.DoorPad.isIn && keyLock.isIn"
action "set D.DoorSwing.whichChild = 1"
}
Microphone {
channel "URL" # direct viewer's audio to an audio server URL
isListening
}
Speaker {
channel "URL" # receive audio from an audio server URL
isSpeaking
}
WWWInline {
name "spp://server.com:001" # motion server
bbox ~~~
}
DEF HouseMike Microphone {
channel "spp://server.com:1234" # destination audio server
}
DEF HouseSpkr Speaker {
channel "spp://server.com:1234" # source audio server
}
Connect {
while DP.DoorPad.isIn
to Mike.isListening
}
Connect {
while DP.DoorPad.isIn
to [ "audioTo://server.com:1234", # talk to folks in the house
"audioFrom://server.com:1234" ] # hear folks in the house
}
note the use of specialized URLs to indicate source vs. sink. This
approach doesn't need explicit channel nodes
All contents Copyright © 1995 Worlds Inc. Reproduction for
personal use is permitted. All other uses are prohibited without the
formal authorization of Worlds Inc., Worlds, Worlds Chat, AlphaWorld, VRML+, Internet Worlds Fair, LifeForms, Worlds Class Builder and It's
Your World are all trademarks of Worlds Inc.
Web Problems?