YAGE
v0.1.4.0
Yet Another Game Engine
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
yage
physics
particlebody.h
Go to the documentation of this file.
1
9
#ifndef YAGE_PHYSICS_PARTICLE_BODY_H
10
#define YAGE_PHYSICS_PARTICLE_BODY_H
11
12
#include "
body.h
"
13
#include <
math/matrix.h
>
14
15
namespace
yage
16
{
17
18
class
ParticleBody
:
public
Body
19
{
20
public
:
21
ParticleBody
(
const
Vector2d
&position =
Vector2d
(0, 0),
double
mass = 1,
22
const
Vector2d
&velocity =
Vector2d
(0, 0),
23
bool
gravity =
true
);
24
25
// apply a force to the rigid body
26
void
applyForce
(
const
Vector2d
&force)
override
;
27
void
update
()
override
;
28
};
29
30
}
// namespace yage
31
32
#endif
body.h
yage::Vector2< double >
yage::ParticleBody::ParticleBody
ParticleBody(const Vector2d &position=Vector2d(0, 0), double mass=1, const Vector2d &velocity=Vector2d(0, 0), bool gravity=true)
Definition:
particlebody.cpp:17
yage::ParticleBody
Definition:
particlebody.h:18
yage::Body
Definition:
body.h:17
matrix.h
yage::ParticleBody::applyForce
void applyForce(const Vector2d &force) override
Definition:
particlebody.cpp:23
yage::Vector2d
Vector2< double > Vector2d
Definition of a 2D vector.
Definition:
matrix.h:398
yage::ParticleBody::update
void update() override
Definition:
particlebody.cpp:28
Generated on Tue Feb 13 2018 20:22:05 for YAGE by
1.8.6