Files Classes Functions Hierarchy
#include <linechopped.h>
Public Types | |
| typedef list< pointindexed < point2< PD >, INDX > >::iterator | listiter |
Public Member Functions | |
| linechoppedindexed (line< PT, PD > const &ln_, pointindexed< point2< PD >, INDX > const &seg) | |
| Pass in an initial line segment. | |
| boolc | split (listiter &posnew, listiter pos, line< PT, PD > const &L2) |
| Split into two segments. | |
Public Attributes | |
| line< PT, PD > | ln |
| The line. | |
| list< pointindexed< point2< PD > , INDX > > | chain |
| Chain segments. | |
Definition at line 90 of file linechopped.h.
| typedef list< pointindexed< point2<PD>, INDX > >::iterator linechoppedindexed< PT, PD, INDX >::listiter |
Definition at line 110 of file linechopped.h.
| linechoppedindexed< PT, PD, INDX >::linechoppedindexed | ( | line< PT, PD > const & | ln_, | |
| pointindexed< point2< PD >, INDX > const & | seg | |||
| ) | [inline] |
Pass in an initial line segment.
Definition at line 102 of file linechopped.h.
References linechoppedindexed< PT, PD, INDX >::chain.
| boolc linechoppedindexed< PT, PD, INDX >::split | ( | listiter & | posnew, | |
| listiter | pos, | |||
| line< PT, PD > const & | L2 | |||
| ) | [inline] |
Split into two segments.
The order is maintained.
Definition at line 168 of file linechopped.h.
References solver< T >::d2linearequ(), line< PT, PD >::nml, and line< PT, PD >::pos.
00173 { 00174 bool res; 00175 point2<PD> t; 00176 res = solver<PD>::d2linearequ 00177 (t,ln.nml,L2.nml*((PD)-1.0), L2.pos - ln.pos); 00178 00179 if (res==false) 00180 return false; 00181 00182 PD t0(t[0]); 00183 00184 if (t0<(*pos).pt[0]) 00185 return false; 00186 00187 if (t0>(*pos).pt[1]) 00188 return false; 00189 00190 PD k0((*pos).pt[0]); 00191 (*pos).pt[0] = t0; 00192 00193 posnew = chain.insert(pos,pointindexed< point2<PD>, INDX >( point2<PD>(k0,t0),0)); 00194 00195 return true; 00196 }
| list< pointindexed< point2<PD>, INDX> > linechoppedindexed< PT, PD, INDX >::chain |
Chain segments.
Definition at line 98 of file linechopped.h.
Referenced by bsptreeD2< PT, PD, INDX >::find(), and linechoppedindexed< PT, PD, INDX >::linechoppedindexed().
| line<PT,PD> linechoppedindexed< PT, PD, INDX >::ln |
The line.
Definition at line 95 of file linechopped.h.
Referenced by bsptreeD2< PT, PD, INDX >::find().
1.5.8