|
Developer Documentation |
|
Centre for Vision, Speech & Signal Processing |
|
PUBLIC |
MeshOptC::MeshOptC(void)
MeshOptC::MeshOptC(char *,char *,char *)
MeshOptC::MeshOptC(const MeshOptC &)
MeshOptC::operator=(const MeshOptC &)
MeshOptC::~MeshOptC(void)
MeshOptC::SetTrace(BooleanT)
MeshOptC::SetConst(double,double,double,BooleanT)
MeshOptC::FixedTopologyOptimize(int)
MeshOptC::Optimize(int)
MeshOptC::TryEdgeCollapse_Marked(ItEdgeC &)
MeshOptC::GetVertexRing(ItEdgeC,BooleanT &)
MeshOptC::TryEdgeCollapse(ItEdgeC)
MeshOptC::DoEdgeCollapse(ItEdgeC,const Vector3dC &,SArray1dC &,KListC &)
MeshOptC::Compute_Energy(KListC &,BooleanT)
MeshOptC::Compute_Spring_Energy(ItEdgeC)
MeshOptC::Compute_Spring_Energy(KListC &,BooleanT)
MeshOptC::Compute_Data_Energy(KListC)
MeshOptC::Compute_Data_Energy(ItTriC)
MeshOptC::RefinePosn(const ItVertC &,double &,double &,int)
MeshOptC::RefinePosn(SArray1dC,SArray1dC,Vector3dC &,BooleanT)
MeshOptC::CheckRefine(SArray1dC &,SArray1dC &,SArray1dC &,SArray1dC &,Vector3dC &,BooleanT)
|
Comments:
-------------------------------------------------------------------------
********** MeshOptC *******************************************
-------------------------------------------------------------------------
-------------------------------------------------------------------------
********** MeshOptC **************************************************
-------------------------------------------------------------------------
MeshOptC uses VTLoadedC which has nonstandard memory management,
TAKE CARE!
respond to validity of edge collapse operation?
when i do tyy edge collapse i really need the same ie back???
This code now allows for robust surface fitting.
All points further than threshM are ignored when fitting.
It is expected that threshM is set to 3 std deviations
as computed by a MAD estimator. The points are retained
and may reappear later.
During fixed topology fitting the robust step makes sense, however at
present the reduce and fit is probably best done without a threshold.
The option to do so is supported.
The Data Energy that is reported is at present set to ignore the weights,
so caution should be exercised when interpreting this for robust.
-------------------------------------------------------------------------
Variables:
- VTRingC vt;
-
- VTLoadedC vtl;
-
- BooleanT trace;
-
- int blocksize;
-
- double cost_bound;
-
- double cost_spring;
-
- double cost_data;
-
always set to 1.0 at the moment
- double cost_rep;
-
- BooleanT robust;
-
- double threshM;
-
Methods:
- MeshOptC()
-
Null Constructor
- MeshOptC(char * vtrfil,char * vecfil,char * mapfil)
-
Constructor
- MeshOptC(const MeshOptC & s)
-
Copy constructor
- MeshOptC & operator=(const MeshOptC & s)
-
Assignment
- ~MeshOptC()
-
Destructor
- void SetTrace(BooleanT tr)
-
a trace printout for monitoring progress
- void SetConst(double ks,double kr,double kb,BooleanT robust = FALSE)
-
Set the constants to new values, must be called!!
- void FixedTopologyOptimize(int nloops)
-
optimise mesh with the topology fixed
- void Optimize(int nmax)
-
optimise the mesh, allows for reduction according to krep
assumes that the fixed optimisatio has ALREADY been done.
the threshold is only set once, in the begining
Remember not to renumber during this routine! WHY????
performs a maximum of nmax edge collapses
- BooleanT TryEdgeCollapse_Marked(ItEdgeC & ie)
-
Calls TryEdgeCollapse(ItEdgeC ie), but uses a marker so that
if ie is deleted an iterator to the next valid edge element is returned
- KListC<ItVertC> GetVertexRing(ItEdgeC ie,BooleanT & onbound)
-
Get the ring of vertices around an edge; works for all configs
- BooleanT TryEdgeCollapse(ItEdgeC ie)
-
Test the possibility of edge collapse, if it lowers the energy accept it
and return true, else false
- void DoEdgeCollapse(ItEdgeC ie,const Vector3dC & vnew,SArray1dC<Vector3dC> & points,KListC<ItTriC> & flist)
-
Given the ring of faces and point set actually DO the collapse
Even when robust all points are retained.
- double Compute_Energy(KListC<TEdgeC> & ring,BooleanT onbound)
-
Spring, Data and boundary energy Energy of a ring
around a single vertex
- double Compute_Spring_Energy(ItEdgeC ie)
-
Compute the spring energy of an edge; works for all boundary configs
- double Compute_Spring_Energy(KListC<TEdgeC> & ring,BooleanT onbound)
-
Spring and boundary energy Energy of a ring around a single vertex
it is assumed that the boundary lies along the first and last and
that there are one less TEdgec than vertices
- double Compute_Data_Energy(KListC<ItTriC> ring)
-
Data Energy of a ring where each TEdgeC specifies a face
- double Compute_Data_Energy(ItTriC it)
-
Data Energy of one face
- void RefinePosn(const ItVertC & iv,double & begen,double & enden,int n_refine = 3)
-
optimize the position of the vertex, move it to the new position
calls the lower level routine listed next
- double RefinePosn(SArray1dC<Vector3dC> data,SArray1dC<Vector3dC> vring,Vector3dC & vmid,BooleanT onbound)
-
in the case of a boundary it is understood that there is no triangle
between n-1 and 0
- void CheckRefine(SArray1dC<Vector3dC> & data,SArray1dC<Vector3dC> & vring,SArray1dC<Vector3dC> & barys,SArray1dC<int> & near_tri,Vector3dC & vmid,BooleanT onbound)
-
used mainly to check the previous routine RefinePosn
|
Programmer:Andrew Stoddart, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001
|