29 #ifndef __CLAW_MATH_CURVE_HPP__
30 #define __CLAW_MATH_CURVE_HPP__
48 template<
typename C,
typename Traits = coordinate_traits<C> >
77 (
const coordinate_type& p,
const coordinate_type& input_direction,
78 const coordinate_type& output_direction );
80 const coordinate_type& get_position()
const;
81 const coordinate_type& get_input_direction()
const;
82 const coordinate_type& get_output_direction()
const;
86 coordinate_type m_position;
90 coordinate_type m_input_direction;
94 coordinate_type m_output_direction;
101 typedef std::list<control_point> control_point_list;
105 typedef typename control_point_list::iterator
iterator;
142 (
const coordinate_type& position,
const section& s,
const double t );
144 const coordinate_type& get_position()
const;
145 const section& get_section()
const;
146 double get_date()
const;
150 coordinate_type m_position;
161 section(
const iterator_type& origin,
const iterator_type& end );
163 coordinate_type get_point_at(
double t )
const;
164 coordinate_type get_tangent_at(
double t )
const;
165 std::vector<resolved_point>
166 get_point_at_x( value_type x,
bool off_domain =
false )
const;
168 const iterator_type& get_origin()
const;
174 (
double t, value_type origin, value_type output_direction,
175 value_type input_direction, value_type end )
const;
176 value_type evaluate_derived
177 (
double t, value_type origin, value_type output_direction,
178 value_type input_direction, value_type end )
const;
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
188 ( value_type x, value_type origin, value_type output_direction,
189 value_type input_direction, value_type end )
const;
191 std::vector<double> get_roots_degree_2
192 ( value_type a, value_type b, value_type c )
const;
193 std::vector<double> get_roots_degree_3
194 ( value_type a, value_type b, value_type c, value_type d )
const;
198 iterator_type m_origin;
210 section get_section(
const const_iterator& pos )
const;
212 std::vector<typename section::resolved_point>
213 get_point_at_x( value_type x,
bool off_domain =
false )
const;
217 const_iterator begin()
const;
218 const_iterator end()
const;
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;
235 #include "claw/impl/curve.tpp"
237 #endif // __CLAW_MATH_CURVE_HPP__
The control_point class describes a control point of the curve, with the direction of the curve befor...
The coordinate traits provide an access to the members of the structures representing a coordinate in...
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.
C coordinate_type
The type of the coordinates of the curve.
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.
C coordinate_type
The type of the coordinates of the curve.
Traits traits_type
The traits provide an access to the properties of the coordinates.
control_point_list::const_iterator const_iterator
The type of the iterator on the control points of the curve.
This is the main namespace.
control_point_list::iterator iterator
The type of the iterator on the control points of the curve.
Implementation of the Bézier curve.
The resolved point class is a point found on a section.