[X3D-Public] SFTime.setValue()
Ioan Marius BILASCO
mbilasco at gmail.com
Tue Apr 7 10:22:15 PDT 2009
My feeling is that you should explicitely convert the timein.getValue()
+2.0 to an SFTime value...
As you wrote the code I think that it is trying to put directly an
integer value into a SFTime slot... and I guess that this is not
acceptable.
cheers,
On Apr 7, 2009, at 6:05 PM, Giorgos Papadakis wrote:
> Hello, I am having some troubles with SAI (script called inside an
> x3d world).
> My code has an input SFTime value, routed from an TouchSensor, and I
> want to use this to trigger an animation (startime=input and
> stoptime=input+2.5 seconds)
> I am trying to do this at the following simple code:
>
> timeoutstart.setValue(timein.getValue());
> timeoutstop.setValue(timein.getValue()+2.0);
>
> When viewing the world using the Xj3D browser, I am getting the
> following exception:
>
> System.out: Error: System.out: Error while sending event
> System.out: java.lang.NullPointerException
> System.out: at Control3.readableFieldChanged(Control3.java:62)
> System.out: at
> org
> .web3d
> .vrml.scripting.sai.BaseField.fireEventNotification(BaseField.java:
> 352)
> System.out: at
> org
> .web3d
> .vrml
> .scripting
> .sai.JavaSAIScriptWrapper.sendEvents(JavaSAIScriptWrapper.java:572)
> System.out: at
> org
> .web3d
> .vrml
> .renderer
> .common.nodes.scripting.BaseScript.processEvents(BaseScript.java:571)
> System.out: at
> org
> .xj3d
> .impl
> .core
> .eventmodel
> .DefaultScriptManager.processEvents(DefaultScriptManager.java:287)
> System.out: at
> org
> .xj3d
> .impl
> .core
> .eventmodel
> .DefaultEventModelEvaluator
> .evaluateRunning(DefaultEventModelEvaluator.java:936)
> System.out: at
> org
> .xj3d
> .impl
> .core
> .eventmodel
> .DefaultEventModelEvaluator.evaluate(DefaultEventModelEvaluator.java:
> 605)
> System.out: at
> org
> .web3d
> .vrml
> .renderer.ogl.browser.PerFrameManager.clockTick(PerFrameManager.java:
> 126)
> System.out: at
> org
> .web3d
> .vrml
> .renderer
> .ogl
> .browser
> .ApplicationFrameManager
> .updateSceneGraph(ApplicationFrameManager.java:89)
> System.out: at
> org
> .j3d
> .aviatrix3d
> .management
> .SingleThreadRenderManager.run(SingleThreadRenderManager.java:648)
> System.out: at java.lang.Thread.run(Unknown Source)
> This happens only with SFTime variables, I have successfully
> changed an object’s position and orientation using similar code.
> I appreciate any help you can give me.
> Thank you in advance,
> Giorgos.
> _______________________________________________
> X3D-Public mailing list
> X3D-Public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20090407/d9551e5e/attachment-0001.html>
More information about the X3D-Public
mailing list