[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Project.java, 1.168, 1.169 Constrain
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2009-05-15 09:13:26
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13580/src/net/sourceforge/bprocessor/model Modified Files: Project.java Removed Files: Constraint.java Log Message: A --- Constraint.java DELETED --- Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.168 retrieving revision 1.169 diff -C2 -d -r1.168 -r1.169 *** Project.java 15 May 2009 08:01:43 -0000 1.168 --- Project.java 15 May 2009 09:10:39 -0000 1.169 *************** *** 80,84 **** /** The observers */ ! private List observers; /** Static observers */ --- 80,84 ---- /** The observers */ ! private List<Observer> observers; /** Static observers */ *************** *** 109,115 **** private long nextCameraID; - /** The constraints */ - private Collection constraints; - /** The globals */ private ParameterBlock globals; --- 109,112 ---- *************** *** 154,160 **** private String exportPath; - - /** The copy buffer */ - private Collection<Geometric> copyBuffer; /** Flag set when updating */ --- 151,154 ---- *************** *** 333,347 **** exportPath = "b-processor-export.obj"; script = new Description(""); undoStack = new Stack(); redoStack = new Stack(); ! copyBuffer = new LinkedList(); ! catalog = new LinkedList<Component>(); currentCamera = new Camera("(Current)", new double[]{6, 3, 2}, new double[]{7, -21, 24}, new double[]{0, 0, 1}, Camera.PERSPECTIVE); ! observers = new LinkedList(); ! staticObservers = new LinkedList(); ! scheduledObservers = new LinkedList(); world = Space.createFunctionalSpace("World"); world.setId(new Long(0)); --- 327,347 ---- exportPath = "b-processor-export.obj"; script = new Description(""); + + staticObservers = new LinkedList(); + + observers = new LinkedList(); + scheduledObservers = new LinkedList(); + undoStack = new Stack(); redoStack = new Stack(); ! ! catalog = new LinkedList(); ! currentCamera = new Camera("(Current)", new double[]{6, 3, 2}, new double[]{7, -21, 24}, new double[]{0, 0, 1}, Camera.PERSPECTIVE); ! ! world = Space.createFunctionalSpace("World"); world.setId(new Long(0)); *************** *** 363,368 **** // world.add(grid); - - constraints = new LinkedList(); globals = new ParameterBlock(); globals.putDouble("pi", Math.PI); --- 363,366 ---- *************** *** 545,600 **** /** - * Add a constraint - * @param constraint The constraint to add - */ - public void add(Constraint constraint) { - constraints.add(constraint); - constraint.setId(new Long(constraints.size())); - } - - /** - * Remove a constraint and call change - * @param constraint The constraint to remove - */ - public void delete(Constraint constraint) { - remove(constraint); - } - - /** - * Remove a constraint dont call change - * @param constraint The constraint to remove - */ - private void remove(Constraint constraint) { - constraints.remove(constraint); - constraint.setId(null); - } - - /** - * Return constraints - * @return The constraints - */ - public Collection getConstraints() { - return constraints; - } - - /** - * Update all constraints related to entity - * @param entity The changed entity - */ - public void updateConstraints(Entity entity) { - // TODO implement general constraint updating mechanism - // that ensures that constraints are updated in correct - // order - - Iterator iter = constraints.iterator(); - while (iter.hasNext()) { - Constraint current = (Constraint) iter.next(); - if (current.depends(entity)) { - current.update(entity); - } - } - } - - /** * Handle the fact that a collection of vertices has been changed. * Re-evaluate constraints and modellors related to the vertices and connected --- 543,546 ---- *************** *** 639,649 **** } { - Iterator iter = surfaces.iterator(); - while (iter.hasNext()) { - Surface current = (Surface) iter.next(); - updateConstraints(current); - } - } - { Iterator iter = spaces.iterator(); while (iter.hasNext()) { --- 585,588 ---- *************** *** 1263,1274 **** } - /** - * getter for the copy buffer - * @return The copyBuffer - */ - public Collection<Geometric> getCopyBuffer() { - return copyBuffer; - } - /** * @return the classificatioTypes --- 1202,1205 ---- *************** *** 1295,1299 **** /** ! * Add a component to til list of catalog objects * @param lo the component object to add */ --- 1226,1230 ---- /** ! * Add a component to list of catalog objects * @param lo the component object to add */ *************** *** 1307,1311 **** /** ! * Add a component to til list of library objects * @param lo the component to add */ --- 1238,1242 ---- /** ! * Add a component to list of library objects * @param lo the component to add */ |