don't clamp t value in set_t()

This commit is contained in:
David Rose 2003-07-23 01:03:44 +00:00
parent 9581603cd8
commit bfc61341a1
2 changed files with 10 additions and 2 deletions

View File

@ -58,7 +58,11 @@ class Interval(DirectObject):
self.getState() == CInterval.SFinal)
def setT(self, t):
t = min(max(t, 0.0), self.getDuration())
# There doesn't seem to be any reason to clamp this, and it
# breaks looping intervals. The interval code should properly
# handle t values outside the proper range.
#t = min(max(t, 0.0), self.getDuration())
state = self.getState()
if state == CInterval.SInitial:
self.privInitialize(t)

View File

@ -66,7 +66,11 @@ CInterval(const string &name, double duration, bool open_ended) :
////////////////////////////////////////////////////////////////////
void CInterval::
set_t(double t) {
t = min(max(t, 0.0), get_duration());
// There doesn't seem to be any reason to clamp this, and it
// breaks looping intervals. The interval code should properly
// handle t values outside the proper range.
//t = min(max(t, 0.0), get_duration());
switch (get_state()) {
case S_initial:
priv_initialize(t);