📄 qccregularmesh.3
字号:
.TH QCCREGULARMESH 3 "QCCPACK" "".SH NAMEQccRegularMeshInitialize,QccRegularMeshAlloc,QccRegularMeshFree,QccRegularMeshGenerate,QccRegularMeshNumTriangles,QccRegularMeshToTriangles\- miscellaneous 2D regular-mesh routines.SH SYNOPSIS.B #include "libQccPack.h".sp.BI "void QccRegularMeshInitialize(QccRegularMesh *" mesh );.br.sp.BI "int QccRegularMeshAlloc(QccRegularMesh *" mesh );.br.sp.BI "void QccRegularMeshFree(QccRegularMesh *" mesh );.br.sp.BI "int QccRegularMeshGenerate(QccRegularMesh *" mesh ", const QccPoint *" range_upper ", const QccPoint *" range_lower );.br.sp.BI "int QccRegularMeshNumTriangles(const QccRegularMesh *" mesh );.br.sp.BI "int QccRegularMeshToTriangles(const QccRegularMesh *" mesh ", QccTriangle *" triangles );.SH DESCRIPTIONQccPack provides the.B QccRegularMeshdata structure to represent a regular mesh in the 2D plane.In two dimensions, a regular mesh is simply a rectangular arrayof points..SH "DATA STRUCTURE".B QccRegularMeshdata structure is defined as:.RS.nftypedef struct{ int num_rows; int num_cols; QccPoint **vertices;} QccRegularMesh;.fi.RE.LPThe fields of.B QccRegularMeshare as follows:.TP.I num_rowsThe number of rows of points in the regular mesh..TP.I num_colsThe number of columns of points in the regular mesh..TP.I verticesThe rectangular array of mesh vertices..SH "ROUTINES".BR QccRegularMeshInitialize()should be called before any use of a.BR QccRegularMeshstructure..BR QccRegularMeshInitialize()initializes the fields of.I meshto the following values:.RS.IR num_rows :0.br.IR num_cols :0.br.IR vertices :.B NULL.RE.LP.BR QccRegularMeshAlloc()allocates.IR mesh .The.IR num_rowsand.IR num_colsfields of.I meshmust be defined prior to calling.BR QccRegularMeshAlloc() ..LP.BR QccRegularMeshFree()frees the.I verticesarray previously allocated by.BR QccRegularMeshAlloc() ..LP.BR QccRegularMeshGenerate()fills in the.IR verticesarray of.IR meshwith equally spaced points in the rectangularbox specified by.IR range_upperand.IR range_lower ..IR range_uppergives the upper-left corner of the box,while.IR range_lowergives the lower-right corner of the box.The points have a horizontal spacing of.IR delta_xand a vertical spacing of.IR delta_y ,where.IR delta_x " = (" range_upper -> x " - " range_lower -> x ") / (" mesh -> num_cols " - 1)"and.IR delta_y " = (" range_upper -> y " - " range_lower -> y ") / (" mesh -> num_rows " - 1)."The mesh must be allocated via a call to.BR QccRegularMeshAllocate()prior to calling.BR QccRegularMeshGenerate() ,and both the.I num_rowsand.I num_colsfields of.I meshmust be greater than 1..LP.BR QccRegularMeshNumTriangles()calculates the number of triangles that will be produced from.I meshby.BR QccRegularMeshToTriangles()..LP.BR QccRegularMeshToTriangles()creates a list of triangles from .I meshby dividing each rectangle between four adjacent.I verticesin.I meshalong the diagonal to produce two triangles.The resulting triangles are returned in thearray.I triangleswhich must be allocated prior to calling.BR QccRegularMeshToTriangles()..SH "SEE ALSO".BR QccPoint (3),.BR QccTriangle (3),.BR QccPack (3)Y. Altunbasak, A. M. Tekalp, and G. Bozdagi,"Two-Dimensional Object-based Coding Using a Content-based Meshand Affine Motion Parameterization," in.IR "Proceedings of the International Conference on Image Processing" ,Washington, DC, October 1995, vol. 2, pp. 394-397..SH AUTHORCopyright (C) 1997-2009 James E. Fowler.\" The programs herein are free software; you can redistribute them an.or.\" modify them under the terms of the GNU General Public License.\" as published by the Free Software Foundation; either version 2.\" of the License, or (at your option) any later version..\" .\" These programs are distributed in the hope that they will be useful,.\" but WITHOUT ANY WARRANTY; without even the implied warranty of.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the.\" GNU General Public License for more details..\" .\" You should have received a copy of the GNU General Public License.\" along with these programs; if not, write to the Free Software.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -