DGtal  1.5.beta
DGtal::detail::TangentAngleFromDSS Struct Reference

#include <DGtal/geometry/curves/estimation/SegmentComputerEstimators.h>

Public Types

typedef double Value
 

Public Member Functions

template<typename DSS >
Value operator() (const DSS &aDSS) const
 

Detailed Description

Description of class 'TangentAngleFromDSS'

Aim: computes the tangent orientation of a DSS (angle in [-pi,+pi] radians between the tangent and the x-axis).

Definition at line 681 of file SegmentComputerEstimators.h.

Member Typedef Documentation

◆ Value

Member Function Documentation

◆ operator()()

template<typename DSS >
Value DGtal::detail::TangentAngleFromDSS::operator() ( const DSS &  aDSS) const
inline

Operator()

Returns
the angle of type double (angle in [-pi,+pi] radians between the tangent and the x-axis).
Parameters
aDSSan instance of segment computer devoted to the DSS recognition.
Template Parameters
DSSa model of segment computer, which must have methods a() and b() returning the y- and x-component of the tangent vector.

Definition at line 701 of file SegmentComputerEstimators.h.

702  {
703  Value a = (Value) NumberTraits<typename DSS::Integer>
704  ::castToDouble(aDSS.a());
705  Value b = (Value) NumberTraits<typename DSS::Integer>
706  ::castToDouble(aDSS.b());
707 
708  return std::atan2(a,b);
709  }

The documentation for this struct was generated from the following file: