📄 create.tri.lib
字号:
CREATE - create model, boundary edge triangles, edge face, edge vertex, add a vertexmakeModel Make and return a pointer to a new modelmakeBoundaryEdgeTri Create a boundary edge and triangle makeEdgeFace Create an edge by connecting two verticesmakeEdgeVertex Create an edge connecting an existing vertex (v1) to a new vertexaddVertexToModel Add a vertex to model, and return pointer to new vertexinsideTriInModel return pointer to triangle in model containing specified (x,y) coordinatesFunction Prototypes:Model *makeModel (float xmin, float ymin, float xmax, float ymax);void makeBoundaryEdgeTri (Vertex *v, Edge **enew, Tri **tnew);void makeEdgeFace (Vertex *v1, Vertex *v2, Edge **enew, Face **fnew);Vertex* addVertexToModel (Model *m, float x, float y);Tri* insideTriInModel (Model *m, Tri *start, float x, float y);makeModel:Input:xmin minimum x-coordinateymin minimum y-coordinatexmax maximum x-coordinateymax maximum y-coordinateReturns: pointer to a new ModelmakeBoundaryEdgeTri:Input:v specified boundary VertexOutput:enew new boundary Edgetnew new boundary triangleNotes:The specified vertex and the adjacent vertices on the boundaryare assumed to be colinear. Therefore, the resultingboundary triangle has zero area, and is intended to enabledeletion of the specified vertex from the boundary.makeEdgeFace:Input:v1 First Vertexv2 second VertexOutput:enew new Edgefnew new FaceNotes:The vertices must be adjacent to a single common face.This face is closed off by the new edge, and a new edge anda new face are made and returned. addVertexToModel:Input:m modelx x-coordinate of new vertexy y-coordinate of new vertexNotes:If the new vertex is close to an existing vertex, this function returns NULL.insideTriInModel:Input:m Modelstart triangle to look at first (NULL to begin looking anywhere)x x-coordinatey y-coordinateNotes:Points on an edge of a triangle are assumed to be inside that triangle.An edge may be used by two triangles, so two triangles may "contain"a point that lies on an edge. The first triangle found to containthe specified point is returned.Author: Dave Hale, Colorado School of Mines, Fall 1990.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -