|
User Documentation |
|
Centre for Vision, Speech & Signal Processing |
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:
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
|
Programmer:Adrian Hilton, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001
|