|
From: cheribhai <cha...@gm...> - 2010-03-01 12:48:08
|
Hello,
A couple of things I noticed in the 'do_update' function of the
time_sensor_node class (comments are based on version 0.18.5).
1)The VRML97 spec states that "A TimeSensor node can be set up to be active
at read time by specifying loop TRUE (not the default) and stopTime less
than or equal to startTime (satisfied by the default values). ", but one of
the checks to make the node active is
'this->stop_time_.sftime::value() < this->start_time_.value()'.
Should this not be
'this->stop_time_.sftime::value() <= this->start_time_.value()'.
2)The spec also states that "If an active time-dependent node receives a
set_loop FALSE event, execution continues until the end of the current cycle
or until stopTime (if stopTime > startTime), whichever occurs first." The
code currently works such that the above is true only if we are in the first
cycle. After the first one is over the exectution jumps directly to the end
of the cycle in the next simulation tick instead of continuing to the end of
the current cycle. This is affected by the check,
(!this->loop_.sfbool::value() && fless_equal(this->start_time_.value()
+ cycleInt, timeNow.value())).
I have attempted to fix this but before I provide the fix, I just wanted to
be sure that this is truly an error (and that I am not mistaken).
Please advise.
Cherian
--
View this message in context: http://old.nabble.com/Time-Sensor-Node-tp27742840p27742840.html
Sent from the openvrml-develop mailing list archive at Nabble.com.
|