⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainstarttest.html

📁 Delaunay三角形的网格剖分程序
💻 HTML
字号:
<TITLE>COG 2.1: Startup File</TITLE><A HREF="mainoctreetest.html">next</A><H1>COG 2.1: Startup File</H1> <P>Let's start with the simplest 3D grid example - a cube,consisting of six tetrahedra.  We need, of course, an include file:<PRE>#include "<A HREF="coglib.hxx">cog/coglib.hxx</A>"int main(){</PRE> <P>We also need a grid generator - an object of the abstract class<B>Cogenerator</B>. For the first example, we use the grid generatorfrom the derived class <B><A HREF="cogenoctree.html">CogenOctree</A></B>.  The related pointertype is <B>cogenOctree</B> (don't use CogenOctree* for pointers).<PRE>  cogenOctree gen = new CogenOctree();</PRE> <P>Then, we define the bounding box for grid generation:<PRE>    gen-&gt;setBorder(0.0,1.0, 0.0,1.0, 0.0,1.0);	// 3D unit cube // gen-&gt;setBorder(0.0,1.0, 0.0,1.0);		// 2D unit square // gen-&gt;setBorder(0.0,1.0);			// 1D unit segment</PRE> <P>That's all we need for our first test example. Now, we can callthe grid generator:<PRE> wzgrid grid = (*gen)();</PRE> <P>Now we can use the grid, for example, write it into a file:<PRE>  grid-&gt;write("test.sg");}</PRE> <P>The grid is now written into a file "test.sg" in <A HREF="simplexgrid.html">SimplexGrid 2.0</A> format.  Using the <A HREF="maingridviewtest.html">OpenGL Grid Interface</A> you canhave a look at the grid:<P><IMG SRC="starttest.gif"> <P>Now, in our tutorial we continue with <A HREF="mainoctreetest.html">other possibilities of the classCogenOctree</A>.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -