1 #ifndef rcollinebuilder_h 2 #define rcollinebuilder_h 31 RColLineBuilder(
const T& start,
const T& dir,
45 float distToLine(
const T&)
const;
50 template <
class T>
inline 52 const T& dir,
const T& step,
TypeSet<T>& line )
57 , dirlen_(
Math::
Sqrt(float(dir_[0]*dir_[0]+dir_[1]*dir_[1])))
61 template <
class T>
inline 72 float disttoline =
mUdf(
float);
79 if ( dist<disttoline )
80 { bestrc = candidate; disttoline=dist; }
88 if ( dist<disttoline )
89 { bestrc = candidate; disttoline=dist; }
98 if ( dist<disttoline )
99 { bestrc = candidate; disttoline=dist; }
110 template <
class T>
inline 117 template <
class T>
inline 120 if ( start[0]%step[0] != stop[0]%step[0]
121 || start[1]%step[1] != stop[1]%step[1] )
126 { output += T(start);
return true; }
RColLineBuilder(const T &start, const T &dir, const T &step, TypeSet< T > &line)
Definition: rcollinebuilder.h:51
const T & dir_
Definition: rcollinebuilder.h:40
RowCol step_
Definition: horizontracker.h:141
Set of (small) copyable elements.
Definition: commontypes.h:30
const T & start_
Definition: rcollinebuilder.h:39
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
const T & step_
Definition: rcollinebuilder.h:41
int nextExtension()
Definition: rcollinebuilder.h:62
bool makeLine(const T &start, const T &stop, TypeSet< T > &output, const T &step)
const float dirlen_
Definition: rcollinebuilder.h:42
float distToLine(const T &) const
Definition: rcollinebuilder.h:111
Creates a line in RowCol space.
Definition: rcollinebuilder.h:28
#define mClass(module)
Definition: commondefs.h:164
TypeSet< T > & line_
Definition: rcollinebuilder.h:43