view Renderer/Engine/polygon.h @ 1128:293b36802714 draft

code cleanup
author Yutaka_Kinjyo
date Mon, 14 Feb 2011 02:24:28 +0900
parents 6043da6e48f1
children a8bffdb5d2e3
line wrap: on
line source

#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 matrix[16] __attribute__((aligned(16)));;
    float real_matrix[16] __attribute__((aligned(16)));;
    texture_list texture_info __attribute__((aligned(16)));;

    PolygonPackPtr pp;
    int pp_num;

    float xyz[4];     // position
    float angle[4];   // angle
    float c_xyz[4];   // center of rotation
    float *anim;
    float scale[3];

    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