00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
#ifndef OPENCAL_VISCOUSDRAG_H
00012
#define OPENCAL_VISCOUSDRAG_H
00013
00014
00015
#include <OpenCAL/global.h>
00016
#include <OpenCAL/Force.h>
00017
00018
00019
namespace OpenCAL
00020 {
00021
00022
class PhysicsSystem;
00023
00027 class OPENCAL_API ViscousDrag:
public Force
00028 {
00029
protected:
00030
00031
float m_drag;
00032
00033
public:
00034
00035 ViscousDrag(
PhysicsSystem *parent,
float drag = 0.002f);
00036
virtual ~ViscousDrag();
00037
00038
00039
float getDrag()
const {
return m_drag; }
00040
00041
00042
void setDrag(
float drag) { m_drag = drag; }
00043
00044
00045
void execute(
float seconds);
00046 };
00047 }
00048
00049
#endif // OPENCAL_VISCOUSDRAG_H