Mercurial > hg > Game > Cerium
view Renderer/DataPack/Test/SpanPack/polygonpack.h @ 503:516d5c91d5b4 draft double-linked-task-list
comment
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 11 Oct 2009 19:35:33 +0900 |
parents | 587baff06cbc |
children |
line wrap: on
line source
#ifndef INCLUDE_POLYGON_PACK #define INCLUDE_POLYGON_PACK typedef struct vertex { float x; float y; float z; float tex_x; float tex_y; }Vertex, *Vertex_ptr; typedef struct Triangle { long *tex_addr, tex_width, tex_height; Vertex ver1; Vertex ver2; Vertex ver3; //float x1, y1, z1, tex_x1, tex_y1; //float x2, y2, z2, tex_x2, tex_y2; //float x3, y3, z3, tex_x3, tex_y3; } TRIANGLEPACK, *TRIANGLEPACK_PTR; typedef struct PolygonPack { struct PORIGON_INFO { int size; int light_pos[3]; int light_rgb[3]; }info; TRIANGLEPACK tri[16]; } POLYGONPACK,*POLYGONPACK_PTR; typedef struct Span { long tex_addr, tex_width, tex_height; int x, y, length_x; float start_z, end_z; float tex_x1, tex_x2, tex_y1, tex_y2; } SPAN, *SPNA_PTR; typedef struct SpanPack { struct PORIGON_INFO { int size; int light_pos[3]; int light_rgb[3]; } info; SPAN span[16]; } SPANPACK, *SPANPACK_PTR; class Polygon_Pack { public: int create_span(void *wbuf, void *rbuf); void half_triangle(long *tex_addr,long tex_width,long tex_height,Vertex *vMin, Vertex *vMid, Vertex *vMid1); }; #endif