hecker.txt
来自「自己开发的串口检测工具.方便大家对串口是否正常作检查使用!」· 文本 代码 · 共 41 行
TXT
41 行
Listing 1. Perspective Texture Mapper
#include<windows.h>
#include<math.h>
struct POINT3D {
float X, Y, Z;
float U, V;
};
void TextureMapTriangle( BITMAPINFO const *pDestInfo,
BYTE *pDestBits, POINT3D const *pVertices,
BITMAPINFO const *pTextureInfo,
BYTE *pTextureBits );
/******** structures, inlines, and function declarations **********/
struct gradients {
gradients( POINT3D const *pVertices );
float aOneOverZ[3]; // 1/z for each vertex
float aUOverZ[3]; // u/z for each vertex
float aVOverZ[3]; // v/z for each vertex
float dOneOverZdX, dOneOverZdY; // d(1/z)/dX, d(1/z)/dY
float dUOverZdX, dUOverZdY; // d(u/z)/dX, d(u/z)/dY
float dVOverZdX, dVOverZdY; // d(v/z)/dX, d(v/z)/dY
};
struct edge {
edge(gradients const &Gradients,
POINT3D const *pVertices,
int Top, int Bottom );
inline int Step( void );
float X, XStep; // fractional x and dX/dY
int Y, Height; // current y and vert count
float OneOverZ, OneOverZStep; // 1/z and step
float UOverZ, UOverZStep; // u/z and step
float VOverZ, VOverZStep; // v/z and step
};
inline int edge::Step( void ) {
X += XStep; Y++; Height
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?