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
/*****************************************************************************/
14
enum
RopeAttachment
{
15
AttachmentNone
= 0,
16
AttachmentBall
,
17
AttachmentWall
18
};
19
/*****************************************************************************/
23
struct
stcOneTwoAttachment
{
24
uchar
one
;
25
uchar
two
;
26
};
27
31
struct
stcOneTwoPlaces
{
32
LOC
one
;
33
LOC
two
;
34
};
35
39
struct
stcOneTwoBalls
{
40
clsCannonball
*
one
;
41
clsCannonball
*
two
;
42
};
43
44
typedef
struct
stcOneTwoAttachment
AttachSpots
;
45
typedef
struct
stcOneTwoBalls
BallsSpots
;
46
typedef
struct
stcOneTwoPlaces
PlacesSpots
;
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
63
bool
blncheckphysics_
;
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__
stcDoubleValues
Definition:
cannonball.h:24
stcOneTwoBalls::two
clsCannonball * two
Definition:
rope.h:41
cannonball.h
RopeAttachment
RopeAttachment
Definition:
rope.h:14
stcOneTwoAttachment
Definition:
rope.h:23
clsRope::blncheckphysics_
bool blncheckphysics_
Definition:
rope.h:63
uint
unsigned int uint
Definition:
global.h:16
uchar
unsigned char uchar
Definition:
global.h:12
stcOneTwoPlaces::one
LOC one
Definition:
rope.h:32
stcOneTwoAttachment::one
uchar one
Definition:
rope.h:24
stcOneTwoPlaces::two
LOC two
Definition:
rope.h:33
AttachmentWall
Definition:
rope.h:17
stcOneTwoAttachment::two
uchar two
Definition:
rope.h:25
stcOneTwoPlaces
Definition:
rope.h:31
stcOneTwoBalls
Definition:
rope.h:39
clsRope
This class will hold all of the functions for the rope.
Definition:
rope.h:48
stcOneTwoBalls::one
clsCannonball * one
Definition:
rope.h:40
stcLocation
Definition:
screen.h:36
AttachmentBall
Definition:
rope.h:16
AttachmentNone
Definition:
rope.h:15
clsCannonball
This class is used to create and control each of the balls.
Definition:
cannonball.h:70
src
rope.h
Generated on Tue Mar 27 2018 16:57:03 for Physics-Simulator by
1.8.13