{
if(x!=ValueBase::TYPE_VECTOR)
throw Exception::BadType(ValueBase::type_name(x));
-
+
segment_=ValueNode_Composite::create(ValueBase::TYPE_SEGMENT);
amount_=ValueNode_Const::create(Real(0.5));
}
etl::hermite<Vector> curve(segment.p1,segment.p2,segment.t1,segment.t2);
etl::derivative< etl::hermite<Vector> > deriv(curve);
-
+
#ifdef ETL_FIXED_DERIVATIVE
return deriv((*amount_)(t).get(Real()))*(0.5);
#else
return deriv((*amount_)(t).get(Real()))*(-0.5);
#endif
-
+
}
{
return _("SegCalcTangent");
}
-
+
bool
ValueNode_SegCalcTangent::check_type(ValueBase::Type type)
{
return 0;
if(name=="amount")
return 1;
-
+
throw Exception::BadLinkName(name);
}