bprocessor-commit Mailing List for B-processor (Page 77)
Status: Pre-Alpha
Brought to you by:
henryml
You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(117) |
Aug
(151) |
Sep
(157) |
Oct
(81) |
Nov
(117) |
Dec
(119) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(183) |
Feb
(130) |
Mar
(117) |
Apr
(61) |
May
(82) |
Jun
(45) |
Jul
(149) |
Aug
(173) |
Sep
(199) |
Oct
(165) |
Nov
(107) |
Dec
(137) |
| 2007 |
Jan
(124) |
Feb
(58) |
Mar
(123) |
Apr
(80) |
May
(130) |
Jun
(64) |
Jul
(31) |
Aug
(42) |
Sep
(114) |
Oct
(167) |
Nov
(239) |
Dec
(200) |
| 2008 |
Jan
(43) |
Feb
(43) |
Mar
(4) |
Apr
(9) |
May
(5) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(9) |
Nov
(12) |
Dec
|
| 2009 |
Jan
|
Feb
(20) |
Mar
(7) |
Apr
(12) |
May
(34) |
Jun
(72) |
Jul
|
Aug
(3) |
Sep
(31) |
Oct
(2) |
Nov
(8) |
Dec
(4) |
| 2010 |
Jan
(5) |
Feb
(32) |
Mar
(8) |
Apr
(7) |
May
(36) |
Jun
|
Jul
(11) |
Aug
(15) |
Sep
(7) |
Oct
(2) |
Nov
(13) |
Dec
(80) |
| 2011 |
Jan
|
Feb
|
Mar
(8) |
Apr
(12) |
May
(32) |
Jun
(9) |
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(8) |
| 2012 |
Jan
|
Feb
|
Mar
(3) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(22) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Nordholt <nor...@us...> - 2007-02-07 16:59:30
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5762/src/net/sourceforge/bprocessor/facade/modellor Modified Files: NetFacadeModellor.java Log Message: fixing "active" to be saved Index: NetFacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** NetFacadeModellor.java 7 Feb 2007 16:53:00 -0000 1.15 --- NetFacadeModellor.java 7 Feb 2007 16:59:22 -0000 1.16 *************** *** 87,90 **** --- 87,91 ---- content.put("single", Boolean.valueOf(single)); content.put("frame", frame); + content.putAll(super.getContent()); return content; } *************** *** 102,105 **** --- 103,107 ---- single = ((Boolean)m.get("single")).booleanValue(); frame = (Space)m.get("frame"); + super.setContent(m); Project.getInstance().addObserver(this); } |
|
From: Nordholt <nor...@us...> - 2007-02-07 16:53:17
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2970/src/net/sourceforge/bprocessor/model/modellor Modified Files: Modellor.java Log Message: implemented passiv/active modellors Index: Modellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/Modellor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Modellor.java 2 Jan 2007 17:48:58 -0000 1.4 --- Modellor.java 7 Feb 2007 16:52:56 -0000 1.5 *************** *** 10,16 **** --- 10,19 ---- import java.util.Collection; import java.util.HashMap; + import java.util.Iterator; import java.util.LinkedList; + import java.util.List; import java.util.Map; + import net.sourceforge.bprocessor.model.Attribute; import net.sourceforge.bprocessor.model.Entity; import net.sourceforge.bprocessor.model.Observer; *************** *** 30,33 **** --- 33,39 ---- protected Map parameters; + /** Active flag */ + private boolean active = true; + static { modellors = new LinkedList(); *************** *** 114,118 **** * @param m the map containing the values; */ ! public abstract void setContent(Map m); /** --- 120,126 ---- * @param m the map containing the values; */ ! public void setContent(Map m) { ! active = ((Boolean)m.get("active")).booleanValue(); ! } /** *************** *** 120,124 **** * @return A map of key to value pairs of the content */ ! public abstract Map getContent(); } --- 128,175 ---- * @return A map of key to value pairs of the content */ ! public Map getContent() { ! Map content = new HashMap(); ! content.put("active", Boolean.valueOf(active)); ! return content; ! } ! ! /** ! * Get the active status of the modellor ! * @return active status of the modellor ! */ ! public boolean isActive() { ! return active; ! } ! ! /** ! * Activate / deactivate the modellor ! * @param active the desired activity status ! */ ! public void setActive(boolean active) { ! this.active = active; ! } ! ! /** ! * Get the attributes of this modellor ! * @return the attributes ! */ ! public List getAttributes() { ! List<Attribute> l = new LinkedList<Attribute>(); ! l.add(new Attribute("Active", Boolean.valueOf(active), true)); ! return l; ! } + /** + * Set the attributes of the modellor + * @param attributes the new attributes + */ + public void setAttributes(List attributes) { + Iterator it = attributes.iterator(); + while (it.hasNext()) { + Attribute a = (Attribute)it.next(); + if (a.getName().equals("Active")) { + setActive((Boolean)a.getValue()); + } + } + } } |
|
From: Nordholt <nor...@us...> - 2007-02-07 16:53:12
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2979/src/net/sourceforge/bprocessor/facade/modellor Modified Files: NetFacadeModellor.java Log Message: implemented passiv/active modellors Index: NetFacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** NetFacadeModellor.java 6 Feb 2007 16:20:32 -0000 1.14 --- NetFacadeModellor.java 7 Feb 2007 16:53:00 -0000 1.15 *************** *** 129,154 **** */ public void update(Object entity) { ! boolean update = false; ! if (entity instanceof Geometric) { ! Geometric geo = (Geometric)entity; ! if (geo == net || geo.getOwner() == net) { update = true; } ! } ! if (!update || ! entity == this || ! entity == Project.getInstance()) { ! update = true; ! } ! ! if (!space.getEnvelope().contains(front)) { ! update = false; ! } ! if (space.getModellor() != this) { //sanity check ! update = false; ! delete(); ! } ! if (update) { ! regenerate(); } } --- 129,156 ---- */ public void update(Object entity) { ! if (this.isActive()) { ! boolean update = false; ! if (entity instanceof Geometric) { ! Geometric geo = (Geometric)entity; ! if (geo == net || geo.getOwner() == net) { ! update = true; ! } ! } ! if (!update && ! (entity == this || ! entity == Project.getInstance())) { update = true; } ! ! if (!space.getEnvelope().contains(front)) { ! update = false; ! } ! if (space.getModellor() != this) { //sanity check ! update = false; ! delete(); ! } ! if (update) { ! regenerate(); ! } } } *************** *** 180,184 **** attributes.add(new Attribute("Depth", new Double(depth), true)); attributes.add(new Attribute("Single", Boolean.valueOf(single), true)); ! return attributes; } --- 182,186 ---- attributes.add(new Attribute("Depth", new Double(depth), true)); attributes.add(new Attribute("Single", Boolean.valueOf(single), true)); ! attributes.addAll(super.getAttributes()); return attributes; } *************** *** 213,216 **** --- 215,219 ---- } } + super.setAttributes(attributes); } |
|
From: Michael L. <he...@us...> - 2007-02-07 10:53:56
|
Update of /cvsroot/bprocessor/gl/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20519/src/gfx Modified Files: chaintool.gif Log Message: Replaced icon that flickered Index: chaintool.gif =================================================================== RCS file: /cvsroot/bprocessor/gl/src/gfx/chaintool.gif,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvseP9Ykq and /tmp/cvsMcQeDV differ |
|
From: Michael L. <he...@us...> - 2007-02-07 10:08:02
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31126/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Removed Files: EdgeAttributes.java SurfaceAttributes.java Log Message: Small refactorings of edge drawing --- EdgeAttributes.java DELETED --- --- SurfaceAttributes.java DELETED --- Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.180 retrieving revision 1.181 diff -C2 -d -r1.180 -r1.181 *** View.java 31 Jan 2007 09:18:27 -0000 1.180 --- View.java 7 Feb 2007 10:00:02 -0000 1.181 *************** *** 9,12 **** --- 9,13 ---- import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.tool.SpaceTool; + import net.sourceforge.bprocessor.gl.model.EdgeAttributes; import net.sourceforge.bprocessor.gl.model.GlObject; import net.sourceforge.bprocessor.gl.model.Intersection; *************** *** 303,306 **** --- 304,317 ---- /** The y-coordinate of last selection */ protected double y; + + /** + * Keeps track of the current EdgeAttributes. + */ + private EdgeAttributes currentEdgeAttributes; + + /** + * Keeps track of the current stippling + */ + private boolean stipple; /** The mode of selecting. Either edges or surfaces */ *************** *** 575,578 **** --- 586,610 ---- } + + /** + * Apply edge attributes + * @param attributes the new attributes + */ + public void apply(EdgeAttributes attributes) { + if (attributes != currentEdgeAttributes) { + currentEdgeAttributes = attributes; + gl.glLineWidth(attributes.getLineWidth()); + gl.glColor3fv(attributes.getColor(), 0); + if (attributes.isStipple() != stipple) { + stipple = attributes.isStipple(); + if (stipple) { + gl.glEnable(GL.GL_LINE_STIPPLE); + } else { + gl.glDisable(GL.GL_LINE_STIPPLE); + } + } + } + } + /** * The function responsible for drawing at each update *************** *** 802,830 **** gl.glEnd(); } ! ! /** ! * Draw a coordinate system ! */ ! protected void coords() { ! double size = View.gridSize(); ! gl.glLineWidth(1.0f); ! gl.glBegin(GL.GL_LINES); ! gl.glDisable(GL.GL_DEPTH_TEST); ! gl.glColor3fv(X_AXIS_COLOR, 0); ! gl.glVertex3d(0.0, 0.0, 0.0); ! gl.glVertex3d(size * 2, 0.0, 0.0); ! gl.glColor3fv(Y_AXIS_COLOR, 0); ! gl.glVertex3d(0.0, 0.0, 0.0); ! gl.glVertex3d(0.0, size * 2, 0.0); ! gl.glEnd(); ! gl.glEnable(GL.GL_DEPTH_TEST); ! gl.glBegin(GL.GL_LINES); ! gl.glColor3fv(Z_AXIS_COLOR, 0); ! gl.glVertex3d(0.0, 0.0, 0.0); ! gl.glVertex3d(0.0, 0.0, size * 2); ! gl.glEnd(); ! } ! ! /** * Draw all the existing elements --- 834,838 ---- gl.glEnd(); } ! /** * Draw all the existing elements *************** *** 950,954 **** } } - { Iterator iter = highligts.iterator(); --- 958,961 ---- *************** *** 1196,1199 **** --- 1203,1207 ---- /** + * FIXME edge-drawing * Draw an object with depth test disabled. * @param o The Object *************** *** 1333,1336 **** --- 1341,1345 ---- /** + * FIXME edge-drawing * Draw a constructor * @param constructor The constructor *************** *** 1546,1549 **** --- 1555,1559 ---- /** + * FIXME edge-drawing * Draw constructor line * @param from Origin *************** *** 1559,1562 **** --- 1569,1573 ---- /** + * FIXME edge-drawing * Draw constructor line * @param from Origin *************** *** 1576,1580 **** /** ! * * @param gld The GLDrawable * @param edges The edges --- 1587,1591 ---- /** ! * FIXME edge-drawing * @param gld The GLDrawable * @param edges The edges *************** *** 2293,2296 **** --- 2304,2308 ---- /** + * FIXME edge-drawing * Draw a constructor edge * @param e Edge *************** *** 2303,2306 **** --- 2315,2319 ---- /** + * FIXME edge-drawing * Draw an Edge * @param e The Edge to draw *************** *** 2315,2319 **** gl.glEnd(); } ! } /** --- 2328,2343 ---- gl.glEnd(); } ! } ! ! private void drawEdge(Edge edge, EdgeAttributes attributes) { ! apply(attributes); ! drawEdge(edge); ! } ! private void drawEdges(Collection<Edge> edges, EdgeAttributes attributes) { ! apply(attributes); ! for (Edge edge : edges) { ! drawEdge(edge); ! } ! } /** |
|
From: Michael L. <he...@us...> - 2007-02-07 10:08:02
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31126/src/net/sourceforge/bprocessor/gl/model Added Files: EdgeAttributes.java Log Message: Small refactorings of edge drawing --- NEW FILE: EdgeAttributes.java --- //--------------------------------------------------------------------------------- // $Id: EdgeAttributes.java,v 1.1 2007/02/07 10:00:03 henryml Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.gl.model; /** * EdgeAttributes represents the graphical attributes * associated with edges. */ public class EdgeAttributes { private float[] color; private boolean stipple; private float lineWidth; /** * Create default EdgeAttributes: black, nonstippled, and width of 1 */ public EdgeAttributes() { this.color = new float[]{0, 0, 0}; this.stipple = false; this.lineWidth = 1; } /** * * @param color the color represented as array of floats with r g b values */ public void setColor(float[] color) { this.color = color; } /** * * @return color represented as array of floats with r g b values */ public float[] getColor() { return color; } /** * * @param stipple the new value of the stipple attribute */ public void setStipple(boolean stipple) { this.stipple = stipple; } /** * * @return the stiple attribute */ public boolean isStipple() { return stipple; } /** * * @param lineWidth the new value of the lineWidth attribute */ public void setLineWidth(float lineWidth) { this.lineWidth = lineWidth; } /** * * @return the lineWidth attribute */ public float getLineWidth() { return lineWidth; } } |
|
From: Nordholt <nor...@us...> - 2007-02-06 17:39:04
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3517/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: removed commented code Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** Space.java 31 Jan 2007 20:59:28 -0000 1.121 --- Space.java 6 Feb 2007 16:17:23 -0000 1.122 *************** *** 1259,1265 **** */ public void setModellor(Modellor modellor) { ! //Project.getInstance().removeObserver(this.modellor); ! this.modellor = modellor; ! //Project.getInstance().addObserver(modellor); } --- 1259,1263 ---- */ public void setModellor(Modellor modellor) { ! this.modellor = modellor; } |
|
From: rimestad <rim...@us...> - 2007-02-06 17:30:26
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv890/src/net/sourceforge/bprocessor/gl/tool Modified Files: Tool.java ToolFactory.java Added Files: RelationTool.java Log Message: reordered the toolbottons added and relation tool --- NEW FILE: RelationTool.java --- //--------------------------------------------------------------------------------- // $Id: RelationTool.java,v 1.1 2007/02/06 17:30:17 rimestad Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.gl.tool; import java.awt.Cursor; import java.awt.event.MouseEvent; import java.util.ArrayList; import java.util.List; import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Constructor; import net.sourceforge.bprocessor.model.Geometric; import net.sourceforge.bprocessor.model.Edge; /** * Tool for creating relations between constructors and geometry * */ public class RelationTool extends AbstractPencil { private Constructor constructor; private Edge edge; /** * Constructor for Pencil * @param glv GLView * @param cursor Cursor */ public RelationTool(GLView glv, Cursor cursor) { super(glv, cursor); } /** * Update feedback */ private void updateFeedback() { if (constructor != null) { if (edge != null) { edge.setTo(current.vertex()); } else { // make new feedback edge = new Edge(constructor.center(), current.vertex()); edge.setStrippled(true); List<Edge> es = new ArrayList<Edge>(1); es.add(edge); feedback(es); } } } /** * {@inheritDoc} */ protected void moved(MouseEvent e) { //First find intersection current = findIntersection(e); //Then find targer object findTarget(e, elements); glv.getView().makeTarget(target); if (current != null) { updateFeedback(); } } /** * {@inheritDoc} */ protected void pressed(MouseEvent e) { onVertex(); moved(e); } /** * {@inheritDoc} */ public void cleanUp() { active = false; super.cleanUp(); edge = null; constructor = null; } /** * Current vertex is pressed */ public void onVertex() { if (constructor == null) { if (target != null) { if (target instanceof Constructor) { constructor = (Constructor) target; start = current; active = true; } else { GUI.getInstance().alert("Have to start by selecting a Constructor"); } } else { GUI.getInstance().alert("Have to start by selecting a Constructor"); } } else { if (target != null && target != constructor) { if (target instanceof Geometric) { Geometric g = (Geometric) target; constructor.connect(g); cleanUp(); } else { GUI.getInstance().alert("The socondly chosen object were not a geometric object"); } } } updateFeedback(); glv.repaint(); } } Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** ToolFactory.java 20 Jan 2007 21:24:56 -0000 1.73 --- ToolFactory.java 6 Feb 2007 17:30:17 -0000 1.74 *************** *** 152,155 **** --- 152,158 ---- /** The alternative rect tool button */ private JToggleButton altRectBut; + + /** The tool for binding constructors and geometry together */ + private RelationTool relation; /** *************** *** 193,196 **** --- 196,200 ---- clipplane = new ClipplaneTool(glv, pencilcursor); tapeMeasure = new TapeMeasure(glv, pencilcursor); + relation = new RelationTool(glv, pencilcursor); camera = new CameraTool(glv, rotationCursor); fly = new CameraFlyTool(glv, flyCursor); *************** *** 207,212 **** pencilBut.setMnemonic(KeyEvent.VK_W); this.registerTool(Tool.ALT_PENCIL_TOOL, penciltool, "Biconpentool2.gif", "Pencil"); - eraserBut = this.registerTool(Tool.ERASER_TOOL, eraser, "Biconeraser.gif", "Eraser"); - eraserBut.setMnemonic(KeyEvent.VK_A); JToggleButton rect = this.registerTool(Tool.ALT_RECT_TOOL, altRect, "Biconaltrect.gif", "Rectangle"); --- 211,214 ---- *************** *** 214,217 **** --- 216,222 ---- JToggleButton arcb = this.registerTool(Tool.ARC_TOOL, arc, "Barc.gif", "Arc"); arcb.setMnemonic(KeyEvent.VK_Z); + offBut = this.registerTool(Tool.OFFSET_TOOL, offset, "Biconoffset.gif", "Offset"); + eraserBut = this.registerTool(Tool.ERASER_TOOL, eraser, "Biconeraser.gif", "Eraser"); + eraserBut.setMnemonic(KeyEvent.VK_A); tb.addSeparator(3); extrudeBut = registerTool(Tool.EXTRUSION_TOOL, extrude, "Biconextrudetool.gif", "Extrude"); *************** *** 223,233 **** tb.addSeparator(3); tmBut = this.registerTool(Tool.TAPE_MEASURE_TOOL, tapeMeasure, ! "Bicontapemes.gif", "Tape Measure"); ! this.registerTool(Tool.CONSTRUCTOR_TOOL, constructor, "Biconconstructor.gif", "Constructor"); ! offBut = this.registerTool(Tool.OFFSET_TOOL, offset, "Biconoffset.gif", "Offset"); ! clipBut = this.registerTool(Tool.CLIP_TOOL, clipplane, ! "Bclip.gif", "Clipping"); ! tb.addSeparator(3); --- 228,234 ---- tb.addSeparator(3); tmBut = this.registerTool(Tool.TAPE_MEASURE_TOOL, tapeMeasure, ! "Bicontapemes.gif", "Tape Measure"); this.registerTool(Tool.CONSTRUCTOR_TOOL, constructor, "Biconconstructor.gif", "Constructor"); ! this.registerTool(Tool.RELATION_TOOL, relation, "chaintool.gif", "Create relation"); tb.addSeparator(3); *************** *** 265,269 **** tb.addSeparator(10); ! Action orthoAction = new ToolAction(glv, 0, "Borto.gif") { public void actionPerformed(ActionEvent agr0) { --- 266,271 ---- tb.addSeparator(10); ! clipBut = this.registerTool(Tool.CLIP_TOOL, clipplane, ! "Bclip.gif", "Clipping"); Action orthoAction = new ToolAction(glv, 0, "Borto.gif") { public void actionPerformed(ActionEvent agr0) { Index: Tool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/Tool.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Tool.java 30 Nov 2006 22:03:41 -0000 1.27 --- Tool.java 6 Feb 2007 17:30:17 -0000 1.28 *************** *** 60,63 **** --- 60,65 ---- /** the alternative pecnil tool */ public static final int ALT_PENCIL_TOOL = 19; + /** the tool for creating relation between elements */ + public static final int RELATION_TOOL = 20; /** |
|
From: rimestad <rim...@us...> - 2007-02-06 17:28:36
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32532/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java AbstractPencil.java Log Message: added a more describing javadoc header for both abstract tools Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** AbstractPencil.java 14 Nov 2006 15:10:05 -0000 1.72 --- AbstractPencil.java 6 Feb 2007 17:28:26 -0000 1.73 *************** *** 42,46 **** /** * AbstractPencil ! * */ public abstract class AbstractPencil extends AbstractTool { --- 42,63 ---- /** * AbstractPencil ! * The tool to extend if lots of feedback and automation for release and drag are wanted ! * It extends AbstactTool and implement drag and release as well as som std. cleanup and excape ! * methods ! * ! * The only two abstact methods left are pressed and moved ! * ! * AbstractPencil are ment to be working on intersection points, and therefore give way to ! * findIntersection methods, which return the found intersection. ! * ! * use start and current intersection in this object to store the pressed intersection as well as ! * the current one under the mouse ! * ! * As in AbstractTool it is common to implement cleanUp which is called when a tool is exited, to ! * secure nothing is left in some special case when the tool is used next time (REMEMBER TO CALL ! * SUPER IMPL.) ! * ! * If some geometry are needed to be drawn in the view for feedback and so on, use the feedback ! * method to add geometry to be shown */ public abstract class AbstractPencil extends AbstractTool { Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -d -r1.110 -r1.111 *** AbstractTool.java 26 Jan 2007 14:04:57 -0000 1.110 --- AbstractTool.java 6 Feb 2007 17:28:26 -0000 1.111 *************** *** 37,40 **** --- 37,54 ---- /** * The abstracttool + * The tool to extend if only object selection is needed + * It is methods called when the mouse is invoked that are to be implemented + * when extending this class + * moved, pressed, dragged and released are the abstact methods + * + * When canceling tool action escape are called, so override if for canceling cleanup + * + * When a tool finishes, that is when another tool are chosen, cleanUp are called, so + * implement it to cleanUp any unfinished business in a tool. REMEMBER TO CALL THE SUPER + * IMPLEMENTATION WHEN EXTENDING + * + * findTarger come in handy for findinge the current object that the mouse is hooveing above + * + * A known implementation is SelectTool */ public abstract class AbstractTool implements Tool { |
|
From: rimestad <rim...@us...> - 2007-02-06 17:27:54
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32113/src/net/sourceforge/bprocessor/model Modified Files: Geometric.java Constructor.java Log Message: made small changes to constructors to use generics Index: Geometric.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometric.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Geometric.java 13 Oct 2006 07:54:58 -0000 1.13 --- Geometric.java 6 Feb 2007 17:27:18 -0000 1.14 *************** *** 81,85 **** * @return the set of vertices */ ! public abstract Set collect(); /** --- 81,85 ---- * @return the set of vertices */ ! public abstract Set<Vertex> collect(); /** Index: Constructor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Constructor.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Constructor.java 2 Jan 2007 17:48:58 -0000 1.15 --- Constructor.java 6 Feb 2007 17:27:18 -0000 1.16 *************** *** 35,39 **** /** Set of geometrics connected to this constructor */ ! private Set connectedGeometry = new HashSet(); /** * Do not use, for persistence use only --- 35,39 ---- /** Set of geometrics connected to this constructor */ ! private Set<Geometric> connectedGeometry = new HashSet<Geometric>(); /** * Do not use, for persistence use only *************** *** 104,116 **** /** {@inheritDoc} */ ! public Set collect() { ! Set res = new HashSet(); res.add(getOrigin()); ! Iterator it = connectedGeometry.iterator(); while (it.hasNext()) { ! Object o = it.next(); ! if (o instanceof Geometric) { ! res.addAll(((Geometric)o).collect()); ! } } return res; --- 104,113 ---- /** {@inheritDoc} */ ! public Set<Vertex> collect() { ! Set<Vertex> res = new HashSet<Vertex>(); res.add(getOrigin()); ! Iterator<Geometric> it = connectedGeometry.iterator(); while (it.hasNext()) { ! res.addAll((it.next()).collect()); } return res; *************** *** 149,153 **** * @param s a set of geometrics */ ! public void connect(Set s) { connectedGeometry.addAll(s); } --- 146,150 ---- * @param s a set of geometrics */ ! public void connect(Set<Geometric> s) { connectedGeometry.addAll(s); } *************** *** 158,162 **** */ public void connect(Geometric g) { ! connectedGeometry.add(g); } --- 155,161 ---- */ public void connect(Geometric g) { ! if (!connectedGeometry.contains(g)) { ! connectedGeometry.add(g); ! } } *************** *** 167,171 **** * @param s a set of geometrics */ ! public void disconnect(Set s) { connectedGeometry.removeAll(s); } --- 166,170 ---- * @param s a set of geometrics */ ! public void disconnect(Set<Geometric> s) { connectedGeometry.removeAll(s); } *************** *** 175,179 **** * @return all connected geometry */ ! public Set getConnectedGeometry() { return connectedGeometry; } --- 174,178 ---- * @return all connected geometry */ ! public Set<Geometric> getConnectedGeometry() { return connectedGeometry; } |
|
From: rimestad <rim...@us...> - 2007-02-06 17:19:47
|
Update of /cvsroot/bprocessor//gl/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28881/src/gfx Modified Files: chaintool.gif Log Message: smaller one Index: chaintool.gif =================================================================== RCS file: /cvsroot/bprocessor//gl/src/gfx/chaintool.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvs19EoZc and /tmp/cvsDKRJcd differ |
|
From: rimestad <rim...@us...> - 2007-02-06 16:48:51
|
Update of /cvsroot/bprocessor//gl/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16178/src/gfx Added Files: chaintool.gif Log Message: tool icon --- NEW FILE: chaintool.gif --- (This appears to be a binary file; contents omitted.) |
|
From: Nordholt <nor...@us...> - 2007-02-06 16:37:41
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4181/src/net/sourceforge/bprocessor/gui/attrview Modified Files: GenericPanel.java Log Message: adding the selector attribute to genattributes Index: GenericPanel.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** GenericPanel.java 29 Jan 2007 18:10:46 -0000 1.32 --- GenericPanel.java 6 Feb 2007 16:19:05 -0000 1.33 *************** *** 233,238 **** } } else if (a.getValue() instanceof Selector) { ! Selector sel = (Selector)a.getValue(); ! where.add(new AttributeRow(new SelectorAttribute(a))); } else { log.info("[GenericPanel] Something were not implemented"); --- 233,239 ---- } } else if (a.getValue() instanceof Selector) { ! SelectorAttribute sa = new SelectorAttribute(a); ! genAttributes.add(sa); ! where.add(new AttributeRow(sa)); } else { log.info("[GenericPanel] Something were not implemented"); |
|
From: Nordholt <nor...@us...> - 2007-02-06 16:37:34
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4803/src/net/sourceforge/bprocessor/facade/modellor Modified Files: NetFacadeModellor.java Log Message: being more specific about when the facade should update (for performance) Index: NetFacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** NetFacadeModellor.java 31 Jan 2007 21:03:34 -0000 1.13 --- NetFacadeModellor.java 6 Feb 2007 16:20:32 -0000 1.14 *************** *** 18,21 **** --- 18,22 ---- import net.sourceforge.bprocessor.model.Attribute; import net.sourceforge.bprocessor.model.Edge; + import net.sourceforge.bprocessor.model.Geometric; import net.sourceforge.bprocessor.model.Geometry; import net.sourceforge.bprocessor.model.Net; *************** *** 128,139 **** */ public void update(Object entity) { ! if (space.getModellor() == this) { //sanity check regenerate(); - } else { - Project.getInstance().removeObserver(this); - space = null; - frame = null; - front = null; - windows = null; } } --- 129,154 ---- */ public void update(Object entity) { ! boolean update = false; ! if (entity instanceof Geometric) { ! Geometric geo = (Geometric)entity; ! if (geo == net || geo.getOwner() == net) { ! update = true; ! } ! } ! if (!update || ! entity == this || ! entity == Project.getInstance()) { ! update = true; ! } ! ! if (!space.getEnvelope().contains(front)) { ! update = false; ! } ! if (space.getModellor() != this) { //sanity check ! update = false; ! delete(); ! } ! if (update) { regenerate(); } } *************** *** 144,148 **** public void delete() { Project.getInstance().removeObserver(this); ! space.setModellor(null); } --- 159,170 ---- public void delete() { Project.getInstance().removeObserver(this); ! if (space.getModellor() == this) { ! space.setModellor(null); ! } ! space = null; ! net = null; ! frame = null; ! front = null; ! windows = null; } |
|
From: Nordholt <nor...@us...> - 2007-02-06 16:37:32
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3101/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: removed changed call on surfaces when changed is called on a collection. Now only the spaces are changed. Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -d -r1.114 -r1.115 *** Project.java 31 Jan 2007 20:53:28 -0000 1.114 --- Project.java 6 Feb 2007 16:16:46 -0000 1.115 *************** *** 355,359 **** } } - entity.changed(); } --- 355,358 ---- |
|
From: rimestad <rim...@us...> - 2007-01-31 21:28:28
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3824/src/net/sourceforge/bprocessor/model Modified Files: ClippingPlane.java Camera.java Log Message: Now the clipplanes are really copied, when cameras are copied Index: Camera.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Camera.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** Camera.java 20 Jan 2007 21:24:44 -0000 1.35 --- Camera.java 31 Jan 2007 21:27:30 -0000 1.36 *************** *** 115,119 **** while (clips.hasNext()) { ClippingPlane clip = (ClippingPlane)clips.next(); ! this.addClipplane(clip); } } --- 115,119 ---- while (clips.hasNext()) { ClippingPlane clip = (ClippingPlane)clips.next(); ! this.addClipplane(clip.copy()); } } *************** *** 134,138 **** while (clips.hasNext()) { ClippingPlane clip = (ClippingPlane)clips.next(); ! this.addClipplane(clip); } } --- 134,138 ---- while (clips.hasNext()) { ClippingPlane clip = (ClippingPlane)clips.next(); ! this.addClipplane(clip.copy()); } } Index: ClippingPlane.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ClippingPlane.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ClippingPlane.java 2 Jan 2007 17:48:58 -0000 1.16 --- ClippingPlane.java 31 Jan 2007 21:27:30 -0000 1.17 *************** *** 69,72 **** --- 69,82 ---- /** + * Copy the clippingplane + * @return The copy of the this + */ + public ClippingPlane copy() { + ClippingPlane copy = new ClippingPlane(this.cs.copy()); + copy.isActive = isActive(); + return copy; + } + + /** * Getter for plan representing the clippingplane * @return The plane *************** *** 298,301 **** --- 308,312 ---- public void setActive(boolean isActive) { this.isActive = isActive; + update(); } *************** *** 329,332 **** --- 340,349 ---- /** {@inheritDoc} */ + public String getName() { + String s = "CP-" + number; + return s; + } + + /** {@inheritDoc} */ public String getGeneralName() { String s = "Clippingplane"; |
|
From: Nordholt <nor...@us...> - 2007-01-31 21:03:51
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26555/src/net/sourceforge/bprocessor/facade/modellor Modified Files: NetFacadeModellor.java Log Message: added some extra holeanalysis to battle the "missing hole" problem Index: NetFacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NetFacadeModellor.java 30 Jan 2007 19:51:53 -0000 1.12 --- NetFacadeModellor.java 31 Jan 2007 21:03:34 -0000 1.13 *************** *** 101,104 **** --- 101,105 ---- single = ((Boolean)m.get("single")).booleanValue(); frame = (Space)m.get("frame"); + Project.getInstance().addObserver(this); } *************** *** 127,131 **** */ public void update(Object entity) { ! regenerate(); } --- 128,140 ---- */ public void update(Object entity) { ! if (space.getModellor() == this) { //sanity check ! regenerate(); ! } else { ! Project.getInstance().removeObserver(this); ! space = null; ! frame = null; ! front = null; ! windows = null; ! } } *************** *** 134,137 **** --- 143,147 ---- */ public void delete() { + Project.getInstance().removeObserver(this); space.setModellor(null); } *************** *** 335,341 **** } if (net != null) { - List outlineCopies = new LinkedList(); List outline = netOutline(net); Iterator it = outline.iterator(); while (it.hasNext()) { outlineCopies.add(((Edge)it.next()).copy()); --- 345,351 ---- } if (net != null) { List outline = netOutline(net); Iterator it = outline.iterator(); + List outlineCopies = new LinkedList(); while (it.hasNext()) { outlineCopies.add(((Edge)it.next()).copy()); *************** *** 347,351 **** assignSame(front, frameSurface, space, frame); Set sides1 = new HashSet(); ! extrudeIntoSpace(frameSurface, depth, sides1); /* Put holes into the shell */ Iterator fields = net.getSurfaces().iterator(); --- 357,362 ---- assignSame(front, frameSurface, space, frame); Set sides1 = new HashSet(); ! Surface frameSurfEx = extrudeIntoSpace(frameSurface, depth, sides1); ! Geometry.holeAnalysis(frameSurfEx); /* Put holes into the shell */ Iterator fields = net.getSurfaces().iterator(); *************** *** 370,374 **** Geometry.holeAnalysis(hole); Set sides2 = new HashSet(); ! Geometry.holeAnalysis(space.insert(extrudeIntoSpace(hole, depth, sides2))); Double extraFrame = 0.0; if (envF.get("type") instanceof Selector) { --- 381,386 ---- Geometry.holeAnalysis(hole); Set sides2 = new HashSet(); ! Surface holeEx = space.insert(extrudeIntoSpace(hole, depth, sides2)); ! Geometry.holeAnalysis(holeEx); Double extraFrame = 0.0; if (envF.get("type") instanceof Selector) { *************** *** 399,402 **** --- 411,416 ---- in = space.insert(in); out = space.insert(out); + Geometry.holeAnalysis(in); + Geometry.holeAnalysis(out); Space wf = new Space("Window Frame", *************** *** 426,430 **** assignOpposite(front, hole, space, wf); Geometry.holeAnalysis(outEx); ! Geometry.holeAnalysis(hole); } } --- 440,444 ---- assignOpposite(front, hole, space, wf); Geometry.holeAnalysis(outEx); ! Geometry.holeAnalysis(hole); } } |
|
From: Nordholt <nor...@us...> - 2007-01-31 21:02:23
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26092/src/net/sourceforge/bprocessor/gl Modified Files: GLView.java Log Message: GLView is now a static observer Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** GLView.java 31 Jan 2007 11:07:09 -0000 1.53 --- GLView.java 31 Jan 2007 21:02:21 -0000 1.54 *************** *** 73,77 **** log.info("Using JOGL version official"); Selection.primary().addObserver(this); ! Project.getInstance().addObserver(this); glCap.setDoubleBuffered(true); --- 73,77 ---- log.info("Using JOGL version official"); Selection.primary().addObserver(this); ! Project.getInstance().addStaticObserver(this); glCap.setDoubleBuffered(true); |
|
From: Nordholt <nor...@us...> - 2007-01-31 21:01:43
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25686/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: generictreeview is now a static observer Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** GenericTreeView.java 31 Jan 2007 10:52:20 -0000 1.70 --- GenericTreeView.java 31 Jan 2007 21:01:42 -0000 1.71 *************** *** 205,209 **** setRootVisible(false); setShowsRootHandles(true); ! Project.getInstance().addObserver(this); this.addTreeSelectionListener(new SelectionListener()); this.addMouseListener(new GenericMouseAdapter()); --- 205,209 ---- setRootVisible(false); setShowsRootHandles(true); ! Project.getInstance().addStaticObserver(this); this.addTreeSelectionListener(new SelectionListener()); this.addMouseListener(new GenericMouseAdapter()); |
|
From: Nordholt <nor...@us...> - 2007-01-31 21:01:27
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25646/src/net/sourceforge/bprocessor/gui/attrview Modified Files: AttributeView.java Log Message: attributeview is now a static observer Index: AttributeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** AttributeView.java 6 Oct 2006 11:45:42 -0000 1.39 --- AttributeView.java 31 Jan 2007 21:01:12 -0000 1.40 *************** *** 52,56 **** setPreferredSize(new Dimension(140, 240)); Selection.primary().addObserver(this); ! Project.getInstance().addObserver(this); } --- 52,56 ---- setPreferredSize(new Dimension(140, 240)); Selection.primary().addObserver(this); ! Project.getInstance().addStaticObserver(this); } |
|
From: Nordholt <nor...@us...> - 2007-01-31 21:00:32
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25244/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: added checkpoint after a modellor is added Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** PopupMenu.java 31 Jan 2007 15:22:19 -0000 1.24 --- PopupMenu.java 31 Jan 2007 21:00:30 -0000 1.25 *************** *** 45,52 **** --- 45,57 ---- import net.sourceforge.bprocessor.model.modellor.Modellor; + import org.apache.log4j.Logger; + /** * The static popup menu generator */ public class PopupMenu { + /** The logger */ + private static Logger log = Logger.getLogger(PopupMenu.class); + /** * make a popup menu for a surface *************** *** 251,254 **** --- 256,265 ---- }; pm.add(check); + AbstractAction modCheck = new SpaceMenuAction(sp, "modCheck") { + public void actionPerformed(ActionEvent arg0) { + log.info(space.getModellor()); + } + }; + pm.add(modCheck); pm.add(getTransformMenu(sp)); JMenu mm = new JMenu("Modellors"); *************** *** 264,267 **** --- 275,279 ---- AttributeView.instance().display(created); space.changed(); + Project.getInstance().checkpoint(); } else { JOptionPane.showMessageDialog( |
|
From: Nordholt <nor...@us...> - 2007-01-31 20:59:33
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24794/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: added a net-void level Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** Space.java 31 Jan 2007 15:22:10 -0000 1.120 --- Space.java 31 Jan 2007 20:59:28 -0000 1.121 *************** *** 1259,1263 **** --- 1259,1265 ---- */ public void setModellor(Modellor modellor) { + //Project.getInstance().removeObserver(this.modellor); this.modellor = modellor; + //Project.getInstance().addObserver(modellor); } *************** *** 2668,2671 **** --- 2670,2675 ---- } else if (getLevel() == Space.NET_LEVEL) { return "Net"; + } else if (getLevel() == Space.NET_LEVEL + 1) { + return "Net-void"; } else { log.error("Not a valid level"); |
|
From: Nordholt <nor...@us...> - 2007-01-31 20:56:41
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23608/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: prevented spaceassignments of a hole flipping when the hole is added to a surface Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.134 retrieving revision 1.135 diff -C2 -d -r1.134 -r1.135 *** Surface.java 31 Jan 2007 10:51:08 -0000 1.134 --- Surface.java 31 Jan 2007 20:56:40 -0000 1.135 *************** *** 1100,1103 **** --- 1100,1108 ---- /* If the normal of the hole is not the same the hole is reversed */ hole.flip(); + //FIXME: maybe the holes just shouldnt be flipped + Space holeBack = hole.getBackDomain(); + Space holeFront = hole.getFrontDomain(); + hole.setFrontDomain(holeBack); + hole.setBackDomain(holeFront); } if (hole.getFrontDomain() == null) { |
|
From: Nordholt <nor...@us...> - 2007-01-31 20:53:30
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22441/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: added a list of static observers: those observers that should not be cleared on load/save Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -d -r1.113 -r1.114 *** Project.java 30 Jan 2007 19:50:39 -0000 1.113 --- Project.java 31 Jan 2007 20:53:28 -0000 1.114 *************** *** 44,47 **** --- 44,50 ---- private List observers; + /** Static observers */ + private List staticObservers; + /** The scheduled observers */ private List scheduledObservers; *************** *** 136,139 **** --- 139,143 ---- new double[]{0, 0, 1}, Camera.PERSPECTIVE); observers = new LinkedList(); + staticObservers = new LinkedList(); scheduledObservers = new LinkedList(); world = new Space("World", Space.FUNCTIONAL, Space.PROJECT_LEVEL, true); *************** *** 207,210 **** --- 211,222 ---- /** + * Add static observer + * @param observer The observer + */ + public void addStaticObserver(Observer observer) { + staticObservers.add(observer); + } + + /** * Schedule adding an observer. Will be added at a safe time. * @param observer The observer *************** *** 234,237 **** --- 246,257 ---- observers.remove(observer); } + + /** + * Remove static observer + * @param observer The observer + */ + public void removeStaticObserver(Observer observer) { + staticObservers.remove(observer); + } /** *************** *** 240,244 **** */ public void changed(Object entity) { ! Iterator iter = observers.iterator(); updating = true; while (iter.hasNext()) { --- 260,267 ---- */ public void changed(Object entity) { ! // FIXME: temporary hack. There should be better handling of the observers ! List allObservers = new LinkedList(observers); ! allObservers.addAll(staticObservers); ! Iterator iter = allObservers.iterator(); updating = true; while (iter.hasNext()) { *************** *** 264,267 **** --- 287,291 ---- this.cameraId = 0; cs.setActive(true); + observers.clear(); } |
|
From: Nordholt <nor...@us...> - 2007-01-31 20:52:35
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22035/src/net/sourceforge/bprocessor/model Modified Files: Persistence.java Log Message: added support for nets Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** Persistence.java 25 Jan 2007 10:20:55 -0000 1.33 --- Persistence.java 31 Jan 2007 20:52:33 -0000 1.34 *************** *** 10,13 **** --- 10,14 ---- import net.sourceforge.bprocessor.model.xml.AxisRotateType; import net.sourceforge.bprocessor.model.xml.Bmodel; + import net.sourceforge.bprocessor.model.xml.BooleanType; import net.sourceforge.bprocessor.model.xml.CameraType; import net.sourceforge.bprocessor.model.xml.ClipplaneType; *************** *** 28,31 **** --- 29,33 ---- import net.sourceforge.bprocessor.model.xml.ScaleType; import net.sourceforge.bprocessor.model.xml.SpaceType; + import net.sourceforge.bprocessor.model.xml.NetType; import net.sourceforge.bprocessor.model.xml.StringType; import net.sourceforge.bprocessor.model.xml.SurfaceType; *************** *** 37,40 **** --- 39,43 ---- import net.sourceforge.bprocessor.model.xml.impl.AxisRotateTypeImpl; import net.sourceforge.bprocessor.model.xml.impl.BmodelImpl; + import net.sourceforge.bprocessor.model.xml.impl.BooleanTypeImpl; import net.sourceforge.bprocessor.model.xml.impl.CameraTypeImpl; import net.sourceforge.bprocessor.model.xml.impl.ClipplaneTypeImpl; *************** *** 53,56 **** --- 56,60 ---- import net.sourceforge.bprocessor.model.xml.impl.ScaleTypeImpl; import net.sourceforge.bprocessor.model.xml.impl.SpaceImpl; + import net.sourceforge.bprocessor.model.xml.impl.NetTypeImpl; import net.sourceforge.bprocessor.model.xml.impl.StringTypeImpl; import net.sourceforge.bprocessor.model.xml.impl.SurfaceImpl; *************** *** 184,187 **** --- 188,205 ---- } + private static Net internalizeNet(Space owner, SpaceType xml, + Map mapper, Collection xmls) { + Net n = new Net(); + return (Net)internalizeSpace(owner, n, xml, mapper, xmls); + } + + private static Space internalizeSpace(Space owner, SpaceType xml, + Map mapper, Collection xmls) { + Space s = new Space(); + return internalizeSpace(owner, s, xml, mapper, xmls); + } + + + /** * @param owner Space *************** *** 191,195 **** * @return The Space */ ! private static Space internalizeSpace(Space owner, SpaceType xml, Map mapper, Collection xmls) { String name = xml.getName(); --- 209,213 ---- * @return The Space */ ! private static Space internalizeSpace(Space owner, Space space, SpaceType xml, Map mapper, Collection xmls) { String name = xml.getName(); *************** *** 198,202 **** long empty = xml.getVoidref(); boolean container = (empty != 0); ! Space space = new Space(); space.setName(name); space.setType(type); --- 216,220 ---- long empty = xml.getVoidref(); boolean container = (empty != 0); ! space.setName(name); space.setType(type); *************** *** 240,245 **** Iterator iter = xml.getSpace().iterator(); while (iter.hasNext()) { ! SpaceType current = (SpaceType) iter.next(); ! Space element = internalizeSpace(space, current, mapper, xmls); elements.put(element.getId(), element); } --- 258,273 ---- Iterator iter = xml.getSpace().iterator(); while (iter.hasNext()) { ! Object current = iter.next(); ! if (current instanceof net.sourceforge.bprocessor.model.xml.Space) { ! current = ((net.sourceforge.bprocessor.model.xml.Space)current).getValueObject(); ! } ! Space element = null; ! if (current instanceof NetType) { ! element = internalizeNet(space, (SpaceType)current, mapper, xmls); ! } else if (current instanceof SpaceType) { ! element = internalizeSpace(space, (SpaceType)current, mapper, xmls); ! } else { ! log.error("unsupported spacetype"); ! } elements.put(element.getId(), element); } *************** *** 382,386 **** } try { ! Modellor m = (Modellor)model.getConstructor(new Class[0]).newInstance(new Object[0]); m.setId(new Long(xml.getProgid())); HashMap content = new HashMap(); --- 410,415 ---- } try { ! java.lang.reflect.Constructor<Modellor> c = model.getConstructor(new Class[0]); ! Modellor m = c.newInstance(new Object[0]); m.setId(new Long(xml.getProgid())); HashMap content = new HashMap(); *************** *** 393,396 **** --- 422,427 ---- } else if (val instanceof StringType) { content.put(elem.getKey(), ((StringType)val).getString()); + } else if (val instanceof BooleanType) { + content.put(elem.getKey(), ((BooleanType)val).isBoolean()); } else if (val instanceof DoubleType) { content.put(elem.getKey(), new Double(((DoubleType)val).getDouble())); *************** *** 404,407 **** --- 435,439 ---- return m; } catch (Exception e) { + log.error(e); log.error("Modellor were missing empty constructor " + e.getMessage()); return null; *************** *** 809,812 **** --- 841,855 ---- /** * Create an xml SpaceImpl and place it in the map + * @param n The Net + * @param map The map + * @return The NetTypeImpl + */ + private static NetType externalizeNet(Net n, Map map) { + NetType xml = new NetTypeImpl(); + return (NetType)externalizeSpace(xml, n, map); + } + + /** + * Create an xml SpaceImpl and place it in the map * @param space The space * @param map The map *************** *** 815,818 **** --- 858,872 ---- private static SpaceType externalizeSpace(Space space, Map map) { SpaceType xml = new SpaceImpl(); + return externalizeSpace(xml, space, map); + } + + /** + * Create content + * @param xml the space xml + * @param space The space + * @param map The map + * @return The SpaceImpl + */ + private static SpaceType externalizeSpace(SpaceType xml, Space space, Map map) { xml.setId(counter++); xml.setProgid(space.getId().longValue()); *************** *** 840,845 **** Iterator iter = elements.iterator(); while (iter.hasNext()) { ! Space current = (Space) iter.next(); ! xml.getSpace().add(externalizeSpace(current, map)); } } --- 894,905 ---- Iterator iter = elements.iterator(); while (iter.hasNext()) { ! Object current = iter.next(); ! if (current instanceof Net) { ! xml.getSpace().add(externalizeNet((Net)current, map)); ! } else if (current instanceof Space) { ! xml.getSpace().add(externalizeSpace((Space)current, map)); ! } else { ! log.error("trying to externalize unsupported spacetype"); ! } } } *************** *** 1247,1250 **** --- 1307,1314 ---- t.setInteger(((Integer)val).intValue()); elem.setValue(t); + } else if (val instanceof Boolean) { + BooleanType t = new BooleanTypeImpl(); + t.setBoolean(val.equals(Boolean.TRUE)); + elem.setValue(t); } else if (val instanceof Double) { DoubleType t = new DoubleTypeImpl(); |