blglm_simulator.h 804 Bytes
Newer Older
Arnaud Blanchard's avatar
Arnaud Blanchard committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef BLGLM_SIMULATOR_H
#define BLGLM_SIMULATOR_H

#include <glm/glm.hpp>

typedef struct blglm_simulator_joint{
    
    float *angle_pt, limit_min, limit_max;
    glm::mat4 model;
    glm::vec3 pos, axis;
    blglm_simulator_joint **joints;
    int joints_nb;

    static blglm_simulator_joint **root_joints;
    static int root_joints_nb;
    
    blglm_simulator_joint(blglm_simulator_joint *support, glm::vec3 pos, glm::vec3 axis,  float *angle_pt, float limit_min=-M_PI, float limit_max=M_PI);
 //   blgl_ball_joint(blgl_joint *support, glm::vec3 pos, float angles_pt[3], float limit_min=-M_PI, float limit_max=M_PI);

    ~blglm_simulator_joint();
    void update(glm::mat4 model);
    
    static void update_all();
    static void remove_all();
}blglm_simulator_joint;
#endif /* _3DMODEL_H */