Revision 1378,
790 bytes
checked in by giegl, 18 years ago
(diff) |
GTPD - Jungle Rumble - integrate into GTP SVN structure
|
Line | |
---|
1 | #pragma once
|
---|
2 | #include "node.h"
|
---|
3 | #include "Plane.h"
|
---|
4 | #include "Scene.h"
|
---|
5 | #include "NxPhysics.h"
|
---|
6 | #include <list>
|
---|
7 |
|
---|
8 | #define FRONT 0
|
---|
9 | #define BACK 1
|
---|
10 | #define TOP 2
|
---|
11 | #define BOTTOM 3
|
---|
12 | #define LEFT 4
|
---|
13 | #define RIGHT 5
|
---|
14 |
|
---|
15 | class ParticleCube :
|
---|
16 | public Node
|
---|
17 | {
|
---|
18 | public:
|
---|
19 | ParticleCube(void);
|
---|
20 | ~ParticleCube(void);
|
---|
21 |
|
---|
22 | void setDimensions(float _w, float _h, float _d);
|
---|
23 | virtual void update(float dt);
|
---|
24 |
|
---|
25 | void addForceToParticle(Node* particle, Vector force);
|
---|
26 | void addVelocityToParticle(Node* particle, Vector velocity);
|
---|
27 |
|
---|
28 | protected:
|
---|
29 | float width, height, depth;
|
---|
30 |
|
---|
31 | Plane wall[6];
|
---|
32 | void updatePlanes();
|
---|
33 |
|
---|
34 | bool calcLocalPosition;
|
---|
35 | bool calcLocalVelocity;
|
---|
36 |
|
---|
37 | std::list<Node *> myParticleList;
|
---|
38 | std::list<Vector> myParticlePositionList;
|
---|
39 | std::list<Vector> myParticleVelocityList;
|
---|
40 | };
|
---|
Note: See
TracBrowser
for help on using the repository browser.