synfig::ValueBase
synfig::ValueNode_Add::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
if(!ref_a || !ref_b)
throw runtime_error(strprintf("ValueNode_Add: %s",_("One or both of my parameters aren't set!")));
switch(get_type())
ValueBase
ValueNode_AngleString::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
Real angle(Angle::deg((*angle_)(t).get(Angle())).get());
int width((*width_)(t).get(int()));
int precision((*precision_)(t).get(int()));
ValueBase
ValueNode_Atan2::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
return Angle::tan((*y_)(t).get(Real()),
(*x_)(t).get(Real()));
}
return ret;
}
+static int instance_count;
+
ValueBase
ValueNode_BLine::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
std::vector<BLinePoint> ret_list;
std::vector<ListEntry>::const_iterator iter,first_iter;
ValueBase
ValueNode_BLineCalcTangent::operator()(Time t, Real amount)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
const std::vector<ValueBase> bline((*bline_)(t).get_list());
handle<ValueNode_BLine> bline_value_node(bline_);
const bool looped(bline_value_node->get_loop());
ValueBase
ValueNode_BLineCalcVertex::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
const std::vector<ValueBase> bline((*bline_)(t).get_list());
handle<ValueNode_BLine> bline_value_node(bline_);
const bool looped(bline_value_node->get_loop());
ValueBase
ValueNode_BLineCalcWidth::operator()(Time t, Real amount)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
const std::vector<ValueBase> bline((*bline_)(t).get_list());
handle<ValueNode_BLine> bline_value_node(bline_);
const bool looped(bline_value_node->get_loop());
ValueBase
ValueNode_BLineRevTangent::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
if ((*reverse_)(t).get(bool()))
{
BLinePoint reference((*reference_)(t));
ValueBase
synfig::ValueNode_Composite::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
switch(get_type())
{
case ValueBase::TYPE_VECTOR:
ValueBase
ValueNode_Const::operator()(Time /*t*/)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
return value;
}
ValueBase
ValueNode_Cos::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
return
Angle::cos(
(*angle_)(t).get(Angle())
ValueBase
ValueNode_DotProduct::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
Vector lhs((*lhs_)(t).get(Vector()));
Vector rhs((*rhs_)(t).get(Vector()));
ValueBase
ValueNode_Duplicate::operator()(Time t __attribute__ ((unused)))const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
return index;
}
ValueBase
ValueNode_DynamicList::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
std::vector<ValueBase> ret_list;
std::vector<ListEntry>::const_iterator iter;
ValueBase
ValueNode_Exp::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
return (exp((*exp_)(t).get(Real())) *
(*scale_)(t).get(Real()));
}
ValueBase
ValueNode_GradientColor::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
Real index((*index_)(t).get(Real()));
bool loop((*loop_)(t).get(bool()));
if (loop) index -= floor(index);
synfig::ValueBase
synfig::ValueNode_GradientRotate::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
Gradient gradient;
gradient=(*ref_gradient)(t).get(gradient);
Real offset((*ref_offset)(t).get(Real()));
ValueBase
ValueNode_Integer::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
int integer = (*integer_)(t).get(int());
switch (get_type())
ValueBase
ValueNode_IntString::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
int integer((*int_)(t).get(int()));
int width((*width_)(t).get(int()));
int zero_pad((*zero_pad_)(t).get(bool()));
ValueBase
ValueNode_Join::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
const std::vector<ValueBase> strings((*strings_)(t).get_list());
const String before((*before_)(t).get(String()));
const String separator((*separator_)(t).get(String()));
ValueBase
ValueNode_Linear::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
switch(get_type())
{
case ValueBase::TYPE_ANGLE:
ValueBase
ValueNode_Logarithm::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
Real link = (*link_) (t).get(Real());
Real epsilon = (*epsilon_) (t).get(Real());
Real infinite = (*infinite_)(t).get(Real());
ValueBase
synfig::ValueNode_RadialComposite::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
switch(get_type())
{
case ValueBase::TYPE_VECTOR:
synfig::ValueBase
synfig::ValueNode_Range::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
if(!min_ || !max_ || !link_)
throw runtime_error(strprintf("ValueNode_Range: %s",_("Some of my parameters aren't set!")));
ValueBase
ValueNode_RealString::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
Real real((*real_)(t).get(Real()));
int width((*width_)(t).get(int()));
int precision((*precision_)(t).get(int()));
ValueBase
ValueNode_Reciprocal::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
Real link = (*link_) (t).get(Real());
Real epsilon = (*epsilon_) (t).get(Real());
Real infinite = (*infinite_)(t).get(Real());
ValueBase
ValueNode_Reference::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
return (*link_)(t);
}
synfig::ValueBase
synfig::ValueNode_Repeat_Gradient::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
const int count((*count_)(t).get(int()));
int i;
Gradient ret;
synfig::ValueBase
synfig::ValueNode_Scale::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
if(!value_node || !scalar)
throw runtime_error(strprintf("ValueNode_Scale: %s",_("One or both of my parameters aren't set!")));
else if(get_type()==ValueBase::TYPE_ANGLE)
ValueBase
ValueNode_SegCalcTangent::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
Segment segment((*segment_)(t).get(Segment()));
etl::hermite<Vector> curve(segment.p1,segment.p2,segment.t1,segment.t2);
ValueBase
ValueNode_SegCalcVertex::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
Segment segment((*segment_)(t).get(Segment()));
etl::hermite<Vector> curve(segment.p1,segment.p2,segment.t1,segment.t2);
ValueBase
ValueNode_Sine::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
return
Angle::sin(
(*angle_)(t).get(Angle())
ValueBase
ValueNode_Step::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
Time duration ((*duration_ )(t).get(Time()));
Time start_time ((*start_time_ )(t).get(Time()));
Real intersection((*intersection_)(t).get(Real()));
synfig::ValueBase
synfig::ValueNode_Stripes::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
const int total((*stripes_)(t).get(int()));
int i;
Gradient ret;
synfig::ValueBase
synfig::ValueNode_Subtract::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
if(!ref_a || !ref_b)
throw runtime_error(strprintf("ValueNode_Subtract: %s",_("One or both of my parameters aren't set!")));
switch(get_type())
ValueBase
ValueNode_Switch::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
return (*switch_)(t).get(bool()) ? (*link_on_)(t) : (*link_off_)(t);
}
synfig::ValueBase
synfig::ValueNode_TimedSwap::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
Time swptime=(*swap_time)(t).get(Time());
Time swplength=(*swap_length)(t).get(Time());
ValueBase
ValueNode_TimeLoop::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
Time link_time = (*link_time_) (t).get(Time());
Time local_time = (*local_time_)(t).get(Time());
Time duration = (*duration_) (t).get(Time());
ValueBase
ValueNode_TimeString::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
Time time((*time_)(t).get(Time()));
switch (get_type())
synfig::ValueBase
synfig::ValueNode_TwoTone::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
return Gradient((*ref_a)(t).get(Color()),(*ref_b)(t).get(Color()));
}
ValueBase
ValueNode_VectorAngle::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
return (*vector_)(t).get(Vector()).angle();
}
ValueBase
ValueNode_VectorLength::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
return (*vector_)(t).get(Vector()).mag();
}
ValueBase
ValueNode_VectorX::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
return (*vector_)(t).get(Vector())[0];
}
ValueBase
ValueNode_VectorY::operator()(Time t)const
{
+ if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+ printf("%s:%d operator()\n", __FILE__, __LINE__);
+
return (*vector_)(t).get(Vector())[1];
}