#ifndef FORCEGRAV_H
#define FORCEGRAV_H

#include "force.h"

class ForceGrav : public Force
{
public:
    // constant force of g in direction d
    ForceGrav(const Vec3d &d) : Force(), _d(d) { }

    // Evaluate force function wrt x,v,m
    SparseVecd eval(const Vecd &x, const Vecd &v, const Vecd &m) const;
    
    // Evaluate force Jacobians
    DblSparse_t evalDx(const Vecd &x, const Vecd &v, const Vecd &m) const;
    DblSparse_t evalDv(const Vecd &x, const Vecd &v, const Vecd &m) const;

    // relative displacement of spring
    double Displacement(const Vecd &x) const;

private:
    Vec3d  _d;
};


#endif
