-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFork.hpp
More file actions
37 lines (24 loc) · 664 Bytes
/
Fork.hpp
File metadata and controls
37 lines (24 loc) · 664 Bytes
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
27
28
29
30
31
32
33
34
35
36
#pragma once
#include <vector>
#include <bt/btBulletCollisionCommon.h>
#include <vitiGL.hpp>
#include <PhysicObject.hpp>
#include <ForceField.hpp>
class Fork {
public:
Fork(vitiGL::Scene& scene);
void init();
void onSDLEvent(SDL_Event& input, vitiGL::Camera& cam);
~Fork();
private:
void makeChain(const glm::vec3 & startPos, int counter, float distance, const glm::vec3& scale);
vitiGEO::CuboidChain* _chain;
vitiGL::SceneNode* _fork;
vitiGEO::HingeConstraint* _c1;
vitiGEO::HingeConstraint* _c2;
vitiGL::Scene& _scene;
bool _motorOn;
const float _speed = 2.f;
const float _rotSpeed = 0.5f;
vitiGEO::ForceField* _forceField;
};