Yet Another Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
yage::Body Class Referenceabstract

#include <body.h>

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

Public Member Functions

virtual void applyForce (const Vector2d &force)=0
 
virtual void update ()=0
 
double xPosition () const
 
double yPosition () const
 

Static Public Attributes

static const double GRAVITY = -9.81
 

Protected Member Functions

 Body (Vector2d position=Vector2d(0, 0), double mass=1, Vector2d velocity=Vector2d(0, 0), bool gravity=false)
 

Protected Attributes

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::Body::Body ( Vector2d  position = Vector2d(0, 0),
double  mass = 1,
Vector2d  velocity = Vector2d(0, 0),
bool  gravity = false 
)
protected

Member Function Documentation

virtual void yage::Body::applyForce ( const Vector2d force)
pure virtual

Implemented in yage::ParticleBody.

virtual void yage::Body::update ( )
pure virtual

Implemented in yage::ParticleBody.

double yage::Body::xPosition ( ) const
double yage::Body::yPosition ( ) const

Member Data Documentation

Vector2d yage::Body::acceleration_ = Vector2d(0, 0)
protected
Vector2d yage::Body::force_ = Vector2d(0, 0)
protected
const double yage::Body::GRAVITY = -9.81
static
bool yage::Body::gravity_ = true
protected
double yage::Body::mass_ = 1
protected
Vector2d yage::Body::position_ = Vector2d(0, 0)
protected
Vector2d yage::Body::velocity_ = Vector2d(0, 0)
protected

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