Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F95001258
newtonparticle.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
Thu, Dec 12, 01:41
Size
1 KB
Mime Type
text/x-c++
Expires
Sat, Dec 14, 01:41 (2 d)
Engine
blob
Format
Raw Data
Handle
22910574
Attached To
rSYMKIT symkit
newtonparticle.h
View Options
#ifndef NEWTON_PARTICLE_H
#define NEWTON_PARTICLE_H
#include "actors/particle.h"
#include "specs/evolvable.h"
class
NewtonDescriptor
;
class
NewtonParticle
:
public
Particle
,
public
Evolvable
{
public:
NewtonParticle
(
GLModel
*
model
=
0
,
const
double
&
mass
=
1.0
,
const
SVector
<
3
>&
position
=
SVector
<
3
>::
nullv
,
const
SVector
<
3
>&
speed
=
SVector
<
3
>::
nullv
,
const
QString
&
label
=
""
,
specs_t
flags
=
S_EVOLVE
|
S_RENDER
|
S_FILL_MODE
|
S_POSITION
|
S_COLOR
|
S_DESCRIPTOR
);
NewtonParticle
(
const
NewtonDescriptor
&
,
GLModel
*
model
=
0
,
const
QString
&
label
=
""
,
specs_t
flags
=
S_EVOLVE
|
S_RENDER
|
S_FILL_MODE
|
S_POSITION
|
S_COLOR
|
S_DESCRIPTOR
);
~
NewtonParticle
();
SPECS_EVOLVE
/* returns the position of the particle */
virtual
SVector
<
3
>
position
()
const
override
;
/* apply a force to the particle */
void
addForce
(
const
SVector
<
3
>&
);
/* get the mass of the particle */
double
mass
()
const
;
/* get the speed of the particle */
const
SVector
<
3
>&
speed
()
const
;
/* set the speed of the particle */
void
setSpeed
(
const
SVector
<
3
>&
speed
);
/* set the mass of the particle */
void
setMass
(
double
mass
);
private:
NewtonDescriptor
*
newtonDescriptor
;
};
#endif
// NEWTON_PARTICLE_H
Event Timeline
Log In to Comment