diff Renderer/Engine/polygon.h @ 507:735f76483bb2

Reorganization..
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 12 Oct 2009 09:39:35 +0900
parents Renderer/test_render/polygon.h@55ea4465b1a2
children 510424e175ae
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Renderer/Engine/polygon.h	Mon Oct 12 09:39:35 2009 +0900
@@ -0,0 +1,50 @@
+#ifndef INCLUDED_POLYGON
+#define INCLUDED_POLYGON
+
+#include <SDL.h>
+#include <libxml/parser.h>
+#include "polygon_pack.h"
+#include "SpanPack.h"
+#include "texture.h"
+
+class Polygon {
+public:
+    long long size;
+    const char *name;
+    const char *parent_name;
+
+    //float *data;    //"vertex" and "normal" and "texture"
+    float *coord_xyz; // vertex coordinate array
+    float *coord_tex; // texture coordinate array
+    float *normal;    // normal vector array
+    float xyz[4];     // position
+    float angle[4];   // angle
+    float c_xyz[4];   // center of rotation
+    float matrix[16];
+    float *anim;
+    int texture_id; //texture id number
+    struct texture_list texture_info;
+
+    SDL_Surface* texture_image;
+
+    Polygon(void);
+
+    void parameter_change(char *name, float x, float y, float z, float ax, float ay, float az);
+    //void load_texture(char *image_name);
+    //void draw(float *stack);
+    //void draw(SceneGraphPack *sgp);
+    //void draw(PolygonPack *pp);
+    //void draw(SpanPack *sp);
+    Uint32 get_rgb(int tx, int ty);
+
+public:
+    void position_init(void);
+
+    void tree_draw();
+    void pickup_coordinate(char *cont);
+    void pickup_normal(char *cont);
+    void pickup_model(char *cont);
+    void pickup_texture(char *cont);
+};
+
+#endif