Commit 3f628465 by JasonChmn Committed by Pierre Fernbach

[Dynamic dim - hermite] Remove dimension from template

parent 49a95d7f
 ... ... @@ -30,7 +30,7 @@ namespace curves /// - crosses each of the waypoint given in its initialization (\f\$P_0\f\$, \f\$P_1\f\$,...,\f\$P_N\f\$). /// - has its derivatives on \f\$P_i\f\$ and \f\$P_{i+1}\f\$ are \f\$p'(t_{P_i}) = m_i\f\$ and \f\$p'(t_{P_{i+1}}) = m_{i+1}\f\$. /// template > struct cubic_hermite_spline : public curve_abc { ... ...
 ... ... @@ -36,7 +36,7 @@ typedef std::vector bezier3_t; typedef curves::polynomial polynomial3_t; typedef curves::exact_cubic exact_cubic3_t; typedef curves::cubic_hermite_spline cubic_hermite_spline3_t; typedef curves::cubic_hermite_spline cubic_hermite_spline3_t; typedef polynomial3_t::coeff_t coeff_t; typedef std::pair waypoint3_t; typedef std::vector > t_waypoint3_t; ... ...
 ... ... @@ -129,6 +129,22 @@ class TestCurves(unittest.TestCase): b.loadFromText("serialization_curve.test") self.assertTrue((a(0.4) == b(0.4)).all()) os.remove("serialization_curve.test") # test dim 4 points = matrix([[1., 2., 3., 4.], [4., 5., 6., 7.]]).transpose() tangents = matrix([[1., 2., 3., 4.], [4., 5., 6., 7.]]).transpose() time_points = matrix([0., 1.]).transpose() a = cubic_hermite_spline3(points, tangents, time_points) a.min() a.max() a(0.4) self.assertTrue((a.derivate(0.4, 0) == a(0.4)).all()) a.derivate(0.4, 2) # Test serialization a.saveAsText("serialization_curve.test") b = cubic_hermite_spline3() b.loadFromText("serialization_curve.test") self.assertTrue((a(0.4) == b(0.4)).all()) os.remove("serialization_curve.test") return def test_piecewise_polynomial_curve(self): ... ...
 ... ... @@ -32,7 +32,7 @@ namespace curves typedef exact_cubic exact_cubic_one; typedef std::pair WaypointOne; typedef std::vector T_WaypointOne; typedef cubic_hermite_spline cubic_hermite_spline_t; typedef cubic_hermite_spline cubic_hermite_spline_t; typedef std::pair pair_point_tangent_t; typedef std::vector > t_pair_point_tangent_t; typedef piecewise_curve piecewise_polynomial_curve_t; ... ... @@ -1245,7 +1245,7 @@ void curveAbcDimDynamicTest(bool& error) typedef exact_cubic exact_cubic_test_t; typedef exact_cubic_test_t::spline_constraints spline_constraints_test_t; typedef bezier_curve bezier_curve_test_t; typedef cubic_hermite_spline cubic_hermite_spline_test_t; typedef cubic_hermite_spline cubic_hermite_spline_test_t; curve_abc_test_t * pt_curve_abc; // POLYNOMIAL point_t a(1,1,1); ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!