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

  PUBLIC
VTBoundC::VTBoundC(void)
VTBoundC::VTBoundC(VTRingC)
VTBoundC::VTBoundC(const VTBoundC &)
VTBoundC::operator=(const VTBoundC &)
VTBoundC::~VTBoundC(void)
VTBoundC::Copy(void)
VTBoundC::OldVertexInBound(ItVertC)
VTBoundC::VertexInBound(ItVertC)
VTBoundC::BoundaryHasNeck(void)
VTBoundC::EmptyInside(void)
VTBoundC::NumberInside(void)
VTBoundC::AppendTri(ItTriC)
VTBoundC::RemoveTri(ItTriC)
VTBoundC::TriDone(ItTriC)
VTBoundC::TriInside(ItTriC)
VTBoundC::TriInside(int)
VTBoundC::OutsideTri(TEdgeC &,VTDirEdgeC)
VTBoundC::InsideTri(TEdgeC &,VTDirEdgeC)
VTBoundC::RemoveBound(DLIterC &)
VTBoundC::AddToBound(ItTriC,int,DLIterC &,BooleanT)
VTBoundC::Print(void)
VTBoundC::SaveTri(char *,BooleanT)
VTBoundC::SeedTri(ItTriC)
VTBoundC::OutExists(DLIterC)
VTBoundC::OutIsElbow(DLIterC &)
VTBoundC::GrowEdge(DLIterC &,ItTriC &,BooleanT)
VTBoundC::UnGrowEdge(DLIterC &,ItTriC &)
VTBoundC::MakeFirstTJunction(void)
VTBoundC::InitializeToInverseSurfBound(void)
VTBoundC
 
include "amma/VTBound.hh"
User Level:Default
Library:VTRing
Example: cri.cc
Section:default.Andrew Stoddart
In Scope:std

Comments:
------------------------------------------------------------------------- ------------------------------------------------------------------------- This is a class for representing and region growing a SUBSET of triangles on a mesh. It is assumed that a valid VTRingC data structure exists. A handle to this structure is stored. The boundary is directed anticlockwise around an outward normal We are dealing with a REGION boundary, an open surface will also have a SURFACE boundary. Only a single region boundary is supported at the moment After various changes the class is now very efficient with the exception of : - VertexInBound - GrowEdge which calls VertexInBound The Boundary supports all operations on an OPEN surface with the exception of : - UnGrowEdge() - BoundaryHasNeck encouters problems if the outside of the region has a boundary It is necessary to know whether a tri is in the region. This can be done by marking or a list but we have finally opted for keeping the id set by RenumberFaces and storing a additional lookup array inside the boundary. This helps satisfy the requirement that the boundary can be COPIED It also means that the region cannot grow on a dynamic VTRing which should be not be a major problem for anticipated uses. ------------------------------------------------------------------------- ********** VTBoundC ***************************************************** -------------------------------------------------------------------------

Variables:
DListC bound;
list of edge iterators

VTRingC vt;
just a handle!!

Methods:
VTBoundC()
Null Constructor

VTBoundC(VTRingC vtin)
Constructor; marks all tris id to 0

VTBoundC(const VTBoundC & b)
Copy Constructor

VTBoundC & operator=(const VTBoundC & b)

~VTBoundC()
Destructor

VTBoundC Copy()
Make a copy, duplicates bound & inside but vt is just a handle

BooleanT OldVertexInBound(ItVertC iv)

BooleanT VertexInBound(ItVertC iv)
returns TRUE if vertex is already on the region boundary; used to prevent the boundary intersecting. SLOW: since it is an exhaustive search over the boundary means that it is of order SQRT(sizeof mesh) The new one should be much quicker! ** COULD BE FURTHER IMPROVED!

BooleanT BoundaryHasNeck()
returns TRUE if the boundary has two vertices which are connected by a non-boundary edge. At this point ading a face would cause a self intersection SLOW: uses VertexInBound; O(n^2) NOT IMPLEMENTED FOR HOLES OUTSIDE REGION

void EmptyInside()
renumber faces; create new inside array and set to "not inside"

int NumberInside()
how many tris are currently inside

void AppendTri(ItTriC it)
mark tri as inside

void RemoveTri(ItTriC it)
mark tri as outside

BooleanT TriDone(ItTriC it)

BooleanT TriInside(ItTriC it)

BooleanT TriInside(int i)
checks to see if the tri has already been added

BooleanT OutsideTri(TEdgeC & te,VTDirEdgeC de)
Finds the tri and e number on the outside of the edge de If the region boundary is the surface boundary it returns FALSE and it and e are not changed

BooleanT InsideTri(TEdgeC & te,VTDirEdgeC de)
Finds the tri and e number on the inside of the edge de There is always a triangle inside the region boundary

void RemoveBound(DLIterC<VTDirEdgeC> & ide)
remove boundary element, point to previous (not head!)

void AddToBound(ItTriC it,int e,DLIterC<VTDirEdgeC> & ide,BooleanT reverse = FALSE)
adds the specified edge into the boundary after ide and advances ide to point to the new element

void Print()
a printout of the edge, not easily interpreted

void SaveTri(char * fname,BooleanT outside = FALSE)
Save the INTERIOR or EXTERIOR as a .tri file. The vertex id's are overwritten.

DLIterC<VTDirEdgeC> SeedTri(ItTriC it)
seeds the region with a tri

BooleanT OutExists(DLIterC<VTDirEdgeC> id)
Is there a face on the exterior of this edgel?

BooleanT OutIsElbow(DLIterC<VTDirEdgeC> & id)
Is the exterior face of this edgel an 'elbow', i.e. shared by an adjacent edgel returns FALSE otherwise (inlcuding SURFACE boundary edge)

AddTypeT GrowEdge(DLIterC<VTDirEdgeC> & ide,ItTriC & it,BooleanT preventintersect = TRUE)
adds the exterior tri on specified edge into the region, it will return the loaded tri afterwards the ide points to the last new element added, ide unchanged if no tri added The present form of the self intersection test calls VertexInBound makes this SLOW See above for information on return status.

AddTypeT UnGrowEdge(DLIterC<VTDirEdgeC> & ide,ItTriC & it)
not yet testedon open surface SLOW: removes the interior tri on specified edge into the region, afterwards the ide points to the last new edge element added at present it can leave an empty boundary

void MakeFirstTJunction()
Make the first element of the boundary just after a T junction no surface __________ out | inside

void InitializeToInverseSurfBound()
for an open surface initialise the boundary to the SURFACE boundary and reverse it so that the inside is out. finally call EmptyInside


Programmer:Andrew Stoddart, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001