29 #ifndef __CLAW_MATH_CURVE_HPP__
30 #define __CLAW_MATH_CURVE_HPP__
48 template<
typename C,
typename Traits = coordinate_traits<C> >
101 typedef std::list<control_point> control_point_list;
105 typedef typename control_point_list::iterator
iterator;
165 std::vector<resolved_point>
180 void ensure_ends_in_points
181 ( std::vector<resolved_point>& p,
bool ensure_origin,
182 bool ensure_end )
const;
184 std::vector<resolved_point>
185 extract_domain_points(
const std::vector<resolved_point>& p )
const;
187 std::vector<double> get_roots
191 std::vector<double> get_roots_degree_2
193 std::vector<double> get_roots_degree_3
212 std::vector<typename section::resolved_point>
221 std::vector<typename section::resolved_point>
222 get_point_at_x_before_origin(
value_type x )
const;
223 std::vector<typename section::resolved_point>
224 get_point_at_x_after_end(
value_type x )
const;
228 control_point_list m_points;
237 #endif // __CLAW_MATH_CURVE_HPP__
resolved_point(const coordinate_type &position, const section &s, const double t)
Constructor.
coordinate_type get_tangent_at(double t) const
Get the direction of the tangent at a given date.
section(const iterator_type &origin, const iterator_type &end)
Constructor.
The control_point class describes a control point of the curve, with the direction of the curve befor...
const section & get_section() const
Get the section on which the point has been found.
coordinate_type get_point_at(double t) const
Get the point of this section at a given date.
void push_front(const control_point &p)
Add a point at the beginning of the curve.
std::vector< resolved_point > get_point_at_x(value_type x, bool off_domain=false) const
Get the points having the given x-coordinate on this section.
The coordinate traits provide an access to the members of the structures representing a coordinate in...
Implementation of claw::math::curve.
const_iterator iterator_type
The type of the iterators on the ends of the section.
C coordinate_type
The type of the coordinates of the curve.
A section is a part of the curve between two control points.
C coordinate_type
The type of the coordinates of the curve.
iterator end()
Get an iterator past the last control point.
const coordinate_type & get_position() const
Get The position of the point.
const iterator_type & get_origin() const
Get an iterator on the control point at the origin of the section in the curve from which it was crea...
const coordinate_type & get_output_direction() const
Get the point in the direction of which the curve leaves this position.
const coordinate_type & get_position() const
Get the position of this control point.
std::vector< typename section::resolved_point > get_point_at_x(value_type x, bool off_domain=false) const
Get the points having the given x-coordinate on the curve.
C coordinate_type
The type of the coordinates of the curve.
bool empty() const
Tell if there is no points on this section.
traits_type::value_type value_type
The type of the components of the coordinates.
Traits traits_type
The traits provide an access to the properties of the coordinates.
traits_type::value_type value_type
The type of the components of the coordinates.
section get_section(const const_iterator &pos) const
Get the section of the curve starting at a given control point.
C coordinate_type
The type of the coordinates of the curve.
void push_back(const control_point &p)
Add a point at the end of the curve.
const coordinate_type & get_input_direction() const
Get the point in the direction of which the curve enters this position.
Traits traits_type
The traits provide an access to the properties of the coordinates.
void insert(const iterator &pos, const control_point &p)
Add a point before an other point of the curve.
control_point()
Constructor.
control_point_list::const_iterator const_iterator
The type of the iterator on the control points of the curve.
control_point_list::iterator iterator
The type of the iterator on the control points of the curve.
Implementation of the Bézier curve.
iterator begin()
Get an iterator on the first control point.
double get_date() const
Get the date of the point on the section.
The resolved point class is a point found on a section.