3D triangulation class
![]() | FileNotFound : public Exception unable to open file |
![]() | selectedVertex pointer on selected vertex (0 if no vertex is selected) |
![]() | selectedTriangle pointer on selected face (0 if no face is selected) |
![]() | selectedEdge pointer on selected edge (0 if no edge is selected) |
![]() | selectedZone pointer on selected zone (0 if no zone is selected) |
![]() | selectedPoint pointer on selected point (0 if no point is selected) |
![]() | skipMainModule (GFInput &input) general format skip function for main module |
![]() | writeMainModule (GFOutput &output) general format write function for main module |
![]() | readTextureModule (GFInput &input) read the texture information of the triangulation |
![]() | skipTextureModule (GFInput &input) skip the texture information of the triangulation |
![]() | writeTextureModule (GFOutput &output) write the texture information of the triangulation |
![]() | saveAsTrian (char *name) save the triangulation with the Trian format |
![]() | saveAsTr (char *name) save the triangulation with the Tr format |
![]() | computeCenter () compute the center, radius and bounding box of the triangulation |
![]() | setTriangleTopology (TriangulationTriangle *t1, TriangulationTriangle *t2, unsigned int index) set the edge topology given two triangles t1 and t2 such that t1->neighbor[index]=t2 |
![]() | newTriangle (TriangulationTriangle *n0 = 0, TriangulationTriangle *n1 = 0, TriangulationTriangle *n2 = 0, TriangulationVertex *v0 = 0, TriangulationVertex *v1 = 0, TriangulationVertex *v2 = 0, TriangulationEdge *e0 = 0, TriangulationEdge *e1 = 0, TriangulationEdge *e2 = 0, TriangulationZone *zone = 0) creates a new triangle |
![]() | newVertex (TriangulationEdge *edge=0, unsigned int orientation=0 ) creates a new vertex |
![]() | getVolume (void) const returns triangulation volume |
![]() | getFileName (void) const returns mesh file name |
![]() | setFileName (const char *name) set new mesh file name |
![]() | renumberMesh () const renumber the vertex, edge and triangle reference |
![]() | getSelectionMode (void) const returns model subobject selection mode |
![]() | setSelectionMode (SELECTION_MODE mode) set model subobject selection mode |
![]() | translate (const Vec3 translates the object |
![]() | rotate (const Rotation3D& rotation) rotates the object |
![]() | scale (const double scale) scales the object |
![]() | redraw (Camera3D *) all graphics objects can be drawn |
![]() | computeClosestDistance (DataTypes::MouseClick& mc) const The routine that allows the camera to select an object by computing the distance of an object from its radial line |
![]() | selectObject (const Vec2 finds the closest edge, zone, vertex or triangle from click point |
![]() | set1DTextureCoordinates (SET_TRIANGULATION_1D_TEXTURE_COORDINATES f, bool normalize=false) set the 1D texture coordinates for all triangles |
![]() | updateCenter (Vec3 Returns the graphic object center and weight |
![]() | updateRadius (const Vec3 Returns the graphic object radius given its center |
![]() | getSelectedVertex (void) const returns mesh selected vertex |
![]() | getSelectedEdge (void) const returns mesh selected edge |
![]() | getSelectedTriangle (void) const returns mesh selected face |
![]() | getSelectedPoint (void) const returns mesh selected point |
![]() | getSelectedZone (void) const returns mesh selected zone |
![]() | selected (void) function called when this object is selected |
![]() | unselected (void) function called when this object is unselected |
![]() | unselect (void) unselects any subobject |
![]() | getVertex (int vref) const returns a 3D triangulation vertex given its reference |
![]() | getEdge (int eref) const returns a 3D triangulation edge given its reference |
![]() | getTriangle (int tref) const returns a 3D triangulation triangle given its reference |
![]() | getZone (int tref) const returns a 3D triangulation zone given its reference |
![]() | select (TriangulationPoint *p) select given point |
![]() | select (TriangulationVertex3D *v) select given vertex |
![]() | select (TriangulationEdge3D *e) select given edge |
![]() | select (TriangulationTriangle3D *t) select given face |
![]() | select (TriangulationZone3D *z) select given zone |
![]() | selectVertex (int ref) select given vertex |
![]() | selectEdge (int ref) select given edge |
![]() | selectTriangle (int ref) select given face |
![]() | selectPoint (int ref, const Vec3 select given face |
![]() | selectZone (int ref) select given zone |
![]() | setRendering (TclString n) set surface rendering mode |
![]() | setScene (Scene3D *scene) move model in new scene, resynchronize model traces in cameras |
![]() | firstLandmark (void) const the first landmark on the triangulation |
![]() | lastLandmark (void) const the last landmark on the triangulation |
![]() | firstVertex (void) const returns an iterator on vertices, initialized on first vertex |
![]() | firstZone (void) const returns an iterator on zones, initialized on first zone |
![]() | firstTriangle (void) const returns an iterator on triangles, initialized on first face |
![]() | getFirstVertex (void) const returns first mesh vertex |
![]() | getFirstTriangle (void) const returns first mesh face |
![]() | getLastVertex (void) const returns last mesh vertex |
![]() | getLastTriangle (void) const returns last mesh face |
![]() | apply (void (TriangulationVertex3D::*ptr)(void)) apply member function on each mesh vertex |
![]() | apply (void (TriangulationVertex3D::*ptr)(int), int val) apply member function on each mesh vertex |
![]() | apply (void (TriangulationVertex3D::*ptr)(unsigned int), unsigned int val) apply member function on each mesh vertex |
![]() | apply (void (TriangulationVertex3D::*ptr)(float), float val) apply member function on each mesh vertex |
![]() | apply (void (TriangulationVertex3D::*ptr)(double), double val) apply member function on each mesh vertex |
![]() | apply (void (TriangulationVertex3D::*ptr)(void *), void *val) apply member function on each mesh vertex |
![]() | apply (void (TriangulationEdge::*ptr)(void)) apply member function on each mesh edge |
![]() | apply (void (TriangulationTriangle3D::*ptr)(void)) apply member function on each mesh face |
![]() | flipNormals (void) flip every model normals |
![]() | areNormalsFlipped () const whether the direction normal vector at each vertex and each face should be flipped for display purposes |
![]() | surfaceHasChanged () called when the geometry or mesh topology has changed |
![]() | intersectWithPlane (const Vec3 compute model surface intersection with a plane |
![]() | getSurfaceSliceableName () const returns the string identifying the Tcl name of triangulation |
![]() | getInterface (void) const returns 3D triangulation interface |
![]() | exceptions | ||||||||
![]() | constructors
| ||||||||
![]() | destructor
| ||||||||
![]() | save the triangulation with the GH3D suitable for the GH3D software | ||||||||
![]() | returns an iterator on the contour list |
![]() | landmarkList the global list of landmarks |
![]() | filename name under which the file is saved |
![]() | triangulationname name of this triangulation (could have several meshes in a file) |
![]() | referenceCenter triangulation mesh reference (stored) center |
![]() | radius sphere that include the 2simplex mesh radius |
![]() | center triangulation mesh center |
![]() | surfaceChanged whether 2simplex mesh was deformed |
![]() | displayNormals whether to display surface normal at vertices |
![]() | normalsColor normal display color |
![]() | normalsWidth normal display width |
![]() | normalScale normals arrows display scale |
![]() | flipNormal whether we should flip normal for display |
![]() | selectionMode model subobject selection mode |
![]() | selectedMaterial the material used to draw selected triangle or zone |
![]() | triangleDisplayList The triangle display list for picking and LIE collision |
![]() | edgeDisplayList The edge display list for picking |
![]() | vertexDisplayList The vertex display list for picking |
![]() | Sphere sphere to display selected points |
![]() | initDisplay () constructors common code for display variables |
![]() | buildTriangleDisplayList () build the triangle display list when needed |
![]() | buildEdgeDisplayList (const Camera3D *cam) build the edge display list when needed |
![]() | buildVertexDisplayList (const Camera3D *cam) build the vertex display list when needed |
![]() | initGeneralFormat () constructors common code for the I/O routines |
![]() | readMainModule3D (GFInput &input) general format read function for main module |
![]() | copyObject (const Triangulation3D &org) copy a 3D triangulation into the current object |
Exception classes
constructor
3D triangulation class
class FileNotFound: public Exception
constructors
Triangulation3D(const TclString& name, Scene3D *scene)
scene - scene to build object in Triangulation3D(unsigned int nbVertices, Vec3
posTable - an array of size nbVertices where we store the position of each vertex
nbTriangles - the number of triangles
vertexTriangleTable - the array of size nbTriangles that gives the each of each vertex (starting from 0 to nbVertices -1 ) of the triangle; vertexTriangleTable[i][j] is the ith (0scene - scene to build object in Triangulation3D(const Triangulation3D& org)
Triangulation3D(Scene3D *scene=NULL)
destructor
ObjectsList <TriangulationLandmark> landmarkList
TclString filename
TclString triangulationname
Vec3
double radius
Vec3
enum SELECTION_MODE
SELECT_ZONE
SELECT_EDGE
SELECT_VERTEX
SELECT_TRIANGLE
bool surfaceChanged
bool displayNormals
static Color normalsColor
static float normalsWidth
static double normalScale
bool flipNormal
SELECTION_MODE selectionMode
Material selectedMaterial
GLuint triangleDisplayList
GLuint edgeDisplayList
GLuint vertexDisplayList
GLUquadricObj* Sphere
void initDisplay()
void buildTriangleDisplayList()
void buildEdgeDisplayList(const Camera3D *cam)
void buildVertexDisplayList(const Camera3D *cam)
void initGeneralFormat()
void readMainModule3D(GFInput &input)
void skipMainModule(GFInput &input)
void writeMainModule(GFOutput &output)
void readTextureModule(GFInput &input)
void skipTextureModule(GFInput &input)
void writeTextureModule(GFOutput &output)
void saveAsTrian(char *name)
void saveAsTr(char *name)
TriangulationVertex3D* selectedVertex
TriangulationTriangle3D* selectedTriangle
TriangulationEdge3D* selectedEdge
TriangulationZone* selectedZone
TriangulationPoint* selectedPoint
void copyObject(const Triangulation3D &org)
void computeCenter()
void setTriangleTopology(TriangulationTriangle *t1, TriangulationTriangle *t2, unsigned int index)
virtual TriangulationTriangle* newTriangle(TriangulationTriangle *n0 = 0, TriangulationTriangle *n1 = 0, TriangulationTriangle *n2 = 0, TriangulationVertex *v0 = 0, TriangulationVertex *v1 = 0, TriangulationVertex *v2 = 0, TriangulationEdge *e0 = 0, TriangulationEdge *e1 = 0, TriangulationEdge *e2 = 0, TriangulationZone *zone = 0)
n1 - second triangle neighbor,
n2 - third triangle neighbor,
v0 - first vertex,
v1 - second vertex,
v2 - third vertex,
e0 - first edge,
e1 - second edge,
e2 - third edge,
zone - zone face belongs to virtual TriangulationVertex* newVertex(TriangulationEdge *edge=0, unsigned int orientation=0 )
orientation - vertex orientation versus edge orientation (0 or 1) double getVolume(void) const
const TclString& getFileName(void) const
void setFileName(const char *name)
void renumberMesh() const
SELECTION_MODE getSelectionMode(void) const
void setSelectionMode(SELECTION_MODE mode)
virtual void translate(const Vec3
virtual void rotate(const Rotation3D& rotation)
virtual void scale(const double scale)
virtual void redraw(Camera3D *)
virtual double computeClosestDistance(DataTypes::MouseClick& mc) const
virtual void selectObject(const Vec2
cam - click point camera void set1DTextureCoordinates(SET_TRIANGULATION_1D_TEXTURE_COORDINATES f, bool normalize=false)
normalize - if the texture coordinates should be scaled between 0 and 1 (computes min and max value) virtual void updateCenter(Vec3
n - returned barycentric weight virtual double updateRadius(const Vec3
TriangulationVertex3D* getSelectedVertex(void) const
TriangulationEdge* getSelectedEdge(void) const
TriangulationTriangle3D* getSelectedTriangle(void) const
TriangulationPoint* getSelectedPoint(void) const
TriangulationZone3D* getSelectedZone(void) const
virtual void selected(void)
virtual void unselected(void)
void unselect(void)
TriangulationVertex3D* getVertex(int vref) const
TriangulationEdge* getEdge(int eref) const
TriangulationTriangle3D* getTriangle(int tref) const
TriangulationZone3D* getZone(int tref) const
void select(TriangulationPoint *p)
void select(TriangulationVertex3D *v)
void select(TriangulationEdge3D *e)
void select(TriangulationTriangle3D *t)
void select(TriangulationZone3D *z)
void selectVertex(int ref)
void selectEdge(int ref)
void selectTriangle(int ref)
void selectPoint(int ref, const Vec3
eye - the optical center of the camera
dir - the direction of 3D line selected by the user void selectZone(int ref)
void setRendering(TclString n)
virtual void setScene(Scene3D *scene)