/* Copyright 2006 Eric Hakenholz This file is part of C.a.R. software. C.a.R. is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License. C.a.R. is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ package rene.zirkel.objects; import java.util.Enumeration; import java.util.Vector; import rene.gui.Global; import rene.zirkel.ZirkelCanvas; import rene.zirkel.construction.Construction; import rene.zirkel.graphics.MyGraphics; import rene.zirkel.graphics.PolygonDrawer; import rene.zirkel.structures.Coordinates; /** * * @author erichake */ public class JLocusTrackObject extends TrackObject implements HeavyObject { Coordinates C; PolygonDrawer pd; double c0, r0, c, r; ExpressionObject EO; Vector RefreshList=new Vector(); Vector DriverObjectList=new Vector(); boolean Special=false; double cx, cy, ww, wh; long time=0; public JLocusTrackObject(final Construction c, final ConstructionObject p, final ConstructionObject po[], final int pn, final ConstructionObject o, final PointObject pm) { super(c); P=p; PN=pn; for (int i=0; i=2*Math.PI) { d-=2*Math.PI; } dt=d*DMin; // I really don't understand why this is necessary for arc locuses : a1+=0.00000000001; } else { dt=2*Math.PI*DMin; a1=0; } final int nbsteps=(int) Math.round(1/DMin)+1; for (int i=0; i1e-8)||Math.abs(C1.Y-C2.Y)>1e-8) { return false; } } return true; } @Override public ConstructionObject copy(final double x, final double y) { PointObject newPM=null; if (PM!=null) { newPM=(PointObject) PM.getTranslation(); } final JLocusTrackObject jl=new JLocusTrackObject(Cn.getTranslation(), P.getTranslation(), PO, PN, O.getTranslation(), newPM); jl.setTargetDefaults(); return jl; } // public void translate() { // if (PM!=null) { // PM=(PointObject) PM.getTranslation(); // } // // O=O.getTranslation(); // P=P.getTranslation(); // // searchDependencies(Cn.getTranslation()); // } }