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

  PUBLIC
SurfaceC::SurfaceC(void)
SurfaceC::SurfaceC(const SurfaceC &)
SurfaceC::SurfaceC(char *)
SurfaceC::SurfaceC(PolopsC &)
SurfaceC::~SurfaceC(void)
SurfaceC::operator=(const SurfaceC &)
SurfaceC::Load(char *)
SurfaceC::Save(char *)
SurfaceC::Poly(void)
SurfaceC::Append(SurfaceC &)
SurfaceC::Purify(void)
SurfaceC::InsNode(Vector3dC)
SurfaceC::DelNode(int &)
SurfaceC::DelNode(SurfaceNodeC &)
SurfaceC::DelNodeOnly(SurfaceNodeC &)
SurfaceC::NumNode(void)
SurfaceC::RefNode(const SurfaceNodeC &)
SurfaceC::IndNode(const int &)
SurfaceC::VecNode(SurfaceNodeC &)
SurfaceC::VecNode(const int &)
SurfaceC::VectorSet(void)
SurfaceC::InsEdge(SurfaceNodeC &,SurfaceNodeC &)
SurfaceC::InsEdge(const int &,const int &)
SurfaceC::DelEdge(SurfaceEdgeC &)
SurfaceC::DelEdge(int &)
SurfaceC::NumEdge(void)
SurfaceC::RefEdge(SurfaceEdgeC &)
SurfaceC::IndEdge(const int &)
SurfaceC::AverageEdgeLength(void)
SurfaceC::MinimumEdgeLength(void)
SurfaceC::FindAdj(const SurfaceNodeC &,const SurfaceNodeC &)
SurfaceC::FindAdj(const int &,const int &)
SurfaceC::Element(void)
SurfaceC::Bound(void)
SurfaceC::NearestSetup(void)
SurfaceC::NearestSetup(RealT)
SurfaceC::NearestNode(const Vector3dC &)
SurfaceC::NearestPoint(const Vector3dC &)
SurfaceC::NearestPoint(const SurfaceNodeC,const Vector3dC &)
SurfaceC::NearestPoint(const IntT,const Vector3dC &)
SurfaceC::NearestPoint(const SurfaceNearestPointT &,const Vector3dC &)
SurfaceC::ConstrainEdgeLength(RealT)
SurfaceC::Print(void)
SurfaceC::PrintNode(void)
SurfaceC::PrintEdge(void)
SurfaceC::ConsistencyCheck(void)
SurfaceC::PolopsCheck(PolopsC &)
SurfaceC::UpdateNode(void)
SurfaceC::UpdateEdge(void)
SurfaceC::Delete(void)
SurfaceC::DelNodePrivate(const int,SurfaceNodeC &)
SurfaceC::DelThisNode(SurfaceNodeC &)
SurfaceC::InsEdge(SurfaceNodeC,SurfaceNodeC,SurfaceNodeC,SurfaceNodeC)
SurfaceC::InsEdge(int,int,int,int)
SurfaceC::DelThisEdgeOnly(SurfaceEdgeC &)
SurfaceC::DelThisEdge(SurfaceEdgeC &)
SurfaceC::DelFace(SurfaceAdjC &)
SurfaceC::DelFaceOnly(SurfaceAdjC &)
SurfaceC::DelFacePrivate(const int,SurfaceAdjC &)
RefCounterC::ToBeDeleted(void) const
RefCounterC::Count(void) const
RefCounterC::IsSingleReference(void)
RefCounterC::operator=(const RefCounterC &)
RefCounterC::ToBeDeletedUpdate(const RefCounterC &)
RefCounterC::ReportInvalidObject(char *)
RefCounterBaseC::Label(void) const
SurfaceC
 
include "amma/Surface.hh"
User Level:Default
Library:surf
Example: cri.cc
Section:default.Adrian Hilton
In Scope:std

Comments:
SURFACE CLASS (GRAPH REPRESENTATION OF POLYGONAL SURFACE) ------------------------------------------------------- Name : Surface.hh Description: 3D Polygonal Surface Graph Dependancies: Graph, (DList), Vector3d , PolopsC- C++ libraries Modified : 2.95 AH Created : 24.1.95 Author : Adrian Hilton ------------------------------------------------------- Structure: Access surface directly using SurfaceNodeC/SurfaceEdgeC Reference information is temporary access by ------------------------------------------------------- ==================================================================== ------------------------------------------------------------------- SurfaceC: polygonal mesh representation edges ccw sorted about each node Nodes contain a reference number 0..N-1 + position Edges contain reference number only Access to nodes/edges via reference is inefficient O(N) as empty iterators do not exist for edges/nodes

Parent Classes: Variables:
GraphC graph;
BaseGraphC graph; Surface - Graph of undefined type -------------------- Node Internal Temporary ----------------

int node_update;
node lookup table not upto date

VectorSetC vset_node;
internal set of pointers to node vectors

SArray1dC pnode;
internal array of node iterators

int num_node;
current no. of nodes (uptodate) -------------------- Edge Internal Temporary ----------------- Edge

int edge_update;
update the temporary edge lookup

SArray1dC pedge;
internal array of edge iterators

int num_edge;
current no. of edges --------------------- Element Internal Temporary --------------

int elem_update;
update the list of surface elements

SurfaceElementC elements;
surface elements accessed via Elements() --------------------- Bound Internal Temporary --------------

int bound_update;
flag boundary uptodate

SurfaceBoundC bound;
access surface boundary nodes ===================== PRIVATE FUNCTIONS =======================

IntT setup_nearest;

NearestC nearest;

Methods:
SurfaceC()
constuct empty

SurfaceC(const SurfaceC & s)
copy constructor

SurfaceC(char * filename)
construct from file .tri polygon set accepts all input formats for PolopsC

SurfaceC(PolopsC & poly)

~SurfaceC()
destruct

const SurfaceC & operator=(const SurfaceC & s)
copy by reference -------------------Surface Operations--------------------

void Load(char * filename)
load from file.tri polygon set accepts all input formats for PolopsC

void Save(char * filename)
save to file .tri surface polygons

PolopsC Poly()
generate PolopsC from SurfaceC

void Append(SurfaceC & s)
append surface s to this surface add all nodes & edges in s to this surface preserves node ordering

void Purify()
Purify this SurfaceC delete nodes with no edges ---------------------Surface Node Access---------------

SurfaceNodeC InsNode(Vector3dC pos)
Insert new node with position vector pos

void DelNode(int & i)
delete ith node + all adjacent surface elements + empty nodes ORDER(N) operation

void DelNode(SurfaceNodeC & node)
delete node + all adjacent surface elements + empty nodes

void DelNodeOnly(SurfaceNodeC & node)
delete node + delete adjacent faces + not empty nodes

int NumNode()
total number of nodes

int RefNode(const SurfaceNodeC & node)
internal node reference must be updated after node insertion/deletion

SurfaceNodeC IndNode(const int & i)
ith node iterator uses a temporary internal array that must be updated after node insertion/deletion

Vector3dC & VecNode(SurfaceNodeC & node)
node vector

Vector3dC & VecNode(const int & i)
ith node vector

VectorSetC & VectorSet()
VectorSet containg pointers to the position vectors of each surface node ---------------------Surface Edge Access---------------

SurfaceEdgeC InsEdge(SurfaceNodeC & n1,SurfaceNodeC & n2)
Insert an edge between nodes n1 -> n2

SurfaceEdgeC InsEdge(const int & i,const int & j)
Insert an edge between nodes with references i and j

void DelEdge(SurfaceEdgeC & e)
Delete edge - on return e points to previous edge

void DelEdge(int & i)
Delete edge with reference i - on return e points to previous edge

int NumEdge()
total number of nodes

int RefEdge(SurfaceEdgeC & e)
internal edge reference must be updated after node insertion/deletion

SurfaceEdgeC IndEdge(const int & ref)
ORDER N ith edge iterator uses a temporary internal array that must be updated after node insertion/deletion

RealT AverageEdgeLength()
Average Euclidan distane between edge end nodes

RealT MinimumEdgeLength()
Minimum Euclidan distane between edge end nodes ---------------------Surface Node-Edge Adjacency Access---------------

SurfaceAdjC FindAdj(const SurfaceNodeC & n1,const SurfaceNodeC & n2)
Find the edge between nodes n1 and n2

SurfaceAdjC FindAdj(const int & i,const int & j)
Find the edge between nodes with reference i and j ---------------------Surface Element Access---------------

SurfaceElementC & Element()
Access to a list of all surface elements ---------------------Surface Boundary Access---------------

SurfaceBoundC & Bound()
Access to surface boundary nodes -------------------- Nearest Correspondence --------------

void NearestSetup()
Default Nearest Setup = Direct Computation Setup nearest neighbour computation using direct computation O(Number of Noads)

void NearestSetup(RealT s)
Setup nearest neighbour computation Uses a hash table uniform spatial subdivision with cube size s

SurfaceNearestPointT NearestNode(const Vector3dC & v)
Nearest node to v on the mesh

SurfaceNearestPointT NearestPoint(const Vector3dC & v)
Nearest point to v on the mesh

SurfaceNearestPointT NearestPoint(const SurfaceNodeC node,const Vector3dC & v)
Nearest point to v on the surface elements ajacent to 'node'

SurfaceNearestPointT NearestPoint(const IntT node,const Vector3dC & v)
Nearest point to v on the surface elements adjacent to 'node'

SurfaceNearestPointT NearestPoint(const SurfaceNearestPointT & np,const Vector3dC & v)
Nearest point to v on the surface elements adjacent to 'np.node' --------------------- Operations ---------------------------------------

void ConstrainEdgeLength(RealT lmax)
Constrain the mesh to have maximum edge length lmax ---------------------Debug/Print---------------------------------------

void Print()
print surface to standard output

void PrintNode()
print all nodes to standard output

void PrintEdge()
print all edges to standard output

void ConsistencyCheck()
Test if surface is consistent manifold polygonal representation

void PolopsCheck(PolopsC & p)
Test if PolopsC input in OK

void UpdateNode(void)
Update temporary data structures

void UpdateEdge(void)
Update temporary data structures

void Delete()
delete this surface ---------------------Surface Nodes--------------------------------

void DelNodePrivate(const int type,SurfaceNodeC & node)
delete adjacent faces + type=0 all empty nodes or + type=1 this node only

void DelThisNode(SurfaceNodeC & n)
delete node only (no relabelling of faces) ---------------------Surface Edges--------------------------------

SurfaceEdgeC InsEdge(SurfaceNodeC nprev,SurfaceNodeC n1,SurfaceNodeC n2,SurfaceNodeC nnext)
insert edges on face

SurfaceEdgeC InsEdge(int nprev,int n1,int n2,int nnext)
insert edges on face

void DelThisEdgeOnly(SurfaceEdgeC & e)
delete edge only (no relabelling of faces)

void DelThisEdge(SurfaceEdgeC & e)
delete edge only (no relabelling of faces) + deletes edge nodes if not connected to surface (0 edges) ---------------------Surface Polygonal Faces----------------------

void DelFace(SurfaceAdjC & a)
Delete face + empty nodes

void DelFaceOnly(SurfaceAdjC & a)
Delete this face only

void DelFacePrivate(const int type,SurfaceAdjC & a0)
delete face +/- nodes ---------------------- Surface Nearest Correspondence ------------

#include "amma/RefCount.hh"
BooleanT ToBeDeleted() const
Returns TRUE if the content should be deleted.

RCCountT Count() const
Returns the number of refrences to this object. NB. The following definition is now obsolete, The value 0 means there is no other reference to this object.

BooleanT IsSingleReference()
Tests is there is only one reference to this object.

const RefCounterC & operator=(const RefCounterC & rC)

BooleanT ToBeDeletedUpdate(const RefCounterC & rC)
This function is the condition and the assigment together. It returns TRUE if the content should be deleted before assigning of the new object. The function automatically solves the reference counter of this object as well as the other object reference counter 'rC'.

void ReportInvalidObject(char * Msg = 0)
This function reports an error to the user if a problem is detected in the refrence counting mechanism.

#include "amma/RefCBase.hh"
LabelT Label() const
Returns the label of this reference counter.
The member function is useful mainly to recognize objects during debugging. The value of the label is uniquely defined pointer.


Programmer:Adrian Hilton, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001