view TaskManager/Test/test_render/Application/Chain.h @ 525:99a92f6a1c59

change Application
author hiroki@henri.cr.ie.u-ryukyu.ac.jp
date Mon, 12 Oct 2009 11:26:17 +0900
parents dc50a62ffd96
children 541013f7015c
line wrap: on
line source

#include "../Application.h"

typedef struct {
    double x, y, next_x, next_y;
    double vx, vy, next_vx, next_vy;
    double xyz[3];
    double angle[3];
    int can_move;
    SceneGraphPtr parent;
    int id;
    int parent_id;
} *ChainPropertyPtr, ChainProperty;


class Chain : public Application {
public:
    Chain(){}
    
    //SceneGraphPtr scenegraph_factory(void *p, int size);
    //SceneGraphPtr scenegraph_connector(void *p, int size, SceneGraphPtr s, SceneGraphPtr sg_available_list);
    // Application virtual func
    void scenegraph_factory(void *p, int size) {};
    void scenegraph_connector(void *p, int size, SceneGraphPtr s, SceneGraphPtr sg_available_list) {};
    void apply_property(void *p, SceneGraphPtr sgptr);

    void init(TaskManager *manager, int w, int h);
    void init_chain_vars(ChainPropertyPtr cv);
    void chain_move(TaskManager *manager, SceneGraphPtr sg, int w, int h);
    void chain_collision(SceneGraphPtr sg, int w, int h, SceneGraphPtr osg);

};