Claw  1.7.3
Classes | Public Types | Public Member Functions | List of all members
claw::math::curve< C, Traits >::section Class Reference

A section is a part of the curve between two control points. More...

#include <curve.hpp>

Classes

class  resolved_point
 The resolved point class is a point found on a section. More...

Public Types

typedef C coordinate_type
 The type of the coordinates of the curve.
typedef Traits traits_type
 The traits provide an access to the properties of the coordinates.
typedef traits_type::value_type value_type
 The type of the components of the coordinates.
typedef const_iterator iterator_type
 The type of the iterators on the ends of the section.

Public Member Functions

 section (const iterator_type &origin, const iterator_type &end)
 Constructor.
coordinate_type get_point_at (double t) const
 Get the point of this section at a given date.
coordinate_type get_tangent_at (double t) const
 Get the direction of the tangent at a given date.
std::vector< resolved_pointget_point_at_x (value_type x, bool off_domain=false) const
 Get the points having the given x-coordinate on this section.
const iterator_typeget_origin () const
 Get an iterator on the control point at the origin of the section in the curve from which it was created.
bool empty () const
 Tell if there is no points on this section.

Detailed Description

template<typename C, typename Traits = coordinate_traits<C>>
class claw::math::curve< C, Traits >::section

A section is a part of the curve between two control points.

Author
Julien Jorge

Definition at line 114 of file curve.hpp.

Constructor & Destructor Documentation

template<typename C , typename Traits >
claw::math::curve< C, Traits >::section::section ( const iterator_type origin,
const iterator_type end 
)

Constructor.

Parameters
originThe point at the beginning of the section.
endThe point at the end of the section.

Definition at line 176 of file curve.tpp.

Member Function Documentation

template<typename C , typename Traits >
claw::math::curve< C, Traits >::section::coordinate_type claw::math::curve< C, Traits >::section::get_point_at ( double  t) const

Get the point of this section at a given date.

Parameters
tThe date at which the point is computed.

Definition at line 189 of file curve.tpp.

template<typename C , typename Traits >
std::vector< typename claw::math::curve< C, Traits >::section::resolved_point > claw::math::curve< C, Traits >::section::get_point_at_x ( value_type  x,
bool  off_domain = false 
) const

Get the points having the given x-coordinate on this section.

Parameters
xThe coordinate for which we want the points.
off_domainTell the method to keep the points found at a date outside [0, 1].

Definition at line 247 of file curve.tpp.

Referenced by claw::math::curve< C, Traits >::get_point_at_x().

template<typename C , typename Traits >
claw::math::curve< C, Traits >::section::coordinate_type claw::math::curve< C, Traits >::section::get_tangent_at ( double  t) const

Get the direction of the tangent at a given date.

Parameters
tThe date for which we want the tangent.

Definition at line 217 of file curve.tpp.


The documentation for this class was generated from the following files: