/*
 * Constraints.java
 *
 * Created on 21 grudzień 2004, 23:40
 */

package JSciDraw.physics.forces;

import JSci.maths.*;
import JSci.physics.*;
import JSciDraw.*;
import JSciDraw.physics.*;
import JSciDraw.physics.forces.*;

/**
 *
 * @author  Barbara Chorazy
 */
public abstract class Constraints{
    
    protected boolean draw=false;
    protected double[] params;
    protected AbstractDoubleVector[] points;  
    /** Creates a new instance of Constraints */
    public Constraints() {
    }
    
    protected abstract AbstractDoubleVector toEuclidean (AbstractDoubleVector generic);
    
    protected abstract AbstractDoubleVector toGeneric (AbstractDoubleVector euclidean);

    public abstract AbstractDoubleVector getTangent (AbstractDoubleVector x0);

    public abstract void setPosition (AbstractDoubleVector x);
    public abstract AbstractDoubleVector getPosition ();
    
    public abstract void move(ClassicalParticleV2D p,
                                              AbstractDoubleVector force,double dt);
   
    public abstract void draw(ClassicalParticleV2D p,java.awt.Graphics2D g2D);
    
    public abstract void erase(ClassicalParticleV2D p,java.awt.Graphics2D g2D);
    
    public void setDrawable(boolean b)
    {
        draw=b;
    }
     
}
