<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "https://www.web3d.org/specifications/x3d-3.2.dtd">
<![CDATA[
ecmascript: function set_hitPoint(hp) { lastHitPoint= hp; } function touchedFloor(t) { indPos= CheckGroundRoof(lastHitPoint); indOri= new SFRotation(-1, 0, 0, 1.571); } function touchedWallLeft(t) { indPos= CheckLeftRightWall(CheckHeight(lastHitPoint)); indOri= new SFRotation(0, 1, 0, 1.5705); } function touchedWallRight(t) { indPos= CheckLeftRightWall(CheckHeight(lastHitPoint)); indOri= new SFRotation(0, -1, 0, 1.5705); } function touchedWallFront(t) { indPos= CheckFrontWall(CheckHeight(lastHitPoint)); indOri= new SFRotation(0, 1, 0, 0); } function touchedRoof(t) { indPos= CheckGroundRoof(lastHitPoint); indOri= (new SFRotation(1, 0, 0, 1.57));//.multiply(new SFRotation(0, 1, 0, 3.14159)); } function CheckGroundRoof(pos) { return new SFVec3f( Limit(pos.x, -cRoomWidth/2 + cPaintingWidth/2, cRoomWidth/2 - cPaintingWidth/2) , pos.y , Limit(pos.z, -cRoomDepth/2 + cPaintingHeight/2, cRoomDepth/2 - cPaintingHeight/2) ); } function CheckHeight(pos) { return new SFVec3f( pos.x , Limit(pos.y, cFloorY + cPaintingHeight/2, cFloorY + cRoomHeight - cPaintingHeight/2) , pos.z ); } function CheckLeftRightWall(pos) { return new SFVec3f( pos.x , pos.y , Limit(pos.z, -cRoomDepth/2 + cPaintingWidth/2, cRoomDepth/2 - cPaintingWidth/2) ); } function CheckFrontWall(pos) { return new SFVec3f( Limit(pos.x, -cRoomWidth/2 + cPaintingWidth/2, cRoomWidth/2 - cPaintingWidth/2) , pos.y , pos.z ); } function Limit(x, min, max) { return Min(Max(x, min), max); } function Max(a, b) { return a > b? a:b; } function Min(a, b) { return a > b? b:a; }
]]>
Event Graph ROUTE Table entries with 14 ROUTE connections total, showing X3D event-model relationships for this scene.
Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.
TouchFloor
TouchSensor hitPoint_changed SFVec3f |
Worker
Script set_hitPoint SFVec3f |
then
|
Worker
Script indOri SFRotation |
PaintingOrientationChaser
OrientationChaser set_destination SFRotation |
then
|
PaintingOrientationChaser
OrientationChaser value_changed SFRotation |
TransInd
Transform rotation SFRotation |
|||
then
|
Worker
Script indPos SFVec3f |
PaintingPositionChaser
PositionChaser set_destination SFVec3f |
then
|
PaintingPositionChaser
PositionChaser value_changed SFVec3f |
TransInd
Transform translation SFVec3f |
|||||
TouchFloor
TouchSensor touchTime SFTime |
Worker
Script touchedFloor SFTime |
then
|
Worker
Script indOri SFRotation |
PaintingOrientationChaser
OrientationChaser set_destination SFRotation |
then
|
PaintingOrientationChaser
OrientationChaser value_changed SFRotation |
TransInd
Transform rotation SFRotation |
|||
then
|
Worker
Script indPos SFVec3f |
PaintingPositionChaser
PositionChaser set_destination SFVec3f |
then
|
PaintingPositionChaser
PositionChaser value_changed SFVec3f |
TransInd
Transform translation SFVec3f |
TouchRoof
TouchSensor hitPoint_changed SFVec3f |
Worker
Script set_hitPoint SFVec3f |
then
|
Worker
Script indOri SFRotation |
PaintingOrientationChaser
OrientationChaser set_destination SFRotation |
then
|
PaintingOrientationChaser
OrientationChaser value_changed SFRotation |
TransInd
Transform rotation SFRotation |
|||
then
|
Worker
Script indPos SFVec3f |
PaintingPositionChaser
PositionChaser set_destination SFVec3f |
then
|
PaintingPositionChaser
PositionChaser value_changed SFVec3f |
TransInd
Transform translation SFVec3f |
|||||
TouchRoof
TouchSensor touchTime SFTime |
Worker
Script touchedRoof SFTime |
then
|
Worker
Script indOri SFRotation |
PaintingOrientationChaser
OrientationChaser set_destination SFRotation |
then
|
PaintingOrientationChaser
OrientationChaser value_changed SFRotation |
TransInd
Transform rotation SFRotation |
|||
then
|
Worker
Script indPos SFVec3f |
PaintingPositionChaser
PositionChaser set_destination SFVec3f |
then
|
PaintingPositionChaser
PositionChaser value_changed SFVec3f |
TransInd
Transform translation SFVec3f |
ProtoInstance Selection |
No ROUTE connection found for output from this node. This ProtoInstance contains SFNode/MFNode fieldValue declaration with direct access to other nodes. |
<!--
Color legend: X3D terminology
<X3dNode
DEF='idName' field='value'/>
matches XML terminology
<XmlElement
DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement)
(Grey background inside box: inserted documentation)
(Magenta background: X3D Extensibility)
<ProtoInstance
name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->