Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F94111552
penduledesc.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Dec 4, 00:23
Size
1 KB
Mime Type
text/x-c++
Expires
Fri, Dec 6, 00:23 (2 d)
Engine
blob
Format
Raw Data
Handle
22737824
Attached To
rSYMKIT symkit
penduledesc.h
View Options
#ifndef PENDULEDESC_H
#define PENDULEDESC_H
#include "descriptors/oscillateur.h"
class
PenduleDesc
:
public
Oscillateur
{
double
l
[
2
];
double
m
[
2
];
double
g
;
public:
/* Constructors */
PenduleDesc
(
double
l1
,
double
l2
,
double
m1
,
double
m2
,
const
Vector
&
p
,
const
Vector
&
pp
,
double
g
=
9.81
);
PenduleDesc
(
double
l1
,
double
l2
,
double
m1
,
double
m2
,
const
std
::
vector
<
double
>&
p
,
const
std
::
vector
<
double
>&
pp
,
double
g
=
9.81
);
/* set methods, index can be 0 or 1 */
void
setAngle
(
double
l
,
int
index
);
void
setAngularSpeed
(
double
l
,
int
index
);
void
setLength
(
double
l
,
int
index
);
void
setMass
(
double
m
,
int
index
);
void
setGravity
(
double
);
/* get methods */
double
getLength
(
int
index
)
const
;
double
getMass
(
int
index
)
const
;
double
getAngle
(
int
index
)
const
;
double
getAngularSpeed
(
int
index
)
const
;
double
getGravity
()
const
;
//retourne l'energie du système, utile pour le debugging
double
energy
()
const
;
double
kineticEnergy
(
int
index
)
const
;
protected:
/* equation override */
virtual
Vector
equation
()
const
override
;
};
#endif
// PENDULEDESC_H
Event Timeline
Log In to Comment