projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add an extra 'symmetrical' parameter to the 'time loop' layer to better be able to...
[synfig.git]
/
synfig-core
/
trunk
/
src
/
synfig
/
valuenode_bline.cpp
diff --git
a/synfig-core/trunk/src/synfig/valuenode_bline.cpp
b/synfig-core/trunk/src/synfig/valuenode_bline.cpp
index
82e5a42
..
366c301
100644
(file)
--- a/
synfig-core/trunk/src/synfig/valuenode_bline.cpp
+++ b/
synfig-core/trunk/src/synfig/valuenode_bline.cpp
@@
-1,12
+1,12
@@
/* === S Y N F I G ========================================================= */
/*! \file valuenode_bline.cpp
/* === S Y N F I G ========================================================= */
/*! \file valuenode_bline.cpp
-** \brief
Template File
+** \brief
Implementation of the "BLine" valuenode conversion.
**
** $Id$
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
**
** $Id$
**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2007 Chris Moore
+** Copyright (c) 2007
, 2008
Chris Moore
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
@@
-53,6
+53,8
@@
using namespace synfig;
/* === M A C R O S ========================================================= */
/* === M A C R O S ========================================================= */
+#define EPSILON 0.0000001f
+
/* === G L O B A L S ======================================================= */
/* === P R O C E D U R E S ================================================= */
/* === G L O B A L S ======================================================= */
/* === P R O C E D U R E S ================================================= */
@@
-280,7
+282,6
@@
ValueNode_BLine::create(const ValueBase &value)
}
}
}
}
-
return value_node;
}
return value_node;
}
@@
-289,7
+290,6
@@
ValueNode_BLine::create_list_entry(int index, Time time, Real origin)
{
ValueNode_BLine::ListEntry ret;
{
ValueNode_BLine::ListEntry ret;
-
synfig::BLinePoint prev,next;
int prev_i,next_i;
synfig::BLinePoint prev,next;
int prev_i,next_i;
@@
-306,7
+306,7
@@
ValueNode_BLine::create_list_entry(int index, Time time, Real origin)
next_i=index;
prev_i=find_prev_valid_entry(index,time);
next_i=index;
prev_i=find_prev_valid_entry(index,time);
- synfig::info("index=%d, next_i=%d, prev_i=%d",index,next_i,prev_i);
+
//
synfig::info("index=%d, next_i=%d, prev_i=%d",index,next_i,prev_i);
next=(*list[next_i].value_node)(time);
prev=(*list[prev_i].value_node)(time);
next=(*list[next_i].value_node)(time);
prev=(*list[prev_i].value_node)(time);
@@
-351,7
+351,7
@@
ValueNode_BLine::operator()(Time t)const
assert(amount<=1.0f);
// it's fully on
assert(amount<=1.0f);
// it's fully on
- if
(amount==1.0f
)
+ if
(amount > 1.0f - EPSILON
)
{
if(first_flag)
{
{
if(first_flag)
{
@@
-423,7
+423,7
@@
ValueNode_BLine::operator()(Time t)const
// Find "end" of dynamic group - ie. search forward along
// the bline from the current point until we find a point
// Find "end" of dynamic group - ie. search forward along
// the bline from the current point until we find a point
- // which is more 'on'than the current one
+ // which is more 'on'
than the current one
end_iter=iter;
// for(++end_iter;begin_iter!=list.end();++end_iter)
for(++end_iter;end_iter!=list.end();++end_iter)
end_iter=iter;
// for(++end_iter;begin_iter!=list.end();++end_iter)
for(++end_iter;end_iter!=list.end();++end_iter)
@@
-570,7
+570,7
@@
ValueNode_BLine::operator()(Time t)const
curr_coord_sys[0]=(begin_pos_at_current_time - end_pos_at_current_time).norm();
curr_coord_sys[1]=curr_coord_sys[0].perp();
curr_coord_sys[0]=(begin_pos_at_current_time - end_pos_at_current_time).norm();
curr_coord_sys[1]=curr_coord_sys[0].perp();
- // Invert (transpose) the last of these matric
i
es, since we use it for transform back
+ // Invert (transpose) the last of these matrices, since we use it for transform back
swap(curr_coord_sys[0][1],curr_coord_sys[1][0]);
}
swap(curr_coord_sys[0][1],curr_coord_sys[1][0]);
}