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

資源簡介

生成維諾圖,先產生點,生成凸包,進行Delaunay三角剖分,最后生成維諾圖。使用OpenGL顯示結果,注釋詳盡,基于visual studio 2017的控制臺程序。

資源截圖

代碼片段和文件信息

/*!
*??????\file?RgbImage.cpp
*??????\brief?Implementation?of?RgbImage?Class
*??????\date?Documented?on?10/08/2010
*
*/

#include?“RgbImage.h“

#ifndef?RGBIMAGE_DONT_USE_OPENGL
#include?
#include?“GL/gl.h“
#endif

/*!?RgbImage?constructor
* \param?numRows?number?of?rows
*???\param?numCols?number?of?cols
*/
RgbImage::RgbImage(?int?numRows?int?numCols?)
{
NumRows?=?numRows;
NumCols?=?numCols;
ImagePtr?=?new?unsigned?char[NumRows*GetNumBytesPerRow()];
if?(?!ImagePtr?)?{
fprintf(stderr?“Unable?to?allocate?memory?for?%ld?x?%ld?bitmap.\n“?
NumRows?NumCols);
Reset();
ErrorCode?=?MemoryError;
}
//?Zero?out?the?image
unsigned?char*?c?=?ImagePtr;
int?rowLen?=?GetNumBytesPerRow();
for?(?int?i=0;?i {
for?(?int?j=0;?j {
*(c++)?=?0;
}
}
}

/*?********************************************************************
?*??LoadBmpFile
?*??Read?into?memory?an?RGB?image?from?an?uncompressed?BMP?file.
?*??Return?true?for?success?false?for?failure.??Error?code?is?available
?*?????with?a?separate?call.
?*??Author:?Sam?Buss?December?2001.
?**********************************************************************/
/*!
?* LoadBmpFile?
?*?\param?filename?input?file?name
?*?\return?whether?the?loading?is?successful
?*/
bool?RgbImage::LoadBmpFile(?const?char*?filename?)?
{??
Reset();
errno_t?err;
FILE*?infile; //?Open?for?reading?binary?data
if?((err?=?fopen_s(&infile?filename?“rb“))?!=?0)?{
fprintf(stderr?“Unable?to?open?file:?%s\n“?filename);
ErrorCode?=?OpenError;
return?false;
}

if?(?!infile?)?{
fprintf(stderr?“Unable?to?open?file:?%s\n“?filename);
ErrorCode?=?OpenError;
return?false;
}

bool?fileFormatOK?=?false;
int?bChar?=?fgetc(?infile?);
int?mChar?=?fgetc(?infile?);
if?(?bChar==‘B‘?&&?mChar==‘M‘?)?{ //?If?starts?with?“BM“?for?“BitMap“
skipChars(?infile?4+2+2+4+4?); //?Skip?4?fields?we?don‘t?care?about
NumCols?=?readLong(?infile?);
NumRows?=?readLong(?infile?);
skipChars(?infile?2?); //?Skip?one?field
int?bitsPerPixel?=?readShort(?infile?);
skipChars(?infile?4+4+4+4+4+4?); //?Skip?6?more?fields

if?(?NumCols>0?&&?NumCols<=100000?&&?NumRows>0?&&?NumRows<=100000??
&&?bitsPerPixel==24?&&?!feof(infile)?)?{
fileFormatOK?=?true;
}
}
if?(?!fileFormatOK?)?{
Reset();
ErrorCode?=?FileFormatError;
fprintf(stderr?“Not?a?valid?24-bit?bitmap?file:?%s.\n“?filename);
fclose?(?infile?);
return?false;
}

//?Allocate?memory
ImagePtr?=?new?unsigned?char[NumRows*GetNumBytesPerRow()];
if?(?!ImagePtr?)?{
fprintf(stderr?“Unable?to?allocate?memory?for?%ld?x?%ld?bitmap:?%s.\n“?
NumRows?NumCols?filename);
Reset();
ErrorCode?=?MemoryError;
fclose?(?infile?);
return?false;
}

unsigned?char*?cPtr?=?ImagePtr;
for?(?int?i=0;?i int?j;
for?(?j=0;?j *(cPtr+2)?=?fgetc(?infile?); //?Blue?color?value
*(cPtr+1)?=?fgetc(?infile?); //?Green?color?value
*cPtr?=?fgetc(?infile?); //?Red

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-12-04?17:56??Voronoi?Diagram2D\
?????目錄???????????0??2018-07-24?15:40??Voronoi?Diagram2D\.vs\
?????目錄???????????0??2018-07-24?15:40??Voronoi?Diagram2D\.vs\Voronoi?Diagram2D\
?????目錄???????????0??2018-12-04?17:56??Voronoi?Diagram2D\.vs\Voronoi?Diagram2D\v15\
?????文件???????34816??2018-12-04?17:56??Voronoi?Diagram2D\.vs\Voronoi?Diagram2D\v15\.suo
?????文件?????6733824??2018-12-04?17:56??Voronoi?Diagram2D\.vs\Voronoi?Diagram2D\v15\Browse.VC.db
?????目錄???????????0??2018-07-24?15:40??Voronoi?Diagram2D\.vs\Voronoi?Diagram2D\v15\ipch\
?????目錄???????????0??2018-12-04?17:56??Voronoi?Diagram2D\.vs\Voronoi?Diagram2D\v15\ipch\AutoPCH\
?????目錄???????????0??2018-07-26?17:37??Voronoi?Diagram2D\.vs\Voronoi?Diagram2D\v15\ipch\AutoPCH\597c50cab9dc43b4\
?????文件????50069504??2018-07-27?08:17??Voronoi?Diagram2D\.vs\Voronoi?Diagram2D\v15\ipch\AutoPCH\597c50cab9dc43b4\MAIN.ipch
?????目錄???????????0??2018-07-24?15:40??Voronoi?Diagram2D\.vs\Voronoi?Diagram2D\v15\ipch\AutoPCH\638424cb7ccb77c4\
?????文件????50069504??2018-07-21?13:35??Voronoi?Diagram2D\.vs\Voronoi?Diagram2D\v15\ipch\AutoPCH\638424cb7ccb77c4\MAIN.ipch
?????目錄???????????0??2018-07-24?15:40??Voronoi?Diagram2D\.vs\Voronoi?Diagram2D\v15\ipch\AutoPCH\b3961218084a946a\
?????文件????52035584??2018-07-14?14:01??Voronoi?Diagram2D\.vs\Voronoi?Diagram2D\v15\ipch\AutoPCH\b3961218084a946a\HEDER.ipch
?????目錄???????????0??2018-07-24?15:40??Voronoi?Diagram2D\MeshLib\
?????目錄???????????0??2018-07-24?15:40??Voronoi?Diagram2D\MeshLib\core\
?????目錄???????????0??2018-07-24?15:40??Voronoi?Diagram2D\MeshLib\core\bmp\
?????文件???????11443??2018-07-05?20:32??Voronoi?Diagram2D\MeshLib\core\bmp\RgbImage.cpp
?????文件????????7829??2016-01-21?19:07??Voronoi?Diagram2D\MeshLib\core\bmp\RgbImage.h
?????目錄???????????0??2018-07-24?15:40??Voronoi?Diagram2D\MeshLib\core\Geometry\
?????文件????????5082??2017-10-15?12:56??Voronoi?Diagram2D\MeshLib\core\Geometry\Point.h
?????文件????????6549??2017-03-10?11:59??Voronoi?Diagram2D\MeshLib\core\Geometry\Point2.H
?????文件????????4239??2016-01-21?19:07??Voronoi?Diagram2D\MeshLib\core\Geometry\quat.h
?????目錄???????????0??2018-07-24?15:40??Voronoi?Diagram2D\MeshLib\core\Mesh\
?????文件???????61863??2018-07-20?20:00??Voronoi?Diagram2D\MeshLib\core\Mesh\baseMesh.h
?????文件???????11064??2017-04-11?21:08??Voronoi?Diagram2D\MeshLib\core\Mesh\boundary.h
?????文件???????24050??2016-01-21?19:07??Voronoi?Diagram2D\MeshLib\core\Mesh\DynamicMesh.h
?????文件????????1778??2016-01-21?19:07??Voronoi?Diagram2D\MeshLib\core\Mesh\Edge.h
?????文件????????1333??2016-01-21?19:07??Voronoi?Diagram2D\MeshLib\core\Mesh\Face.h
?????文件????????3825??2016-01-21?19:07??Voronoi?Diagram2D\MeshLib\core\Mesh\HalfEdge.h
?????文件???????20604??2016-01-21?19:07??Voronoi?Diagram2D\MeshLib\core\Mesh\iterators.h
............此處省略19個文件信息

評論

共有 條評論