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

  • 大小: 1.16MB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2023-11-07
  • 語言: 其他
  • 標簽: Graphics??Gems??

資源簡介

Graphics Gems圖形圖像編程精粹所有源代碼

資源截圖

代碼片段和文件信息

/*?
Fast?Anti-Aliasing?Polygon?Scan?Conversion
by?Jack?Morrison
from?“Graphics?Gems“?Academic?Press?1990

user?provides?screenX()?vLerp()?and?renderPixel()?routines.
*/

/*
*?Anti-aliased?polygon?scan?conversion?by?Jack?Morrison
*
*?This?code?renders?a?polygon?computing?subpixel?coverage?at
*?8?times?Y?and?16?times?X?display?resolution?for?anti-aliasing.
*?One?optimization?left?out?for?clarity?is?the?use?of?incremental
*?interpolations.?X?coordinate?interpolation?in?particular?can?be
*?with?integers.?See?Dan?Field‘s?article?in?ACM?Transactions?on
*?Graphics?January?1985?for?a?fast?incremental?interpolator.
*/
#include?
#include?“GraphicsGems.h“

#define SUBYRES 8 /*?subpixel?Y?resolution?per?scanline?*/
#define SUBXRES 16 /*?subpixel?X?resolution?per?pixel?*/
#define MAX_AREA (SUBYRES*SUBXRES)
#define MODRES(y) ((y)?&?7) /*subpixel?Y?modulo?*/
#define?MAX_X 0x7FFF /*?subpixel?X?beyond?right?edge?*/

typedef?struct?SurfaceStruct?{??/*?object?shading?surface?info?*/
int red?green?blue; ???/*?color?components?*/
}?Surface;
/*
*?In??real?life?SurfaceStruct?will?contain?many?more?parameters?as
*?required?by?the?shading?and?rendering?programs?such?as?diffuse
*?and?specular?factors?texture?information?transparency?etc.
*/

typedef?struct?VertexStruct { /*?polygon?vertex?*/
Vector3 model?world /*?geometric?information?*/
????normal?image;
int?y; /*?subpixel?display?coordinate?*/
}?Vertex;

Vertex?*Vleft?*VnextLeft; /*?current?left?edge?*/
Vertex?*Vright?*VnextRight; /*?current?right?edge?*/

struct SubPixel??{ /*?subpixel?extents?for?scanline?*/
int?xLeft?xRight;
}?sp[SUBYRES];

int xLmin?xLmax; /*?subpixel?x?extremes?for?scanline?*/
int xRmax?xRmin; /*?(for?optimization?shortcut)?*/

/*?Compute?sub-pixel?x?coordinate?for?vertex?*/
extern?int?screenX(/*?Vertex?*v?*/);

/*?Interpolate?vertex?information?*/
extern?void?vLerp(/*?double?alpha?Vertex?*Va?*Vb?*Vout?*/);

/*?Render?polygon?for?one?pixel?given?coverage?area?*/
/*??and?bitmask?*/
extern?void?renderPixel(/*?int?x?y?Vertex?*V
int?area?unsigned?mask[]?
Surface?*object?*/);

/*
?*?Render?shaded?polygon
?*/
drawPolygon(polygon?numVertex?object)
Vertex polygon[]; /*clockwise?clipped?vertex?list?*/
int numVertex; /*number?of?vertices?in?polygon?*/

Surface?*object; /*?shading?parms?for?this?object?*/
{
Vertex?*endPoly; /*?end?of?polygon?vertex?list?*/
Vertex?VscanLeft?VscanRight; /*?interpolated?vertices?*/? /*?at?scanline?*/
double?aLeft?aRight; /*?interpolation?ratios?*/
struct?SubPixel?*sp_ptr; /*?current?subpixel?info?*/
int?xLeft?xNextLeft; /*?subpixel?coordinates?for?*/
int??xRight?xNextRight; /*?active?polygon?edges?*/
int?iy;

/*?find?vertex?with?minimum?y?(display?coordinate)?*/
Vleft?=?polygon;
for??(i=1;?i if??(polygon[i].y?y)
Vleft?=?&polygon[i];
endPoly?=?&polygon[numVertex-1];

/*?initialize?scanning?edges?*/
Vright?=?VnextRight?=?VnextLeft?=?Vleft

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-01-01?16:45??Graphics?Gems圖形圖像編程精粹所有源代碼\
?????目錄???????????0??2015-01-01?16:45??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\
?????文件???????27375??2000-06-29?08:23??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\AllGems.TOC
?????文件???????73084??2001-12-05?07:49??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\authors.html
?????文件???????59319??2001-12-05?07:49??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\category.html
?????文件???????15715??2001-07-05?09:33??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\Errata.GraphicsGems
?????文件???????10095??2002-05-12?12:20??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\Errata.GraphicsGemsII
?????文件????????9459??2002-05-13?22:06??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\Errata.GraphicsGemsIII
?????文件????????1593??2000-06-29?08:24??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\Errata.GraphicsGemsIV
?????文件????????3373??2002-05-13?21:53??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\Errata.GraphicsGemsV
?????目錄???????????0??2001-01-03?11:21??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\
?????目錄???????????0??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\2DClip\
?????文件????????3146??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\2DClip\bio.c
?????文件?????????186??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\2DClip\box.h
?????文件????????2899??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\2DClip\clip.c
?????文件????????6783??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\2DClip\cross.c
?????文件????????1795??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\2DClip\line.h
?????文件?????????212??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\2DClip\Makefile
?????目錄???????????0??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\AALines\
?????文件????????1074??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\AALines\00README
?????文件????????5139??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\AALines\AALines.c
?????文件????????1371??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\AALines\AALines.h
?????文件????????1578??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\AALines\AAMain.c
?????文件????????5772??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\AALines\AATables.c
?????文件???????12331??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\AALines\FastMatMul.c
?????文件????????1701??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\AALines\LongConst.h
?????文件?????????497??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\AALines\Makefile
?????文件????????4502??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\AALines\utah.c
?????文件?????????859??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\AALines\utah.h
?????文件????????7609??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\AAPolyScan.c
?????文件????????4017??2000-06-29?08:12??Graphics?Gems圖形圖像編程精粹所有源代碼\GraphicsGems\gems\Albers.c
............此處省略623個文件信息

評論

共有 條評論