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

  PUBLIC
SlimeC::SlimeC(void)
SlimeC::SlimeC(PolopsC)
SlimeC::SlimeC(const SlimeC &)
SlimeC::operator=(const SlimeC &)
SlimeC::~SlimeC(void)
SlimeC::ExportRender(int)
SlimeC::MakeLocal(t_vector *,int &,ItVertC &)
SlimeC::MakeLookElems(t_element &,ItVertC &)
SlimeC::MakeLookElems(void)
SlimeC::SaveSli(char *)
SlimeC::ExportControl(void)
SlimeC::SaveControl(char *)
SlimeC::TestNearest(void)
SlimeC::Nearest(const Vector3dC &,int &,int,Vector3dC &,Vector3dC &)
SlimeC::Nearest(t_vector *,int,const Vector3dC &,int,Vector3dC &,Vector3dC &)
SlimeC::GetArbPoint(const Vector3dC &,int)
SlimeC::LoadLocal(t_vector *,int &,int)
SlimeC::PolGetBary(const Vector3dC &,int,double *)
SlimeC::PolGetBary(PolopsC &,int,int,double *)
SlimeC::PolSetup(void)
SlimeC::PolGridSetup(int &)
SlimeC::MakeEmptyPolops(int)
SlimeC::DoPatch(PatchLookUpTableC &,t_vector *,int,PolopsC &,int &,int &)
SlimeC
 
include "amma/Slime.hh"
User Level:Default
Library:Slime
Example: cri.cc
Section:default.Andrew Stoddart
In Scope:std

Variables:

SArray1dC pols;
helper array to keep basic triangulations

SArray1dC table;
helper tables

SArray1dC elems;

int nelems;
A lookup table containing all the elements

LoopRoseC looprose;
all the various look up tables for patch computations

VTRingC vt;
the internal topolgy representation

Methods:
SlimeC()
Constructs an empty slime

SlimeC(PolopsC pol)
Constructs a slime from PolopsC

SlimeC(const SlimeC & sl)
Copy constructor

SlimeC & operator=(const SlimeC & sl)

~SlimeC()
Destructor Export meshes -------------

PolopsC ExportRender(int disp_density)
Export a rendered mesh at specified density, if density is 0 then export the control mesh. This mesh is NOT purified, (but not sure in case of constrol mesh) ===NB=== This routine only computes the topology the first time round. If the toplogy changes please call MakeLookElems();

BooleanT MakeLocal(t_vector * local,int & n_simp,ItVertC & iv)
extracts the control points of a patch directly into local return FALSE if patch exceeds nsimple_max

void MakeLookElems(t_element & el,ItVertC & iv)
makes a single patch element, used by MakeLookElems();

void MakeLookElems()
generate lookup table, you must call this if you change the topology the lookup table assembles the control points for each patch and also acts as a integer indexed access to the control points themselves

void SaveSli(char * fname)
Save the lookup table, this can be usedto test by stripped down code

PolopsC ExportControl()
Export the control mesh (done by SurfaceC; not purified?)

void SaveControl(char * fname)
Save the control mesh in a .tri file Utilities ---------

void TestNearest(void)

double Nearest(const Vector3dC & p,int & minelem,int grid_size,Vector3dC & uvmin,Vector3dC & nearestmin)
exhaustive search for closest patch Assumes that the element lookup table is up to date because will visit all elements

double Nearest(t_vector * local,int n_simp,const Vector3dC & p,int grid_size,Vector3dC & uv,Vector3dC & nearestmin)
quick and dirty nearest routine, input is a patch and the query point p, returned is closest point in nearestmin and uv. dmin is the return value

Vector3dC GetArbPoint(const Vector3dC & uv,int elem)
Get an arbitrary point without using tables private functions used only by ExportRender -------------------------------------------

BooleanT LoadLocal(t_vector * local,int & n_simp,int elem)
copy the control points into local storage, returns FALSE if fails you should test for this!

void PolGetBary(const Vector3dC & uv,int n_simp,double * bary)
given uv and n_simp return the area based barycentrics barycentric areas not necessarily normalized to add to 1.0

void PolGetBary(PolopsC & p,int n_simp,int v,double * bary)
given vertex v of p return the area based barycentrics barycentric areas not necessarily normalized to add to 1.0

void PolSetup()
set up helper tables. This is called inside the constructor.

void PolGridSetup(int & grid_size)
set up helper tables. These are detailed polops templates at the density required for rendering. Each time the desnity os changed they are regenerated. g=1 is the minimum, i.e. tri=1, quad=2, pent=5 g=2 -> above x 4 g=3 -> above x 9

PolopsC MakeEmptyPolops(int g_size)
Create an empty polops of the right size based on the polrend arrays. Use after PolRendSetup(int grid_size);

void DoPatch(PatchLookUpTableC & ts,t_vector * local,int n_simp,PolopsC & tri,int & fcount,int & vcount)
Render a single patch or panel and store the results in tri


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