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

mlib::NDCZpt_list Class Reference
["NDCZ" Coordinate System]

A list of points in NDCZ coordinates. More...

#include <points.H>

Inheritance diagram for mlib::NDCZpt_list:

Inheritance graph
[legend]
Collaboration diagram for mlib::NDCZpt_list:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ARRAY (int m=0)
 ARRAY (CARRAY< NDCZpt > &l)
int num () const
bool empty () const
bool valid_index (int k) const
void set_unique ()
NDCZptarray ()
NDCZptoperator[] (int j) const
NDCZptlast () const
NDCZptfirst () const
void begin_index ()
void end_index ()
bool is_indexing () const
virtual void clear ()
virtual void truncate (int n)
virtual void realloc (int new_max=0)
virtual int get_index (const NDCZpt &el) const
bool contains (const NDCZpt &el) const
bool add_uniquely (const NDCZpt &el)
void operator+= (const NDCZpt &el)
ARRAY< NDCZpt > & operator+= (CARRAY< NDCZpt > &b)
void add (const NDCZpt &p)
void push (const NDCZpt &p)
void insert (int ind, int num)
bool remove (int k)
bool operator-= (const NDCZpt &el)
void operator-= (CARRAY< NDCZpt > &l)
bool rem (const NDCZpt &p)
NDCZpt pop ()
bool pull_index (int k)
bool pull_element (const NDCZpt &p)
virtual void shift (int p)
ARRAY< NDCZptextract (int start, int n) const
virtual void reverse ()
virtual void sort (compare_func_t compare)
Constructors
 NDCZpt_list (int max=0)
 NDCZpt_list (const ARRAY< NDCZpt > &p)
Segment Accessor Functions
NDCZvec segment (int i) const
double segment_length (int i) const
 Gets the length of the ith segment.
NDCZvec xy_seg (int i) const
 Return segment i with 0 depth component:.
double xy_len (int i) const
Interpolation Functions
void interpolate_length (double s, int &seg, double &t) const
 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.
NDCZpt interpolate (double s, NDCZvec *tan=0, int *segp=0, double *tp=0) const
 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:.
Length Functions
void update_length ()
 This function must be called for interpolation routines to work.
double partial_length (int i) const
double length () const
Misc. Functions
NDCZvec tan (int i) const
NDCZpt average () const

Protected Member Functions

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

Protected Attributes

ARRAY< double > _partial_length
NDCZpt_array
int _num
int _max
bool _unique
bool _do_index

Detailed Description

A list of points in NDCZ coordinates.

Remarks:
This class is very similar to the Pointlist class. However, there are some fundamental differences in how it handles distances. Specifically, it measures distances in 2D (XY) coordinates, rather than 3D (XY + depth) coordinates. Because NDCZpt is based on the Point3 class, the Pointlist class can't be used as a base because that would force distances to be computed in 3D rather than the desired 2D. Hence, a good chunk of the functional from Pointlist is duplicates here.

Definition at line 793 of file points.H.


Constructor & Destructor Documentation

mlib::NDCZpt_list::NDCZpt_list int  max = 0  )  [inline]
 

Definition at line 804 of file points.H.

mlib::NDCZpt_list::NDCZpt_list const ARRAY< NDCZpt > &  p  )  [inline]
 

Definition at line 805 of file points.H.


Member Function Documentation

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

Definition at line 306 of file support.H.

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

Definition at line 289 of file support.H.

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

Definition at line 154 of file support.H.

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

Definition at line 189 of file support.H.

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

Definition at line 177 of file support.H.

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

Definition at line 173 of file support.H.

NDCZpt mlib::NDCZpt_list::average  )  const [inline]
 

Definition at line 879 of file points.H.

References ARRAY< NDCZpt >::num().

Referenced by XToonTexture::draw(), and ToonTexture_1D::draw().

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

Definition at line 206 of file support.H.

virtual void ARRAY< NDCZpt >::clear void   )  [inline, virtual, inherited]
 

Definition at line 224 of file support.H.

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

Definition at line 143 of file support.H.

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

Definition at line 137 of file support.H.

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

Definition at line 146 of file support.H.

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

Definition at line 283 of file support.H.

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

Definition at line 185 of file support.H.

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

Definition at line 213 of file support.H.

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

Definition at line 417 of file support.H.

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

Definition at line 198 of file support.H.

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

Definition at line 275 of file support.H.

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

Definition at line 319 of file support.H.

NDCZpt mlib::NDCZpt_list::interpolate double  s,
NDCZvec tan = 0,
int *  segp = 0,
double *  tp = 0
const
 

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:.

Note:
Progress along the polyline is measured just in X and Y, not Z.

Definition at line 378 of file points.C.

References ARRAY< NDCZpt >::_array, interpolate_length(), and mlib::Vec3< V >::normalized().

void mlib::NDCZpt_list::interpolate_length double  s,
int &  seg,
double &  t
const
 

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.

Note:
Progress along the polyline is measured just in X and Y, not Z.

Definition at line 392 of file points.C.

References ARRAY< NDCZpt >::_num, _partial_length, length(), and ARRAY< T >::num().

Referenced by interpolate().

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

Definition at line 219 of file support.H.

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

Definition at line 194 of file support.H.

double mlib::NDCZpt_list::length  )  const [inline]
 

Definition at line 868 of file points.H.

References _partial_length, ARRAY< T >::empty(), and ARRAY< T >::last().

Referenced by interpolate_length().

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

Definition at line 184 of file support.H.

Referenced by average(), and tan().

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

Definition at line 431 of file support.H.

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

Definition at line 298 of file support.H.

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

Definition at line 451 of file support.H.

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

Definition at line 352 of file support.H.

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

Definition at line 190 of file support.H.

double mlib::NDCZpt_list::partial_length int  i  )  const [inline]
 

Definition at line 864 of file points.H.

References _partial_length, and ARRAY< T >::valid_index().

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

Definition at line 357 of file support.H.

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

Definition at line 383 of file support.H.

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

Definition at line 366 of file support.H.

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

Definition at line 309 of file support.H.

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

Definition at line 252 of file support.H.

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

Definition at line 353 of file support.H.

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

Definition at line 333 of file support.H.

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

Definition at line 457 of file support.H.

NDCZvec mlib::NDCZpt_list::segment int  i  )  const [inline]
 

Gets a vector pointing from the start point to the end point of the ith segment.

Definition at line 814 of file points.H.

References ARRAY< NDCZpt >::_array.

Referenced by segment_length(), and xy_seg().

double mlib::NDCZpt_list::segment_length int  i  )  const [inline]
 

Gets the length of the ith segment.

Definition at line 816 of file points.H.

References mlib::Vec3< V >::length(), and segment().

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

Definition at line 136 of file support.H.

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

Definition at line 187 of file support.H.

virtual void ARRAY< NDCZpt >::shift int  p  )  [inline, virtual, inherited]
 

Definition at line 389 of file support.H.

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

Definition at line 468 of file support.H.

NDCZvec mlib::NDCZpt_list::tan int  i  )  const
 

Definition at line 366 of file points.C.

References ARRAY< NDCZpt >::_array, and ARRAY< NDCZpt >::num().

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

Definition at line 234 of file support.H.

void mlib::NDCZpt_list::update_length  )  [inline]
 

This function must be called for interpolation routines to work.

Note:
Policy on measuring length: we ignore the z component.

Definition at line 853 of file points.H.

References ARRAY< NDCZpt >::_num, _partial_length, ARRAY< T >::clear(), ARRAY< T >::realloc(), and xy_len().

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

Definition at line 186 of file support.H.

double mlib::NDCZpt_list::xy_len int  i  )  const [inline]
 

Definition at line 824 of file points.H.

References mlib::Vec3< V >::length(), and xy_seg().

Referenced by update_length().

NDCZvec mlib::NDCZpt_list::xy_seg int  i  )  const [inline]
 

Return segment i with 0 depth component:.

Definition at line 819 of file points.H.

References segment().

Referenced by xy_len().


Member Data Documentation

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

Definition at line 121 of file support.H.

Referenced by interpolate(), segment(), and tan().

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

Definition at line 125 of file support.H.

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

Definition at line 123 of file support.H.

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

Definition at line 122 of file support.H.

Referenced by interpolate_length(), and update_length().

ARRAY<double> mlib::NDCZpt_list::_partial_length [protected]
 

Definition at line 797 of file points.H.

Referenced by interpolate_length(), length(), partial_length(), and update_length().

bool ARRAY< NDCZpt >::_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:18 2006 for jot by  doxygen 1.4.4