# HG changeset patch
# User e065746@localhost.localdomain
# Date 1244192008 -32400
# Node ID e57427a7500b6d639cbf1911a18a779e6583359c
# Parent 845c78552f4832041b97087f93c8289222f5d170
doxygen
diff -r 845c78552f48 -r e57427a7500b Document/document/html/Ball_8h-source.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Document/document/html/Ball_8h-source.html Fri Jun 05 17:53:28 2009 +0900
@@ -0,0 +1,27 @@
+
+
+
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
+
+
+
TileList Member List
This is the complete list of members for
TileList, including all inherited members.
+
+
TileList Class Reference
#include <Tapestry.h>
+
+
+
+List of all members.
+ |
+
Public Member Functions |
+TilePtr | nextTile (void) |
+
+void | clear (void) |
+
+
Public Attributes |
+
+int | curIndex |
+
+
+int | pad [3] |
+
+
+Tile | tile [MAX_TILE] |
+
+
+
Detailed Description
+
TileList 中の Tile の追い出しは、現在 FIFO で実装している
Member Function Documentation
+
+
+
+
+
+ void TileList::clear |
+ ( |
+ void |
+ |
+ ) |
+ [inline] |
+
+
+
+
+
+
+TileList のクリア //tile 自体は clear する必要は無い あるかもしれない
+
+
+
+
+
+
+
+ TilePtr TileList::nextTile |
+ ( |
+ void |
+ |
+ ) |
+ [inline] |
+
+
+
+
+
+
+次に扱う tile を取得する
+
- Returns:
- tile
+tile[] をリングバスっぽく扱うことで FIFO を実現することに。
+
+
+
The documentation for this class was generated from the following file:
+
+
+
File List
Here is a list of all documented files with brief descriptions:
+
+
+Here is a list of all documented class members with links to the class documentation for each member:
+
+
+
+
+
+
+
fb.h
00001 extern int get_fbdev_addr(void);
+00002
+00003 #if defined(__linux__)
+00004 #include <unistd.h>
+00005 #include <stdio.h>
+00006 #include <fcntl.h>
+00007 #include <linux/fb.h>
+00008 #include <linux/fs.h>
+00009 #include <sys/mman.h>
+00010 #include <sys/ioctl.h>
+00011 #include <stdlib.h>
+00012 #include <iostream>
+00013 using namespace std;
+00014
+00015 #define DEVICE_NAME "/dev/fb0"
+00016 #define DIV_BYTE 8
+00017
+00018 #define X_PIXEL_MAX 320
+00019 #define Y_LINE_MAX 240
+00020
+00021 #define BORDER1 80
+00022 #define BORDER2 160
+00023
+00024 #define COLOR_RED 0xf800
+00025 #define COLOR_GREEN 0x07e0
+00026 #define COLOR_BLUE 0x001f
+00027 #define COLOR_WHITE 0xffff
+00028 #define COLOR_BLACK 0x0000
+00029 #define COLOR_YELLOW 0xffe0
+00030
+00031
+00032 void send_current_error_msg(char *ptr);
+00033 void send_current_information(char *ptr);
+00034
+00035 int get_fbdev_addr(void)
+00036 {
+00037 int fd_framebuffer ;
+00038 struct fb_var_screeninfo vinfo;
+00039 struct fb_fix_screeninfo finfo;
+00040 long int screensize ;
+00041
+00042 char *fbptr ;
+00043 char tmp[DIV_BYTE*10];
+00044
+00045
+00046 int xres,yres,vbpp,line_len;
+00047
+00048
+00049
+00050 fd_framebuffer = open( DEVICE_NAME , O_RDWR);
+00051 if ( !fd_framebuffer ) {
+00052 send_current_error_msg("Framebuffer device open error !");
+00053 exit(1);
+00054 }
+00055 send_current_information("The framebuffer device was opened !");
+00056
+00057
+00058 if ( ioctl( fd_framebuffer , FBIOGET_FSCREENINFO , &finfo ) ) {
+00059 send_current_error_msg("Fixed information not gotton !");
+00060 exit(2);
+00061 }
+00062
+00063
+00064 if ( ioctl( fd_framebuffer , FBIOGET_VSCREENINFO , &vinfo ) ) {
+00065 send_current_error_msg("Variable information not gotton !");
+00066 exit(3);
+00067 }
+00068 xres = vinfo.xres ;
+00069 yres = vinfo.yres ;
+00070 vbpp = vinfo.bits_per_pixel ;
+00071 line_len = finfo.line_length ;
+00072 sprintf( tmp , "%d(pixel)x%d(line), %dbpp(bits per pixel)",xres,yres,vbpp);
+00073 send_current_information( tmp );
+00074
+00075
+00076 screensize = xres * yres * vbpp / DIV_BYTE ;
+00077
+00078
+00079 fbptr = (char *)mmap(0,screensize,PROT_READ | PROT_WRITE,MAP_SHARED,fd_framebuffer,0);
+00080 if ( (int)fbptr == -1 ) {
+00081 send_current_error_msg("Don't get framebuffer device to memory !");
+00082 exit(4);
+00083 }
+00084 send_current_information("The framebuffer device was mapped !");
+00085
+00086 printf("fb: 0x%x \n", (unsigned int)fbptr);
+00087 return (int)fbptr;
+00088
+00089
+00090
+00091 }
+00092
+00093 void send_current_error_msg(char *ptr)
+00094 {
+00095 fprintf( stderr , "%s\n" , ptr );
+00096 }
+00097
+00098 void send_current_information(char *ptr)
+00099 {
+00100 fprintf( stdout , "%s\n" , ptr );
+00101 }
+00102 #else
+00103 int get_fbdev_addr(void) {return 0;}
+00104 #endif
+
+
+
+
+
DrawSpan.h
00001 #ifndef INCLUDED_TASK_DRAW_SPAN
+00002 #define INCLUDED_TASK_DRAW_SPAN
+00003
+00004 #ifndef INCLUDED_SCHED_TASK
+00005 # include "SchedTask.h"
+00006 #endif
+00007
+00008 #ifndef INCLUDED_TAPESTRY
+00009 # include "Tapestry.h"
+00010 #endif
+00011
+00012 #ifndef INCLUDED_SPAN_PACK
+00013 # include "SpanPack.h"
+00014 #endif
+00015
+00016 #ifndef INCLUDED_TEXTURE_HASH
+00017 # include "TileHash.h"
+00018 #endif
+00019
+00020 class DrawSpan : public SchedTask {
+00021 public:
+00022 SchedConstructor(DrawSpan);
+00023
+00024 int *linebuf;
+00025 float *zRow;
+00026 TileHashPtr hash;
+00027 TileListPtr tileList;
+00028 int doneWrite;
+00029
+00030 ~DrawSpan(void);
+00031
+00032 int run(void *rbuf, void *wbuf);
+00033
+00034 int* linebuf_init(int width, int height, int rgb);
+00035 float* zRow_init(int width, int height);
+00036 void set_rgb(uint32 *addr, int wait_tag);
+00037 void set_rgbs(uint32 *addr, uint32 *max_addr, int wait_tag);
+00038 uint32 get_rgb(int tx, int ty, uint32 *addr);
+00039 TilePtr isAvailableTile(uint32 *addr);
+00040 uint32* getTile(int tx, int ty, int tw, uint32 *tex_addr_top);
+00041 int getTexBlock(int tx, int ty, int twidth);
+00042 void writebuffer(unsigned int display, int width, int height,
+00043 int screen_width);
+00044 void updateBuffer(float zpos, int rangex, int x, int y,
+00045 int tex_x, int tex_y, uint32 *tex_addr);
+00046
+00047
+00048 void reboot(SpanPackPtr spack, int cur_span_x);
+00049
+00050 int drawDot1(SpanPtr span, int startx, int endx, int wait_tag);
+00051 void drawDot2(SpanPtr span, int startx, int endx, int js, int wait_tag);
+00052 int drawLine1(SpanPtr span, int startx, int endx, int wait_tag);
+00053 void drawLine2(SpanPtr span, int startx, int endx, int js, int wait_tag);
+00054 };
+00055
+00056 typedef struct {
+00057 uint32 display;
+00058 int screen_width;
+00059 int rangex_start;
+00060 int rangex_end;
+00061 int rangey;
+00062 } DrawSpanArg, *DrawSpanArgPtr;
+00063
+00064 #endif
+
+
+
texture_block Struct Reference
#include <Tapestry.h>
+
+
+
Detailed Description
+image file name と tapestry DB の binary tree
+// PPE main memory の tapestry DB (Array) tapestry DB への accessor
+TapestryPtr getTapestry(int TapestryID); TilePtr getTile(TapestryPtr tapsetry, int tx, int ty, int scale);
+SPE が生成する tapestry List (in CreateSpan) (no texture image) TapestryDBPtr, Tapestry ID, x, y, tx, ty, px, py x, y : polygon の中の平面座標 tx, ty : texture の座標 px, py : texture の分割数
+(TilePtr, tix1, tiy1, tix2, tiy2)*
+SPE に渡す tapestry List Tile
+// SPE SPE 内部での tapestry DB (Hash) TapestryID, scale, TilePtr, Tile
+SPE 内部での tapestry DB への accessor TileEntryPtr getTile(int TapestryID, int tx, int ty, int scale);
+if (TileEntry == NULL) { DMA read }
+Rendering 1pass Zbuffer と Texture の有無の判定 if (zbuffer ok) { if (texture ある) { zbuffer 、linebunf に書き込む } else { texture の load list に加える zbuffer だけ更新しておく } } else { 無視 }
+1pass で texture が一杯になったら、中断して ここまでのを書き込んどけ
+2pass rgb の書き込み
+if (zbuffer の値が自分と一緒) { read した texture みて 書き込め! }
The documentation for this struct was generated from the following file:
+
+
+
+
+
DrawSpan.h
00001 #ifndef INCLUDED_TASK_DRAW_SPAN
+00002 #define INCLUDED_TASK_DRAW_SPAN
+00003
+00004 #ifndef INCLUDED_SCHED_TASK
+00005 # include "SchedTask.h"
+00006 #endif
+00007
+00008 #ifndef INCLUDED_TAPESTRY
+00009 # include "Tapestry.h"
+00010 #endif
+00011
+00012 #ifndef INCLUDED_SPAN_PACK
+00013 # include "SpanPack.h"
+00014 #endif
+00015
+00016 #ifndef INCLUDED_TEXTURE_HASH
+00017 # include "TileHash.h"
+00018 #endif
+00019
+00020 class DrawSpan : public SchedTask {
+00021 public:
+00022 SchedConstructor(DrawSpan);
+00023
+00024 int *linebuf;
+00025 float *zRow;
+00026 TileHashPtr hash;
+00027 TileListPtr tileList;
+00028 int doneWrite;
+00029
+00030 ~DrawSpan(void);
+00031
+00032 int run(void *rbuf, void *wbuf);
+00033
+00034 int* linebuf_init(int width, int height, int rgb);
+00035 float* zRow_init(int width, int height);
+00036 void set_rgb(uint32 *addr, int wait_tag);
+00037 void set_rgbs(uint32 *addr, uint32 *max_addr, int wait_tag);
+00038 uint32 get_rgb(int tx, int ty, uint32 *addr);
+00039 TilePtr isAvailableTile(uint32 *addr);
+00040 uint32* getTile(int tx, int ty, int tw, uint32 *tex_addr_top);
+00041 int getTexBlock(int tx, int ty, int twidth);
+00042 void writebuffer(unsigned int display, int width, int height,
+00043 int screen_width);
+00044 void updateBuffer(float zpos, int rangex, int x, int y,
+00045 int tex_x, int tex_y, uint32 *tex_addr);
+00046
+00047
+00048 void reboot(SpanPackPtr spack, int cur_span_x);
+00049
+00050 int drawDot1(SpanPtr span, int startx, int endx, int wait_tag);
+00051 void drawDot2(SpanPtr span, int startx, int endx, int js, int wait_tag);
+00052 int drawLine1(SpanPtr span, int startx, int endx, int wait_tag);
+00053 void drawLine2(SpanPtr span, int startx, int endx, int js, int wait_tag);
+00054 };
+00055
+00056 typedef struct {
+00057 uint32 display;
+00058 int screen_width;
+00059 int rangex_start;
+00060 int rangex_end;
+00061 int rangey;
+00062 } DrawSpanArg, *DrawSpanArgPtr;
+00063
+00064 #endif
+
+
+
+
+
fb.h
00001 #if defined(__linux__)
+00002 #include <unistd.h>
+00003 #include <stdio.h>
+00004 #include <fcntl.h>
+00005 #include <linux/fb.h>
+00006 #include <linux/fs.h>
+00007 #include <sys/mman.h>
+00008 #include <sys/ioctl.h>
+00009 #include <stdlib.h>
+00010 #include <iostream>
+00011 using namespace std;
+00012
+00013 #define DEVICE_NAME "/dev/fb0"
+00014 #define DIV_BYTE 8
+00015
+00016
+00017 void send_current_error_msg(const char *ptr);
+00018 void send_current_information(const char *ptr);
+00019
+00020 int get_fbdev_addr(void)
+00021 {
+00022 int fd_framebuffer ;
+00023 struct fb_var_screeninfo vinfo;
+00024 struct fb_fix_screeninfo finfo;
+00025 long int screensize ;
+00026
+00027 char *fbptr ;
+00028 char tmp[DIV_BYTE*10];
+00029
+00030
+00031 int xres,yres,vbpp,line_len;
+00032
+00033
+00034
+00035 fd_framebuffer = open( DEVICE_NAME , O_RDWR);
+00036 if ( !fd_framebuffer ) {
+00037 send_current_error_msg("Framebuffer device open error !");
+00038 exit(1);
+00039 }
+00040 send_current_information("The framebuffer device was opened !");
+00041
+00042
+00043 if ( ioctl( fd_framebuffer , FBIOGET_FSCREENINFO , &finfo ) ) {
+00044 send_current_error_msg("Fixed information not gotton !");
+00045 exit(2);
+00046 }
+00047
+00048
+00049 if ( ioctl( fd_framebuffer , FBIOGET_VSCREENINFO , &vinfo ) ) {
+00050 send_current_error_msg("Variable information not gotton !");
+00051 exit(3);
+00052 }
+00053 xres = vinfo.xres ;
+00054 yres = vinfo.yres ;
+00055 vbpp = vinfo.bits_per_pixel ;
+00056 line_len = finfo.line_length ;
+00057 sprintf( tmp , "%d(pixel)x%d(line), %dbpp(bits per pixel)",xres,yres,vbpp);
+00058 send_current_information( tmp );
+00059
+00060
+00061 screensize = xres * yres * vbpp / DIV_BYTE ;
+00062
+00063
+00064 fbptr = (char *)mmap(0,screensize,PROT_READ | PROT_WRITE,MAP_SHARED,fd_framebuffer,0);
+00065 if ( (int)fbptr == -1 ) {
+00066 send_current_error_msg("Don't get framebuffer device to memory !");
+00067 exit(4);
+00068 }
+00069 send_current_information("The framebuffer device was mapped !");
+00070
+00071 printf("fb: 0x%x \n", (unsigned int)fbptr);
+00072 return (int)fbptr;
+00073
+00074
+00075
+00076 }
+00077
+00078 void send_current_error_msg(const char *ptr)
+00079 {
+00080 fprintf( stderr , "%s\n" , ptr );
+00081 }
+00082
+00083 void send_current_information(const char *ptr)
+00084 {
+00085 fprintf( stdout , "%s\n" , ptr );
+00086 }
+00087 #else
+00088 int get_fbdev_addr(void) {return 0;}
+00089 #endif
+00090
+00091 extern int get_fbdev_addr(void);
+
+
+
+
+
sys.h
00001 void noMoreMemory();
+00002 void get_matrix(float *matrix, float *rxyz, float *txyz, float *stack);
+00003 void rotate_x(float *xyz, float r);
+00004 void rotate_y(float *xyz, float r);
+00005 void rotate_z(float *xyz, float r);
+00006
+00007 void rotate(float *xyz, float *matrix);
+00008 void translate(float *xyz, float x, float y, float z);
+00009 void matrix4x4(float *, float *, float *);
+00010
+00011 void normalize(float *v0, float *v1);
+00012 void subVector(float *v0, float *v1, float *v2);
+00013 void outerProduct(float *v0, float *v1, float *v2);
+00014 float innerProduct(float *v0, float *v1);
+00015 void applyMatrix(float *v0, float *m, float *v1);
+00016 void inversMatrix(float *m0, float *m1);
+00017 void transposeMatrix(float *m0, float *m1);
+00018 void unitMatrix(float *m);
+00019 void transMatrix(float *m0, float *m1, float *v);
+
+