Physics-Simulator  v1.4.0-beta.2
rope.h
Go to the documentation of this file.
1 #ifndef __MY_ROPE_HEADER__
2 #define __MY_ROPE_HEADER__
3 /*****************************************************************************/
4 #include "cannonball.h"
5 /*****************************************************************************/
10 /*****************************************************************************/
18 };
19 /*****************************************************************************/
26 };
27 
34 };
35 
42 };
43 
45 typedef struct stcOneTwoBalls BallsSpots;
47 /*****************************************************************************/
48 class clsRope {
49  public:
50  clsRope();
51  ~clsRope();
52  void activate(void);
53  //dblXY addTension(void);
54 
55  void update(void);
56  void draw(void);
57 
58  bool isActive(void);
59 
60  void setAttachment(uchar,LOC);
61  void setAttachment(uchar,clsCannonball*);
62 
64  private:
65 
66  void update_spots(void);
67  dblXY ballWallForces(dblXY, double);
68 
69  uint length_;
71  PlacesSpots spot_;
72  AttachSpots attachments_;
73  BallsSpots balls_;
74 };
75 /*****************************************************************************/
76 #endif // __ROPE_HEADER__
Definition: cannonball.h:24
clsCannonball * two
Definition: rope.h:41
RopeAttachment
Definition: rope.h:14
Definition: rope.h:23
bool blncheckphysics_
Definition: rope.h:63
unsigned int uint
Definition: global.h:16
unsigned char uchar
Definition: global.h:12
LOC one
Definition: rope.h:32
uchar one
Definition: rope.h:24
LOC two
Definition: rope.h:33
Definition: rope.h:17
uchar two
Definition: rope.h:25
Definition: rope.h:31
Definition: rope.h:39
This class will hold all of the functions for the rope.
Definition: rope.h:48
clsCannonball * one
Definition: rope.h:40
Definition: screen.h:36
Definition: rope.h:16
Definition: rope.h:15
This class is used to create and control each of the balls.
Definition: cannonball.h:70