Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
VTBackTrackC::VTBackTrackC(void)
VTBackTrackC::VTBackTrackC(const VTBackTrackC &)
VTBackTrackC::operator=(const VTBackTrackC &)
VTBackTrackC::~VTBackTrackC(void)
VTBackTrackC::SetFlags(BooleanT,BooleanT,BooleanT)
VTBackTrackC::OpenSolve(VTRingC,int)
VTBackTrackC::Solve(VTRingC,int,BooleanT)
VTBackTrackC::Setup(VTRingC)
VTBackTrackC::Pair(ItTriC,ItTriC)
VTBackTrackC::AddTwo(VTBoundC &,DLIterC &,int)
VTBackTrackC::SeedBoundary(ItTriC)
VTBackTrackC::PruneGrow(int,VTBoundC)
VTBackTrackC::NoElbowGrow(VTBoundC &,DLIterC,int)
VTBackTrackC::BoundaryNo(DLIterC)
VTBackTrackC::ComputeResult(void)
VTBackTrackC
 
include "amma/VTBackTrack.hh"
User Level:Default
Library:VTRing
Example: cri.cc
Section:default.Andrew Stoddart
In Scope:std

Comments:
------------------------------------------------------------------------- ********** VTBackTrackC ************************************************** ------------------------------------------------------------------------- ------------------------------------------------------------------------- ------------------------------------------------------------------------- ------------------------------------------------------------------------- ********** VTBackTrackC ************************************************** ------------------------------------------------------------------------- A number of unnecessarily slow steps are marked SLOW in the .cc file It is not expected to use this code in speed critical applications. This class takes as input a closed triangular mesh. The mesh is converted to a mesh of 4-sided faces by pairing adjacent triangles It works by a variation of depth first search with backtracking whenever there is a problem. It need never backtrack further back than the last elbowless boundary. Future extensions should tackle open surfaces. Error message: "Complete failure in PruneGrow" needs attention The routine Compute Result is now fixed. -------------------------------------------------------------------------

Variables:
SArray1dC mate;
stores chosen pair tri, -1 if not yet done

SArray1dC neighbour;
list of neighbours for each edge, -99 if does not exist 2d = 3 x N

BooleanT prtrace;

BooleanT diagfiles;

BooleanT testneck;

VTRingC vt;

PolopsC result;

int countmax;

int nfaces;

Methods:
VTBackTrackC()
Null Constructor

VTBackTrackC(const VTBackTrackC & s)
Copy constructor

VTBackTrackC & operator=(const VTBackTrackC & s)

~VTBackTrackC()
Destructor

void SetFlags(BooleanT tn = TRUE,BooleanT tr = TRUE,BooleanT df = TRUE)
set the testneck, trace flags and the save diagnostic files flag

PolopsC OpenSolve(VTRingC vt,int n)
Solve the open surface and reurn a Polops

PolopsC Solve(VTRingC vt,int n,BooleanT trymany = TRUE)
Solve the closed surface and reurn a Polops

void Setup(VTRingC vtin)
setup the mate and neighbour arrays

void Pair(ItTriC it0,ItTriC it1)
write into mate array this pair

AddTypeT AddTwo(VTBoundC & b,DLIterC<VTDirEdgeC> & ide,int parity)
An attempt is made to add 2 triangles at the goven point. Any self intersection results in failure, parity will only used at nonelbow edges

VTBoundC SeedBoundary(ItTriC it0)
Seed the boundary with it0 and a neighbour - if it0 is on a SURFACE boundary the first adjacent tri is added

BooleanT PruneGrow(int n,VTBoundC b)
Grow region to completion in pairs by a pruned exhaustive search - intermediate regions with no elbows are stored - when a selfintersection is encountered an immediate backtrack takes place to the last stored region

BooleanT NoElbowGrow(VTBoundC & b,DLIterC<VTDirEdgeC> ide,int parity)
Starting with the suggested edge a pair of triangles is added to the region. When an elbow-less boundary is encountered the routine returns TRUE. If a selfintersection is encountered FALSE is returned. When the region is complete TRUE is returned.

int BoundaryNo(DLIterC<VTDirEdgeC> ide)
return the number of ide in the boudary list; 0=first, -1=not there

int ComputeResult()
Using the contents of the arrays "mate" and "neighbour" this routine builds the 4 sided face Polops. It returns the number of unused faces.


Programmer:Andrew Stoddart, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001