This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > VRML > November 2006 > Cortona 5.0 with Inline node
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Cortona 5.0 with Inline node
|
|
| Ludovico Genco 2006-11-05, 11:33 pm |
| Hi,
I've installed the last release of Cortona, and I think it doesn't execute
corretly the VRML switch node with Inline nodes inside it. In other words
the following node doesn't work anymore with this version of Cortona:
DEF streetLights Switch {
whichChoice 0
choice [
Shape {}
DEF nightView Group {
children [
Inline {url ["stars.WRL"]}
Inline {url ["lights.WRL"]}
]
}
]
}
when I change the whichChoice parameter to 1, with the javascript code, in
the scene appear the lights and the stars. But when whichChoice comes back
to 0, in the scene there are yet the lights on, but not the stars. How is it
possible?
Is it a problem with the switch node or with the Inline node?
Is there anybody that can help me?
Thanks a lot
Ludovico
| |
|
|
Ludovico Genco wrote:
> Hi,
> I've installed the last release of Cortona, and I think it doesn't execute
> corretly the VRML switch node with Inline nodes inside it. In other words
> the following node doesn't work anymore with this version of Cortona:
>
> DEF streetLights Switch {
> whichChoice 0
> choice [
> Shape {}
> DEF nightView Group {
> children [
> Inline {url ["stars.WRL"]}
> Inline {url ["lights.WRL"]}
> ]
> }
> ]
> }
>
> when I change the whichChoice parameter to 1, with the javascript code, in
> the scene appear the lights and the stars. But when whichChoice comes back
> to 0, in the scene there are yet the lights on, but not the stars. How is it
> possible?
I can't reproduce this error.
Could you send me full scene set?
| |
| Ludovico Genco 2006-11-05, 11:33 pm |
| Hi, this is the code:
MAIN FILE
#VRML V2.0 utf8
DEF streetLights Switch {
whichChoice 0
choice [
Shape {}
DEF nightView Group {
children [
#Inline {url ["stars.WRL"]}
Inline {url ["lights.WRL"]}
]
}
]
}
Transform {
translation 0 -5 0
children [
Shape {
geometry DEF B Box { size 25 0.25 25 }
appearance Appearance {
material Material { diffuseColor 1 0 0 }
}
}]}
Transform { children [
Transform { children [
DEF TS TouchSensor { }
Shape {
geometry Sphere {}
appearance Appearance {
material Material { diffuseColor 1 0 1 }
}
}
]
}
]}
DEF S2 Script {
eventIn SFTime touchTime
field SFBool enabled FALSE
eventOut SFInt32 which_changed
url "java script:
function initialize() {
// Initialize to off state.
whichChoice = 0;
onOff_changed = false;
}
function touchTime( value, time ) {
enabled = !enabled;
which_changed = enabled;
}"
}
ROUTE TS.touchTime TO S2.touchTime
ROUTE S2.which_changed TO streetLights.whichChoice
/////////////////////////////////////////////////////////////////////////////////////////////
lights.WRL
#VRML V2.0 utf8
DEF OmniLight PointLight {
intensity 0.6
color 1 1 1
location 0 5 0 #124.6 1.433 -412.4
on TRUE
radius 1.91e+004
}
Transform {
translation -5 0 0
children [
Shape { # choice 0 = off state
geometry DEF B Box { size 0.25 0.25 0.25 }
appearance Appearance {
material Material { diffuseColor 0 0 1 }
}
}]}
When the main file starts, the light in the lights.wrl file is on the scene
(you can see this by turning on and off that light and loading again the
scene), but this is a mistake because the whichChoice of the switch is 0.
Anyway the blue box in the lights.wrl is not present in the scene.
When you touch the sphere the blue box appears, but the lights is still
present in the scene.
How is this possible? Is there something that I don't now about the lights?
I really can't understand this behaviour.
Bye
Ludovico
"Uh" <uh@parallelgraphics.com> wrote in message
news:1161846229.396100.16270@e3g2000cwe.googlegroups.com...
>
> Ludovico Genco wrote:
>
> I can't reproduce this error.
> Could you send me full scene set?
>
| |
|
| Ludovico Genco wrote:
....
> When the main file starts, the light in the lights.wrl file is on the scene
> (you can see this by turning on and off that light and loading again the
> scene), but this is a mistake because the whichChoice of the switch is 0.
> Anyway the blue box in the lights.wrl is not present in the scene.
> When you touch the sphere the blue box appears, but the lights is still
> present in the scene.
> How is this possible? Is there something that I don't now about the lights?
....
Tnanx, Ludovico.
This is bug specific to Cortona 5.0, and will be fixed in the next
version.
| |
| Ludovico Genco 2006-11-05, 11:33 pm |
| Thanks a lot for your support.
Bye,
Ludovico
"Uh" <uh@parallelgraphics.com> wrote in message
news:1162208503.511379.192520@h48g2000cwc.googlegroups.com...
> Ludovico Genco wrote:
> ...
> ...
>
>
> Tnanx, Ludovico.
> This is bug specific to Cortona 5.0, and will be fixed in the next
> version.
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|