Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

mlib::Pointlist< L, P, V, S > Class Template Reference
[MLIB]

A class containing a list of points. Contains functions to aid in using this list of points as a piecewise continuous curve in some coordinate system.

Pointlist is designed to be the base class for more specific types of lists of points. Specifically, lists of points with different numbers of dimensions. The template argument L is the type of the derived point list class. This allows the Pointlist to return new lists of the same type as the derived class. The template arguments P, V, and S are the types of the corresponding point, vector and line classes (respectively) for the derived class. More...

#include <pointlist.H>

Inheritance diagram for mlib::Pointlist< L, P, V, S >:

Inheritance graph
[legend]
Collaboration diagram for mlib::Pointlist< L, P, V, S >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ARRAY (int m=0)
 ARRAY (CARRAY< P > &l)
int num () const
bool empty () const
bool valid_index (int k) const
void set_unique ()
P * array ()
P & operator[] (int j) const
P & last () const
P & first () const
void begin_index ()
void end_index ()
bool is_indexing () const
virtual void truncate (int n)
virtual void realloc (int new_max=0)
virtual int get_index (const P &el) const
bool contains (const P &el) const
bool add_uniquely (const P &el)
void operator+= (const P &el)
ARRAY< P > & operator+= (CARRAY< P > &b)
void add (const P &p)
void push (const P &p)
void insert (int ind, int num)
bool remove (int k)
bool operator-= (const P &el)
void operator-= (CARRAY< P > &l)
bool rem (const P &p)
pop ()
bool pull_index (int k)
bool pull_element (const P &p)
ARRAY< P > extract (int start, int n) const
virtual void reverse ()
virtual void sort (compare_func_t compare)
Constructors
 Pointlist (int m=16)
 Construct a list with no points but space for m points.
 Pointlist (const ARRAY< P > &p)
 Construct a list using the passed in array of points.

Protected Member Functions

virtual void set_index (const P &, int) const
virtual void clear_index (const P &) const
virtual void clear_ele (int)
virtual void clear_range (int i, int j)
virtual void append_ele (const P &el)

Protected Attributes

ARRAY< double > _partial_length
P * _array
int _num
int _max
bool _unique
bool _do_index

Detailed Description

template<class L, class P, class V, class S>
class mlib::Pointlist< L, P, V, S >

A class containing a list of points. Contains functions to aid in using this list of points as a piecewise continuous curve in some coordinate system.

Pointlist is designed to be the base class for more specific types of lists of points. Specifically, lists of points with different numbers of dimensions. The template argument L is the type of the derived point list class. This allows the Pointlist to return new lists of the same type as the derived class. The template arguments P, V, and S are the types of the corresponding point, vector and line classes (respectively) for the derived class.

Definition at line 31 of file pointlist.H.


Constructor & Destructor Documentation

template<class L, class P, class V, class S>
mlib::Pointlist< L, P, V, S >::Pointlist int  m = 16  )  [inline]
 

Construct a list with no points but space for m points.

Definition at line 43 of file pointlist.H.

template<class L, class P, class V, class S>
mlib::Pointlist< L, P, V, S >::Pointlist const ARRAY< P > &  p  )  [inline]
 

Construct a list using the passed in array of points.

Definition at line 46 of file pointlist.H.


Member Function Documentation

void ARRAY< P >::add const P &  p  )  [inline, inherited]
 

Definition at line 306 of file support.H.

Referenced by mlib::PIXEL_list::operator=(), and mlib::NDCpt_list::operator=().

bool ARRAY< P >::add_uniquely const P &  el  )  [inline, inherited]
 

Definition at line 289 of file support.H.

template<class L, class P, class V, class S>
MLIB_INLINE void mlib::Pointlist< L, P, V, S >::append Pointlist< L, P, V, S > *  poly  ) 
 

Appends all the points in poly onto the list.

Definition at line 542 of file pointlist.C.

References ARRAY< P >::operator+=().

virtual void ARRAY< P >::append_ele const P &  el  )  [inline, protected, virtual, inherited]
 

Definition at line 154 of file support.H.

P * ARRAY< P >::array  )  [inline, inherited]
 

Definition at line 189 of file support.H.

ARRAY< P >::ARRAY CARRAY< P > &  l  )  [inline, inherited]
 

Definition at line 177 of file support.H.

ARRAY< P >::ARRAY int  m = 0  )  [inline, inherited]
 

Definition at line 173 of file support.H.

template<class L, class P, class V, class S>
P mlib::Pointlist< L, P, V, S >::average  )  const [inline]
 

Computes the average of all the point sin the list.

Definition at line 130 of file pointlist.H.

Referenced by GESTURE::center(), Bvert_list::center(), mlib::Wpt_list::get_best_fit_plane(), GESTURE::is_ellipse(), and mlib::Pointlist< L, P, V, S >::spread().

template<class L, class P, class V, class S>
MLIB_INLINE double mlib::Pointlist< L, P, V, S >::avg_dist_to_seg const P &  p,
int  k
const
 

Computes the averge distance from point p to segment k in the list over the length of segment k.

Definition at line 216 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::length(), and ARRAY< P >::num().

template<class L, class P, class V, class S>
double mlib::Pointlist< L, P, V, S >::avg_len  )  const [inline]
 

Definition at line 170 of file pointlist.H.

void ARRAY< P >::begin_index  )  [inline, inherited]
 

Definition at line 206 of file support.H.

template<class L, class P, class V, class S>
virtual void mlib::Pointlist< L, P, V, S >::clear void   )  [inline, virtual]
 

Reimplemented from ARRAY< P >.

Definition at line 230 of file pointlist.H.

Referenced by BMESH::_merge(), UVMapping::add_face(), BMESH::changed(), LINE3D::clear(), mlib::PIXEL_list::operator=(), mlib::NDCpt_list::operator=(), BBOX::points(), mlib::Pointlist< L, P, V, S >::prepend(), mlib::Wpt_list::project(), mlib::PIXEL_list::project_to_plane(), mlib::NDCpt_list::project_to_plane(), mlib::XYpt_list::project_to_plane(), ELLIPSE::rebuild(), mlib::EDGElist::reset(), BODY::triangulate(), and BMESH::triangulate().

virtual void ARRAY< P >::clear_ele int   )  [inline, protected, virtual, inherited]
 

Definition at line 143 of file support.H.

virtual void ARRAY< P >::clear_index const P &   )  const [inline, protected, virtual, inherited]
 

Definition at line 137 of file support.H.

virtual void ARRAY< P >::clear_range int  i,
int  j
[inline, protected, virtual, inherited]
 

Definition at line 146 of file support.H.

template<class L, class P, class V, class S>
MLIB_INLINE L mlib::Pointlist< L, P, V, S >::clone_piece int  k1,
int  k2
const
 

Make a copy of the point list from point k1 to point k2.

Parameters:
[in] k1 Index of first vertex.
[in] k2 Index of last vertex.
Warning:
Allocates memory for the copied list. Presumably the caller is responsible for deallocating this memory (using delete).

Definition at line 511 of file pointlist.C.

References ARRAY< P >::num(), and ARRAY< P >::valid_index().

template<class L, class P, class V, class S>
MLIB_INLINE P mlib::Pointlist< L, P, V, S >::closest const P &  p  )  const
 

Definition at line 175 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::closest(), and mlib::Pointlist< L, P, V, S >::dist().

template<class L, class P, class V, class S>
MLIB_INLINE double mlib::Pointlist< L, P, V, S >::closest const P &  p,
P &  ,
int & 
const
 

Definition at line 151 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::closest(), mlib::Pointlist< L, P, V, S >::length(), and ARRAY< P >::num().

template<class L, class P, class V, class S>
MLIB_INLINE void mlib::Pointlist< L, P, V, S >::closest const P &  p,
P &  nearpt,
double &  neardist,
int &  seg_index
const
 

Computes everything about the point on the line closest to p.

Returns:
the point, its distance to the line, and the index of the point that starts its segment. (that is, the point is on the line segment between points [seg_index] and [seg_index+1])

Definition at line 112 of file pointlist.C.

References ARRAY< P >::empty(), err_msg(), mlib::nearest_pt_to_line_seg(), and ARRAY< P >::num().

Referenced by mlib::Pointlist< L, P, V, S >::closest(), mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::dist(), mlib::Pointlist< L, P, V, S >::invert(), and trim_endpt_overlap().

bool ARRAY< P >::contains const P &  el  )  const [inline, inherited]
 

Reimplemented in mlib::Point2list< L, P, V, S >.

Definition at line 283 of file support.H.

template<class L, class P, class V, class S>
double mlib::Pointlist< L, P, V, S >::dist const P &  p  )  const [inline]
 

Distance of the point to the nearest point on the polyline.

Definition at line 141 of file pointlist.H.

Referenced by ELLIPSE::avg_dist(), mlib::Pointlist< L, P, V, S >::closest(), mlib::Pointlist< L, P, V, S >::nearest_point(), and GESTURE::radius().

template<class L, class P, class V, class S>
MLIB_INLINE double mlib::Pointlist< L, P, V, S >::dist_to_seg const P &  p,
int  k
const
 

Computes the distance from point p to the nearest point on segment k in the list.

Definition at line 203 of file pointlist.C.

References mlib::nearest_pt_to_line_seg(), and ARRAY< P >::num().

bool ARRAY< P >::empty  )  const [inline, inherited]
 

Definition at line 185 of file support.H.

Referenced by mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::average(), mlib::Pointlist< L, P, V, S >::closest(), mlib::Pointlist< L, P, V, S >::interpolate(), mlib::Pointlist< L, P, V, S >::interpolate_length(), mlib::Pointlist< L, P, V, S >::max_val(), mlib::Pointlist< L, P, V, S >::min_val(), mlib::Wpt_list::project(), mlib::PIXEL_list::project_to_plane(), mlib::NDCpt_list::project_to_plane(), mlib::XYpt_list::project_to_plane(), and mlib::Pointlist< L, P, V, S >::spread().

void ARRAY< P >::end_index  )  [inline, inherited]
 

Definition at line 213 of file support.H.

ARRAY<P > ARRAY< P >::extract int  start,
int  n
const [inline, inherited]
 

Definition at line 417 of file support.H.

P & ARRAY< P >::first  )  const [inline, inherited]
 

Definition at line 198 of file support.H.

Referenced by mlib::Point2list< L, P, V, S >::fix_endpoints().

virtual int ARRAY< P >::get_index const P &  el  )  const [inline, virtual, inherited]
 

Definition at line 275 of file support.H.

template<class L, class P, class V, class S>
MLIB_INLINE V mlib::Pointlist< L, P, V, S >::get_tangent double  s  )  const
 

Computes the interpolated tangent at s on the polyline.

Definition at line 413 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::interpolate_length(), ARRAY< P >::num(), and mlib::Pointlist< L, P, V, S >::seg().

void ARRAY< P >::insert int  ind,
int  num
[inline, inherited]
 

Definition at line 319 of file support.H.

template<class L, class P, class V, class S>
MLIB_INLINE P mlib::Pointlist< L, P, V, S >::interpolate double  s,
V *  tan = 0,
int *  segp = 0,
double *  tp = 0
const
 

Computes interpolated values over the polyline.

Given interpolation parameter s varying from 0 to 1 along the polyline, return the corresponding point, and optionally the tangent, segment index, and segment paramter there.

Parameters:
[in] s Interpolation parameter. Varies from 0 to 1 (0 is the begining of the line and 1 is the end).
[out] tan Tanget of segment segp (pass NULL if you don't want it).
[out] segp Index of the segment that contains the interpolated position at s (pass NULL if you don't want it).
[out] tp Parameter varying from 0 to 1 representing the corresponding position of s on the segment segp (pass NULL if you don't want it).
Returns:
The interpolated point along on the polyline at s.

Definition at line 322 of file pointlist.C.

References ARRAY< P >::empty(), mlib::Pointlist< L, P, V, S >::interpolate_length(), and mlib::Pointlist< L, P, V, S >::seg().

Referenced by get_section(), LINE3D::point(), mlib::Pointlist< L, P, V, S >::resample(), GESTURE::startup_time(), and trim_endpt_overlap().

template<class L, class P, class V, class S>
MLIB_INLINE void mlib::Pointlist< L, P, V, S >::interpolate_length double  s,
int &  seg,
double &  t
const
 

Finds the segment containing the interpolation paramenter s and the position of s within that segment (as a parameter between 0 and 1).

Parameter s should lie in the range [0,1]. Returns the corresponding segment index, and the paramter t varying from 0 to 1 along that segment.

Parameters:
[in] s Interpolation parameter. Varies from 0 to 1 (0 is the begining of the line and 1 is the end).
[out] seg Index of the segment that contains the interpolated position at s.
[out] t Parameter varying from 0 to 1 representing the corresponding position of s on the segment seg.

Definition at line 363 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::_partial_length, ARRAY< P >::empty(), ARRAY< T >::last(), ARRAY< P >::num(), and ARRAY< T >::num().

Referenced by mlib::Pointlist< L, P, V, S >::get_tangent(), mlib::Pointlist< L, P, V, S >::interpolate(), and GESTURE::winding().

template<class L, class P, class V, class S>
MLIB_INLINE double mlib::Pointlist< L, P, V, S >::invert const P &  p,
int  seg
const
 

Definition at line 469 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::_partial_length, and mlib::Pointlist< L, P, V, S >::length().

template<class L, class P, class V, class S>
MLIB_INLINE double mlib::Pointlist< L, P, V, S >::invert const P &  p  )  const
 

Definition at line 455 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::closest().

template<class L, class P, class V, class S>
bool mlib::Pointlist< L, P, V, S >::is_closed  )  const [inline]
 

It's considered a closed loop if the first and last point are the same.

Definition at line 88 of file pointlist.H.

Referenced by mlib::Pointlist< L, P, V, S >::self_intersects().

bool ARRAY< P >::is_indexing  )  const [inline, inherited]
 

Definition at line 219 of file support.H.

template<class L, class P, class V, class S>
MLIB_INLINE bool mlib::Pointlist< L, P, V, S >::is_straight double  len_scale = 1e-5  )  const
 

Returns true if the points fall in a straight line.

len_scale * length() gives the threshold for how close points have to be to the proposed straight line to be accepted.

Definition at line 20 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::_partial_length, mlib::Pointlist< L, P, V, S >::length(), ARRAY< T >::num(), ARRAY< P >::num(), and mlib::Pointlist< L, P, V, S >::pt().

P & ARRAY< P >::last  )  const [inline, inherited]
 

Definition at line 194 of file support.H.

Referenced by mlib::Point3list< L, M, P, V, S >::fix_endpoints(), mlib::Point2list< L, P, V, S >::fix_endpoints(), mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::is_closed(), and mlib::Pointlist< L, P, V, S >::resample().

template<class L, class P, class V, class S>
double mlib::Pointlist< L, P, V, S >::length  )  const [inline]
 

Definition at line 168 of file pointlist.H.

Referenced by mlib::Pointlist< L, P, V, S >::avg_dist_to_seg(), mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::avg_len(), mlib::Pointlist< L, P, V, S >::closest(), mlib::Wpt_list::get_plane(), mlib::Pointlist< L, P, V, S >::invert(), mlib::Pointlist< L, P, V, S >::is_straight(), LINE3D::length(), GESTURE::length(), mlib::Point2list< L, P, V, S >::ray_intersect(), and GESTURE::winding().

template<class L, class P, class V, class S>
P::value_type mlib::Pointlist< L, P, V, S >::max_val int  i  )  const
 

Returns the max value, over the polyline, for the given component i.

Components are numbered starting at 0 and are in the same order that they are accessed throught the subscripting operator for the polyline's point type.

Definition at line 271 of file pointlist.C.

References ARRAY< P >::empty(), err_msg(), max(), ARRAY< P >::num(), and mlib::Pointlist< L, P, V, S >::pt().

template<class L, class P, class V, class S>
P::value_type mlib::Pointlist< L, P, V, S >::min_val int  i  )  const
 

Returns the min value, over the polyline, for the given component i.

Components are numbered starting at 0 and are in the same order that they are accessed throught the subscripting operator for the polyline's point type.

Definition at line 251 of file pointlist.C.

References ARRAY< P >::empty(), err_msg(), min(), ARRAY< P >::num(), and mlib::Pointlist< L, P, V, S >::pt().

template<class L, class P, class V, class S>
MLIB_INLINE int mlib::Pointlist< L, P, V, S >::nearest_point const P &  p  )  const
 

Finds the index of the nearest point in the point list to point p.

Definition at line 85 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::dist(), and ARRAY< P >::num().

int ARRAY< P >::num  )  const [inline, inherited]
 

Definition at line 184 of file support.H.

Referenced by mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::average(), mlib::Pointlist< L, P, V, S >::avg_dist_to_seg(), mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::avg_len(), mlib::Pointlist< L, P, V, S >::clone_piece(), mlib::Pointlist< L, P, V, S >::closest(), mlib::Point2list< L, P, V, S >::contains(), mlib::Pointlist< L, P, V, S >::dist_to_seg(), mlib::Point3list< L, M, P, V, S >::fix_endpoints(), mlib::Point2list< L, P, V, S >::fix_endpoints(), mlib::Pointlist< L, P, V, S >::get_tangent(), mlib::Pointlist< L, P, V, S >::interpolate_length(), mlib::Point2list< L, P, V, S >::intersects_line(), mlib::Point2list< L, P, V, S >::intersects_seg(), mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::is_closed(), mlib::Pointlist< L, P, V, S >::is_straight(), mlib::Pointlist< L, P, V, S >::max_val(), mlib::Pointlist< L, P, V, S >::min_val(), mlib::Pointlist< L, P, V, S >::nearest_point(), mlib::Pointlist< L, P, V, S >::prepend(), mlib::PIXEL_list::project_to_plane(), mlib::NDCpt_list::project_to_plane(), mlib::XYpt_list::project_to_plane(), mlib::Point2list< L, P, V, S >::ray_intersect(), mlib::Pointlist< L, P, V, S >::self_intersects(), mlib::Pointlist< L, P, V, S >::spread(), mlib::Pointlist< L, P, V, S >::sum(), mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::tan(), mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::translate(), mlib::Pointlist< L, P, V, S >::update_length(), mlib::Point3list< L, M, P, V, S >::winding_number(), mlib::Point2list< L, P, V, S >::winding_number(), and mlib::Point3list< L, M, P, V, S >::xform().

ARRAY<P >& ARRAY< P >::operator+= CARRAY< P > &  b  )  [inline, inherited]
 

Definition at line 431 of file support.H.

void ARRAY< P >::operator+= const P &  el  )  [inline, inherited]
 

Definition at line 298 of file support.H.

Referenced by mlib::Pointlist< L, P, V, S >::append().

void ARRAY< P >::operator-= CARRAY< P > &  l  )  [inline, inherited]
 

Definition at line 451 of file support.H.

bool ARRAY< P >::operator-= const P &  el  )  [inline, inherited]
 

Definition at line 352 of file support.H.

P & ARRAY< P >::operator[] int  j  )  const [inline, inherited]
 

Definition at line 190 of file support.H.

template<class L, class P, class V, class S>
double mlib::Pointlist< L, P, V, S >::partial_length int  i  )  const [inline]
 

Net length along the polyline at vertex i.

Definition at line 164 of file pointlist.H.

P ARRAY< P >::pop  )  [inline, inherited]
 

Definition at line 357 of file support.H.

template<class L, class P, class V, class S>
MLIB_INLINE void mlib::Pointlist< L, P, V, S >::prepend Pointlist< L, P, V, S > *  poly  ) 
 

Prepends all the points in poly onto the list.

Definition at line 552 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::clear(), and ARRAY< P >::num().

template<class L, class P, class V, class S>
P mlib::Pointlist< L, P, V, S >::pt int  i  )  const [inline]
 

Get the ith point in the list.

Definition at line 56 of file pointlist.H.

Referenced by mlib::Point2list< L, P, V, S >::intersects_line(), mlib::Pointlist< L, P, V, S >::is_straight(), mlib::Pointlist< L, P, V, S >::max_val(), mlib::Pointlist< L, P, V, S >::min_val(), mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::seg(), mlib::Point3list< L, M, P, V, S >::winding_number(), and mlib::Point2list< L, P, V, S >::winding_number().

bool ARRAY< P >::pull_element const P &  p  )  [inline, inherited]
 

Definition at line 383 of file support.H.

bool ARRAY< P >::pull_index int  k  )  [inline, inherited]
 

Definition at line 366 of file support.H.

void ARRAY< P >::push const P &  p  )  [inline, inherited]
 

Definition at line 309 of file support.H.

virtual void ARRAY< P >::realloc int  new_max = 0  )  [inline, virtual, inherited]
 

Definition at line 252 of file support.H.

bool ARRAY< P >::rem const P &  p  )  [inline, inherited]
 

Definition at line 353 of file support.H.

bool ARRAY< P >::remove int  k  )  [inline, inherited]
 

Definition at line 333 of file support.H.

template<class L, class P, class V, class S>
MLIB_INLINE void mlib::Pointlist< L, P, V, S >::resample int  num_segs  ) 
 

Resample with the desired number of segments:.

Definition at line 486 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::interpolate(), ARRAY< P >::last(), and mlib::Pointlist< L, P, V, S >::update_length().

virtual void ARRAY< P >::reverse  )  [inline, virtual, inherited]
 

Definition at line 457 of file support.H.

template<class L, class P, class V, class S>
S mlib::Pointlist< L, P, V, S >::seg int  i  )  const [inline]
 

Get the ith segment in the list.

Definition at line 65 of file pointlist.H.

Referenced by mlib::Pointlist< L, P, V, S >::get_tangent(), mlib::Pointlist< L, P, V, S >::interpolate(), mlib::Point2list< L, P, V, S >::intersects_seg(), and mlib::Pointlist< L, P, V, S >::self_intersects().

template<class L, class P, class V, class S>
double mlib::Pointlist< L, P, V, S >::segment_length int  i  )  const [inline]
 

Get the length of the ith segment in the list.

Definition at line 62 of file pointlist.H.

Referenced by mlib::Pointlist< L, P, V, S >::update_length().

template<class L, class P, class V, class S>
MLIB_INLINE bool mlib::Pointlist< L, P, V, S >::self_intersects  )  const
 

Does O(n^2) check to see if any segment of the polyline intersects any other, not counting adjacent segments of course.

Definition at line 63 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::is_closed(), j, ARRAY< P >::num(), and mlib::Pointlist< L, P, V, S >::seg().

Referenced by GESTURE::self_intersects().

virtual void ARRAY< P >::set_index const P &  ,
int 
const [inline, protected, virtual, inherited]
 

Definition at line 136 of file support.H.

void ARRAY< P >::set_unique  )  [inline, inherited]
 

Definition at line 187 of file support.H.

template<class L, class P, class V, class S>
virtual void mlib::Pointlist< L, P, V, S >::shift int  p  )  [inline, virtual]
 

Reimplemented from ARRAY< P >.

Definition at line 235 of file pointlist.H.

virtual void ARRAY< P >::sort compare_func_t  compare  )  [inline, virtual, inherited]
 

Definition at line 468 of file support.H.

template<class L, class P, class V, class S>
MLIB_INLINE double mlib::Pointlist< L, P, V, S >::spread  )  const
 

Max distance of any point to average().

Definition at line 227 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::average(), ARRAY< P >::empty(), max(), and ARRAY< P >::num().

Referenced by GESTURE::spread().

template<class L, class P, class V, class S>
MLIB_INLINE P mlib::Pointlist< L, P, V, S >::sum  )  const
 

Computes the sum of all the points in the list.

Definition at line 191 of file pointlist.C.

References ARRAY< P >::num().

Referenced by mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::average(), and Bvert_list::sum().

template<class L, class P, class V, class S>
V mlib::Pointlist< L, P, V, S >::tan int  i  )  const [inline]
 

Returns a "tangent" direction at each vertex.

At the endpoints it is the direction of the ending segment. At internal vertices it is the average of the two segment directions.

Definition at line 72 of file pointlist.H.

Referenced by LINE3D::tangent().

template<class L, class P, class V, class S>
void mlib::Pointlist< L, P, V, S >::translate const V &  vec  )  [inline]
 

Translate all points in polyline by given vector.

Parameters:
[in] vec Vector that represents translation to be applied.

Definition at line 205 of file pointlist.H.

Referenced by mlib::Point2list< L, P, V, S >::fix_endpoints().

virtual void ARRAY< P >::truncate int  n  )  [inline, virtual, inherited]
 

Definition at line 234 of file support.H.

template<class L, class P, class V, class S>
MLIB_INLINE void mlib::Pointlist< L, P, V, S >::update_length  ) 
 

This must be called before the interpolation routines can work properly.

Definition at line 288 of file pointlist.C.

References mlib::Pointlist< L, P, V, S >::_partial_length, ARRAY< T >::clear(), ERR_LEV_SPAM, err_mesg(), ARRAY< T >::last(), ARRAY< P >::num(), ARRAY< T >::realloc(), and mlib::Pointlist< L, P, V, S >::segment_length().

Referenced by GESTURE::add(), mlib::Point2list< L, P, V, S >::fix_endpoints(), get_section(), mlib::NDCpt_list::NDCpt_list(), mlib::PIXEL_list::operator=(), mlib::NDCpt_list::operator=(), mlib::PIXEL_list::PIXEL_list(), mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::Pointlist(), mlib::PIXEL_list::project_to_plane(), mlib::NDCpt_list::project_to_plane(), mlib::XYpt_list::project_to_plane(), Bvert_list::pts(), mlib::Pointlist< L, P, V, S >::resample(), mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::shift(), mlib::Wpt_list::Wpt_list(), Bvert_list::wpts(), and mlib::Point3list< L, M, P, V, S >::xform().

bool ARRAY< P >::valid_index int  k  )  const [inline, inherited]
 

Definition at line 186 of file support.H.

Referenced by mlib::Pointlist< L, P, V, S >::clone_piece().

template<class L, class P, class V, class S>
V mlib::Pointlist< L, P, V, S >::vec int  i  )  const [inline]
 

Get the vector from the ith point in the list to the (i + 1)th point in the list.

Definition at line 59 of file pointlist.H.

Referenced by mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::segment_length(), and mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::tan().


Member Data Documentation

P * ARRAY< P >::_array [protected, inherited]
 

Definition at line 121 of file support.H.

Referenced by mlib::Wpt_list::closest_vertex(), mlib::Wpt_list::get_best_fit_plane(), mlib::Wpt_list::get_plane(), mlib::Wpt_list::project(), mlib::PIXEL_list::project_to_plane(), mlib::NDCpt_list::project_to_plane(), and mlib::XYpt_list::project_to_plane().

bool ARRAY< P >::_do_index [protected, inherited]
 

Definition at line 125 of file support.H.

int ARRAY< P >::_max [protected, inherited]
 

Definition at line 123 of file support.H.

int ARRAY< P >::_num [protected, inherited]
 

Definition at line 122 of file support.H.

Referenced by mlib::Wpt_list::closest_vertex(), mlib::Wpt_list::get_best_fit_plane(), mlib::Wpt_list::get_plane(), mlib::Wpt_list::project(), mlib::PIXEL_list::project_to_plane(), mlib::NDCpt_list::project_to_plane(), and mlib::XYpt_list::project_to_plane().

template<class L, class P, class V, class S>
ARRAY<double> mlib::Pointlist< L, P, V, S >::_partial_length [protected]
 

Definition at line 35 of file pointlist.H.

Referenced by mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::clear(), mlib::Wpt_list::get_plane(), mlib::Pointlist< L, P, V, S >::interpolate_length(), mlib::Pointlist< L, P, V, S >::invert(), mlib::Pointlist< L, P, V, S >::is_straight(), mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::length(), mlib::Pointlist< NDCpt_list, NDCpt, NDCvec, NDCline >::partial_length(), and mlib::Pointlist< L, P, V, S >::update_length().

bool ARRAY< P >::_unique [protected, inherited]
 

Definition at line 124 of file support.H.


The documentation for this class was generated from the following files:
Generated on Mon Sep 18 11:48:12 2006 for jot by  doxygen 1.4.4