Yet Another Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
yage::ParticleBody Class Reference

#include <particlebody.h>

Inheritance diagram for yage::ParticleBody:
yage::Body yage::RigidBody

Public Member Functions

 ParticleBody (const Vector2d &position=Vector2d(0, 0), double mass=1, const Vector2d &velocity=Vector2d(0, 0), bool gravity=true)
 
void applyForce (const Vector2d &force) override
 
void update () override
 
- Public Member Functions inherited from yage::Body
double xPosition () const
 
double yPosition () const
 

Additional Inherited Members

- Static Public Attributes inherited from yage::Body
static const double GRAVITY = -9.81
 
- Protected Member Functions inherited from yage::Body
 Body (Vector2d position=Vector2d(0, 0), double mass=1, Vector2d velocity=Vector2d(0, 0), bool gravity=false)
 
- Protected Attributes inherited from yage::Body
Vector2d position_ = Vector2d(0, 0)
 
double mass_ = 1
 
Vector2d velocity_ = Vector2d(0, 0)
 
bool gravity_ = true
 
Vector2d acceleration_ = Vector2d(0, 0)
 
Vector2d force_ = Vector2d(0, 0)
 

Constructor & Destructor Documentation

yage::ParticleBody::ParticleBody ( const Vector2d position = Vector2d(0, 0),
double  mass = 1,
const Vector2d velocity = Vector2d(0, 0),
bool  gravity = true 
)

Member Function Documentation

void yage::ParticleBody::applyForce ( const Vector2d force)
overridevirtual

Implements yage::Body.

void yage::ParticleBody::update ( )
overridevirtual

Implements yage::Body.


The documentation for this class was generated from the following files: