91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 5.84MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-11-05
  • 語言: 其他
  • 標簽:

資源簡介

計算機圖形學 邊界定義的8連通區域的種子填充算法源代碼 計算機圖形學 邊界定義的8連通區域的種子填充算法源代碼

資源截圖

代碼片段和文件信息

#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
//#include?
using?namespace?std;

#define?MaxNode?5000
#define?MaxScreen?10000
#define?INF?0x3f3f3f3f3

int?screenh?=?600;
int?screenw?=?800;
int?dirx[]?=?{?1?1?0?-1?-1?-1?0?1?};
int?diry[]?=?{?0?-1?-1?-1?0?1?1?1?};
bool?hash[MaxScreen][MaxScreen];
int?CountPoint;//??記錄多邊形點的個數
int?mouse_type;?//其實程序中沒有用到?
bool?flagPoly;?//?標記多變形是不是畫好



typedef?struct?TPoint?{
double?x;
double?y;
}?TPoiont;

typedef?struct?TSegment?{
TPoint?p1;
TPoint?p2;
}?TSegment;

typedef?struct?TPolygon?{
TPoint?point[MaxNode];
int?n;
}?TPolygon;


struct?Node?{
int?x;
int?y;
};
TPoint?pfirst?pinside;
TPolygon?polygon;
queue?Q?Qtemp;
stack?Stack;

void?display();
#include??“Polygon.h“
#include?“BresenhamLine.h“
#include?“BFS.h“
#include?“draw.h“
#include?“drawCN.h“

void?init()?{
glClearColor(1.0?1.0?1.0?0.0);
glMatrixMode(?GL_PROJECTION);
gluOrtho2D(0.0?screenw?0.0?screenh);
memset(hash?false?sizeof(hash));
CountPoint?=?0;
flagPoly?=?false;
/*
printf(“\t操作指南\n“);
printf(“\t1?先單擊左鍵畫多邊形\n“);
printf(“\t2?然后單擊鼠標的中間鍵畫多變形結束\n“);
printf(“\t3?在多邊形內右擊鼠標選擇一點\n“);
*/

}



void?display()?{
glClear(?GL_COLOR_BUFFER_BIT);


?selectFont(24?GB2312_CHARSET?“楷體_GB2312“);
?????glColor3f(1.0f?0.0f?0.0f);
?glRasterPos2f(0.0f?double(screenh));
?drawCNString(“操作指南\n“);
??glRasterPos2f(0.0f?double(screenh?-?24));
?drawCNString(“先單擊左鍵畫多邊形“);
??glRasterPos2f(0.0f?double(screenh?-?48));
?drawCNString(“然后單擊鼠標的中間鍵畫多變形結束“);
??glRasterPos2f(0.0f?double(screenh?-?72));
?drawCNString(“在多邊形內右擊鼠標選擇一點\n“);
?if(CountPoint?==?2??&&?flagPoly){
glRasterPos2f(0.0f?double(screenh?-?96));
drawCNString(“你輸入的點不能組成多變形“);
flagPoly?=?false;
?}

glColor3f(0?0?0);
draw();

glutSwapBuffers();
}
void?Reshape(int?w?int?h)?{
glViewport(0?0?w?h);
glMatrixMode(?GL_PROJECTION);
glLoadIdentity();

if(h?==?0){
h?=?1;
}
//cout?< screenh?=?h;
screenw?=?w;

gluOrtho2D(0.0?(GLfloat)?w?0.0?(GLfloat)?h);
glMatrixMode(?GL_MODELVIEW);
glLoadIdentity();
glClear?(?GL_COLOR_BUFFER_BIT);
}

void?keyboard(unsigned?char?key?int?x?int?y)?{
switch?(key)?{
case?27:
exit(0);
break;
case?‘a‘:
case?‘A‘:
break;
default:
if?(key?<=?‘z‘?&&?key?>=?‘a‘?||?key?<=?‘Z‘?&&?key?>=?‘A‘?||?key?<=?‘9‘
&&?key?>=?‘0‘)?{
cout?< }?else?{
cout?<?(key);
display();
}
}
}

void?mouseclick(int?button?int?state?int?x?int?y)?{
cout?< switch?(button)?{
case?GLUT_LEFT_BUTTON:
if?(state?==?GLUT_DOWN)?{
if(flagPol

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????617??2011-04-08?11:39??home\BFS.h

?????文件???????1649??2011-04-25?17:59??home\BresenhamLine.h

?????文件????2368512??2011-04-08?11:28??home\Debug\home.bsc

?????文件?????606247??2011-04-08?11:28??home\Debug\home.exe

?????文件?????937692??2011-04-08?11:28??home\Debug\home.ilk

?????文件????8138492??2011-04-08?11:12??home\Debug\home.pch

?????文件????1123328??2011-04-08?11:28??home\Debug\home.pdb

?????文件????2368512??2011-04-25?19:20??home\Debug\Main.bsc

?????文件?????630848??2011-04-25?19:20??home\Debug\Main.exe

?????文件?????948852??2011-04-25?19:20??home\Debug\Main.ilk

?????文件?????233043??2011-04-25?19:20??home\Debug\Main.obj

?????文件????8142588??2011-04-25?19:18??home\Debug\Main.pch

?????文件????1139712??2011-04-25?19:20??home\Debug\Main.pdb

?????文件??????????0??2011-04-25?19:20??home\Debug\Main.sbr

?????文件?????345088??2011-04-25?19:20??home\Debug\vc60.idb

?????文件?????159744??2011-04-25?19:20??home\Debug\vc60.pdb

?????文件???????1001??2011-04-25?19:06??home\draw.h

?????文件???????1186??2011-04-25?17:44??home\drawCN.h

?????文件???????4511??2011-04-08?11:39??home\home.dsp

?????文件????????531??2011-04-08?10:04??home\home.dsw

?????文件??????41984??2011-04-08?11:39??home\home.ncb

?????文件??????49664??2011-04-08?11:39??home\home.opt

?????文件???????1012??2011-04-08?11:28??home\home.plg

?????文件???????5887??2011-04-25?19:20??home\Main.cpp

?????文件???????3381??2011-04-25?19:20??home\Main.dsp

?????文件????????531??2011-04-25?19:20??home\Main.dsw

?????文件??????50176??2011-04-25?19:20??home\Main.ncb

?????文件??????49664??2011-04-25?19:20??home\Main.opt

?????文件????????878??2011-04-25?19:20??home\Main.plg

?????文件???????2576??2011-04-08?10:36??home\Polygon.h

............此處省略5個文件信息

評論

共有 條評論