bprocessor-commit Mailing List for B-processor (Page 50)
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: Michael L. <he...@us...> - 2007-10-12 07:57:54
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2910/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: Transparent surfaces rendered without depth-mask Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Display.java 11 Oct 2007 13:57:28 -0000 1.29 --- Display.java 12 Oct 2007 07:57:53 -0000 1.30 *************** *** 413,416 **** --- 413,417 ---- paint(current, color, 1.0f, false); } else if (transparency) { + paint(current, color, 0.3f, false); } *************** *** 433,438 **** --- 434,445 ---- private static void paint(Surface surface, float[] color, float alpha, boolean reverse) { + if (alpha != 1.0) { + gl.glDepthMask(false); + } apply(color, alpha); draw(surface, reverse); + if (alpha != 1.0) { + gl.glDepthMask(true); + } } *************** *** 600,608 **** } ! private static boolean transparent(Space space) { ! Project project = Project.getInstance(); ! Camera camera = project.getCurrentCamera(); Collection<Geometric> hidden = camera.getHiddenGeometrics(); ! if (hidden.contains(space)) { return true; } --- 607,617 ---- } ! private static boolean hidden(Space space) { Collection<Geometric> hidden = camera.getHiddenGeometrics(); ! return hidden.contains(space); ! } ! ! private static boolean transparent(Space space) { ! if (hidden(space)) { return true; } *************** *** 619,622 **** --- 628,632 ---- } + private static boolean transparent(Surface surface) { Space front = surface.getFrontDomain(); *************** *** 625,628 **** --- 635,644 ---- } + private static boolean hidden(Surface surface) { + Space front = surface.getFrontDomain(); + Space back = surface.getBackDomain(); + return hidden(front) && hidden(back); + } + private static void draw(Space space, boolean inside) { Set<Geometric> hidden = new HashSet(); |
From: Michael L. <he...@us...> - 2007-10-11 13:57:26
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17207/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: Attempts to implement transparency Ð not finished Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Display.java 11 Oct 2007 13:12:12 -0000 1.28 --- Display.java 11 Oct 2007 13:57:28 -0000 1.29 *************** *** 284,290 **** */ ! private static void apply(float[] color) { ! float[] alpha = new float[]{color[0], color[1], color[2], 1.0f}; ! gl.glColor4fv(alpha, 0); } --- 284,294 ---- */ ! private static void apply(float[] color, float a) { ! if (a == 1.0) { ! gl.glColor3fv(color, 0); ! } else { ! float[] alpha = new float[]{color[0], color[1], color[2], a}; ! gl.glColor4fv(alpha, 0); ! } } *************** *** 363,369 **** ! private static void selectSurfaces(Collection<Surface> surfaces) { for (Surface current : surfaces) { ! if (!transparent(current)) { push(current); draw(current, false); --- 367,373 ---- ! private static void selectSurfaces(Collection<Surface> surfaces, boolean transparency) { for (Surface current : surfaces) { ! if (!transparent(current) || transparency) { push(current); draw(current, false); *************** *** 376,380 **** gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); gl.glPolygonOffset(1.0f, 1.0f); ! apply(color); for (Surface current : surfaces) { if (!transparent(current)) { --- 380,384 ---- gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); gl.glPolygonOffset(1.0f, 1.0f); ! apply(color, 1.0f); for (Surface current : surfaces) { if (!transparent(current)) { *************** *** 385,390 **** } ! private static void paintSurfaces(Collection<Surface> surfaces) { ! gl.glEnable(GL.GL_LIGHTING); gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); --- 389,403 ---- } ! private static float[] colorOf(Space space) { ! if (space.isVoid()) { ! return misty; ! } else if (space.isConstructionSpace()) { ! return Defaults.getFrontColor(); ! } else { ! return Defaults.getBackColor(); ! } ! } ! ! private static void paintSurfaces(Collection<Surface> surfaces, boolean transparency) { gl.glEnable(GL.GL_LIGHTING); gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); *************** *** 393,423 **** gl.glCullFace(GL.GL_BACK); for (Surface current : surfaces) { if (!transparent(current)) { ! Space front = current.getFrontDomain(); ! Vertex n = current.normal(); ! gl.glNormal3d(n.getX(), n.getY(), n.getZ()); ! if (front.isVoid()) { ! apply(misty); ! } else if (front.isConstructionSpace()) { ! apply(Defaults.getFrontColor()); ! } else { ! apply(Defaults.getBackColor()); ! } ! draw(current, false); } } for (Surface current : surfaces) { if (!transparent(current)) { ! Space back = current.getBackDomain(); ! Vertex n = current.normal(); ! gl.glNormal3d(-n.getX(), -n.getY(), -n.getZ()); ! if (back.isVoid()) { ! apply(misty); ! } else if (back.isConstructionSpace()) { ! apply(Defaults.getFrontColor()); ! } else { ! apply(Defaults.getBackColor()); ! } ! draw(current, true); } } --- 406,428 ---- gl.glCullFace(GL.GL_BACK); for (Surface current : surfaces) { + Space front = current.getFrontDomain(); + Vertex n = current.normal(); + gl.glNormal3d(n.getX(), n.getY(), n.getZ()); + float[] color = colorOf(front); if (!transparent(current)) { ! paint(current, color, 1.0f, false); ! } else if (transparency) { ! paint(current, color, 0.3f, false); } } for (Surface current : surfaces) { + Space back = current.getBackDomain(); + Vertex n = current.normal(); + gl.glNormal3d(-n.getX(), -n.getY(), -n.getZ()); + float[] color = colorOf(back); if (!transparent(current)) { ! paint(current, color, 1.0f, true); ! } else if (transparency) { ! paint(current, color, 0.3f, true); } } *************** *** 427,430 **** --- 432,440 ---- } + private static void paint(Surface surface, float[] color, float alpha, boolean reverse) { + apply(color, alpha); + draw(surface, reverse); + } + private static void draw(Surface surface, boolean reverse) { glu.gluTessBeginPolygon(tesselator, null); *************** *** 637,643 **** for (Surface current : visible) { if (!hidden.contains(current)) { ! if (!transparent(current)) { ! surfaces.add(current); ! } } } --- 647,651 ---- for (Surface current : visible) { if (!hidden.contains(current)) { ! surfaces.add(current); } } *************** *** 712,716 **** if (inside) { if (mode != View.WIREFRAME_MODE) { ! selectSurfaces(surfaces); } } --- 720,728 ---- if (inside) { if (mode != View.WIREFRAME_MODE) { ! if (mode == View.LIGHTING_MODE) { ! selectSurfaces(surfaces, true); ! } else { ! selectSurfaces(surfaces, false); ! } } } *************** *** 725,730 **** if (mode == View.SOLID_MODE) { paintSurfaces(surfaces, alice); ! } else if (mode == View.LIGHTING_MODE || mode == View.SPACE_ASSGN_MODE) { ! paintSurfaces(surfaces); } else if (mode == View.WIREFRAME_MODE) { // do not paint surfaces --- 737,744 ---- if (mode == View.SOLID_MODE) { paintSurfaces(surfaces, alice); ! } else if (mode == View.LIGHTING_MODE) { ! paintSurfaces(surfaces, true); ! } else if (mode == View.SPACE_ASSGN_MODE) { ! paintSurfaces(surfaces, false); } else if (mode == View.WIREFRAME_MODE) { // do not paint surfaces |
From: Michael L. <he...@us...> - 2007-10-11 13:12:10
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31977/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Display.java Log Message: implemented drawing modes in new display Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Display.java 10 Oct 2007 14:15:56 -0000 1.27 --- Display.java 11 Oct 2007 13:12:12 -0000 1.28 *************** *** 46,50 **** private static final boolean TRUE = true; - private static boolean initialized; private static boolean selecting; --- 46,49 ---- *************** *** 59,62 **** --- 58,62 ---- private static boolean intersecting; private static boolean construction; + private static int mode; private static Project project; *************** *** 225,228 **** --- 225,244 ---- /** + * Returns the mode + * @return the mode + */ + public static int mode() { + return mode; + } + + /** + * Changes the value of mode + * @param value new value of mode + */ + public static void mode(int value) { + mode = value; + } + + /** * Sets the objects table * @param value ArrayList *************** *** 357,360 **** --- 373,388 ---- } + private static void paintSurfaces(Collection<Surface> surfaces, float[] color) { + gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); + gl.glPolygonOffset(1.0f, 1.0f); + apply(color); + for (Surface current : surfaces) { + if (!transparent(current)) { + draw(current, false); + } + } + gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); + } + private static void paintSurfaces(Collection<Surface> surfaces) { *************** *** 683,687 **** if (selecting()) { if (inside) { ! selectSurfaces(surfaces); } if (inside || (intersecting() && !(active instanceof Net))) { --- 711,717 ---- if (selecting()) { if (inside) { ! if (mode != View.WIREFRAME_MODE) { ! selectSurfaces(surfaces); ! } } if (inside || (intersecting() && !(active instanceof Net))) { *************** *** 693,697 **** } else { if (inside) { ! paintSurfaces(surfaces); } if (active == space) { --- 723,733 ---- } else { if (inside) { ! if (mode == View.SOLID_MODE) { ! paintSurfaces(surfaces, alice); ! } else if (mode == View.LIGHTING_MODE || mode == View.SPACE_ASSGN_MODE) { ! paintSurfaces(surfaces); ! } else if (mode == View.WIREFRAME_MODE) { ! // do not paint surfaces ! } } if (active == space) { *************** *** 720,727 **** color = grey; } - gl.glDepthMask(false); paintEdges(normal, color, size); paintStippled(stippled, middleblue, size); - gl.glDepthMask(true); } --- 756,761 ---- Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.245 retrieving revision 1.246 diff -C2 -d -r1.245 -r1.246 *** View.java 10 Oct 2007 09:27:53 -0000 1.245 --- View.java 11 Oct 2007 13:12:12 -0000 1.246 *************** *** 212,215 **** --- 212,223 ---- protected static Surface lastSurface; + + + /** Flag for the lighted style of view (this is the default) */ + public static final int LIGHTING_MODE = 0; + /** Flag for the solid style of view (no lighting) */ + public static final int SOLID_MODE = 1; + /** Flag for the wireframe style of view */ + public static final int WIREFRAME_MODE = 2; /** Flag for the "space assignmened only" style of view. * This style of view will only show those surfaces that *************** *** 217,228 **** public static final int SPACE_ASSGN_MODE = 3; - /** Flag for the wireframe style of view */ - public static final int WIREFRAME_MODE = 2; - - /** Flag for the solid style of view (no lighting) */ - public static final int SOLID_MODE = 1; - /** Flag for the lighted style of view (this is the default) */ - public static final int LIGHTING_MODE = 0; - /** */ public static final int VIEW_XY = 3; --- 225,228 ---- *************** *** 697,700 **** --- 697,701 ---- Display.selecting(hitdetection); Display.construction(gridEnabled); + Display.mode(drawMode); initNames(gl); Display.objects(objectTable); |
From: Michael L. <he...@us...> - 2007-10-11 13:11:51
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31606/src/net/sourceforge/bprocessor/model Modified Files: Persistence.java Log Message: commented out some code that didn't compile Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** Persistence.java 11 Oct 2007 10:21:46 -0000 1.46 --- Persistence.java 11 Oct 2007 13:11:45 -0000 1.47 *************** *** 143,152 **** { List<Attribute> attributes = new LinkedList<Attribute>(); ! for (Object o : document.getGlobal()) { ! if (o instanceof MapElementType) { ! MapElementType elem = (MapElementType)o; ! attributes.add(internalizeKeyValue(elem, mapper)); ! } ! } Collections.sort(attributes, new Attribute.AttributeComparator()); Project.getInstance().getGlobals().setAttributes(attributes); --- 143,152 ---- { List<Attribute> attributes = new LinkedList<Attribute>(); ! // for (Object o : document.getGlobal()) { ! // if (o instanceof MapElementType) { ! // MapElementType elem = (MapElementType)o; ! // attributes.add(internalizeKeyValue(elem, mapper)); ! // } ! // } Collections.sort(attributes, new Attribute.AttributeComparator()); Project.getInstance().getGlobals().setAttributes(attributes); *************** *** 799,808 **** document.setName(Project.getInstance().getName()); ! { ! Collection globals = document.getGlobal(); ! for (Attribute a : Project.getInstance().getGlobals().getAttributes()) { ! globals.add(externalizeKeyValue(a.getName(), a.getValue(), mapper)); ! } ! } { Collection cams = document.getCamera(); --- 799,808 ---- document.setName(Project.getInstance().getName()); ! // { ! // Collection globals = document.getGlobal(); ! // for (Attribute a : Project.getInstance().getGlobals().getAttributes()) { ! // globals.add(externalizeKeyValue(a.getName(), a.getValue(), mapper)); ! // } ! // } { Collection cams = document.getCamera(); |
From: rimestad <rim...@us...> - 2007-10-11 10:23:30
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30186/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: getLocationOnScreen can throw a exception Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** GUI.java 22 Sep 2007 13:53:43 -0000 1.74 --- GUI.java 11 Oct 2007 10:23:33 -0000 1.75 *************** *** 602,606 **** alertWindow.pack(); ! java.awt.Point where = getFocusOwner().getLocationOnScreen(); if (where == null) { where = getMousePosition(); --- 602,611 ---- alertWindow.pack(); ! java.awt.Point where = null; ! try { ! where = getFocusOwner().getLocationOnScreen(); ! } catch (Exception e) { ! log.warn(e.getMessage()); ! } if (where == null) { where = getMousePosition(); |
From: rimestad <rim...@us...> - 2007-10-11 10:21:53
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29413/src/net/sourceforge/bprocessor/model Modified Files: Attribute.java Persistence.java Log Message: Added globals to the things persistens puts in a bp file. Index: Attribute.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Attribute.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Attribute.java 9 Aug 2007 16:07:53 -0000 1.22 --- Attribute.java 11 Oct 2007 10:21:46 -0000 1.23 *************** *** 8,11 **** --- 8,12 ---- import java.util.Collection; + import java.util.Comparator; import java.util.Iterator; import java.util.LinkedList; *************** *** 254,256 **** --- 255,263 ---- this.the2ndValue = the2ndValue; } + + protected static class AttributeComparator implements Comparator<Attribute> { + public int compare(Attribute o1, Attribute o2) { + return o1.name.compareTo(o2.name); + } + } } Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** Persistence.java 9 Aug 2007 16:07:53 -0000 1.45 --- Persistence.java 11 Oct 2007 10:21:46 -0000 1.46 *************** *** 82,85 **** --- 82,86 ---- import java.util.ArrayList; import java.util.Collection; + import java.util.Collections; import java.util.HashMap; import java.util.HashSet; *************** *** 141,144 **** --- 142,157 ---- p.changed(p); { + List<Attribute> attributes = new LinkedList<Attribute>(); + for (Object o : document.getGlobal()) { + if (o instanceof MapElementType) { + MapElementType elem = (MapElementType)o; + attributes.add(internalizeKeyValue(elem, mapper)); + } + } + Collections.sort(attributes, new Attribute.AttributeComparator()); + Project.getInstance().getGlobals().setAttributes(attributes); + } + + { Iterator iter = document.getCamera().iterator(); while (iter.hasNext()) { *************** *** 438,457 **** m.setId(new Long(xml.getProgid())); List<MapElementType> attributes = xml.getAttribute(); ! HashMap content = new HashMap(); for (MapElementType elem : attributes) { ! Object val = elem.getValue(); ! if (val instanceof IntegerType) { ! content.put(elem.getKey(), new Integer(((IntegerType)val).getInteger())); ! } 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())); ! } else if (val instanceof RefType) { ! content.put(elem.getKey(), get(((RefType)val).getRef(), map)); ! } else { ! log.warn("Non supported type"); ! } } m.setContent(content); --- 451,458 ---- m.setId(new Long(xml.getProgid())); List<MapElementType> attributes = xml.getAttribute(); ! HashMap<String, Object> content = new HashMap(); for (MapElementType elem : attributes) { ! Attribute a = internalizeKeyValue(elem, map); ! content.put(a.getName(), a.getValue()); } m.setContent(content); *************** *** 467,470 **** --- 468,490 ---- } + private static Attribute internalizeKeyValue(MapElementType elem, Map map) { + Object val = elem.getValue(); + Attribute res = null; + if (val instanceof IntegerType) { + res = new Attribute(elem.getKey(), new Integer(((IntegerType)val).getInteger())); + } else if (val instanceof StringType) { + res = new Attribute(elem.getKey(), ((StringType)val).getString()); + } else if (val instanceof BooleanType) { + res = new Attribute(elem.getKey(), ((BooleanType)val).isBoolean()); + } else if (val instanceof DoubleType) { + res = new Attribute(elem.getKey(), new Double(((DoubleType)val).getDouble())); + } else if (val instanceof RefType) { + res = new Attribute(elem.getKey(), get(((RefType)val).getRef(), map)); + } else { + log.warn("Non supported type"); + } + return res; + } + /** * *************** *** 780,783 **** --- 800,809 ---- { + Collection globals = document.getGlobal(); + for (Attribute a : Project.getInstance().getGlobals().getAttributes()) { + globals.add(externalizeKeyValue(a.getName(), a.getValue(), mapper)); + } + } + { Collection cams = document.getCamera(); Iterator iter = Project.getInstance().getCameras().iterator(); |
From: rimestad <rim...@us...> - 2007-10-11 10:21:53
|
Update of /cvsroot/bprocessor/model/src/etc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29413/src/etc Modified Files: bprocessor.xsd Log Message: Added globals to the things persistens puts in a bp file. Index: bprocessor.xsd =================================================================== RCS file: /cvsroot/bprocessor/model/src/etc/bprocessor.xsd,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** bprocessor.xsd 21 Jun 2007 11:49:15 -0000 1.31 --- bprocessor.xsd 11 Oct 2007 10:21:46 -0000 1.32 *************** *** 1,380 **** ! <?xml version="1.0" encoding="UTF-8"?> ! <!-- ! XML Schema used for persistence ! ! $Id$ ! --> ! <xsd:schema ! xmlns:bpr="http://bprocessor.sourceforge.net" ! xmlns:xsd="http://www.w3.org/2001/XMLSchema" ! xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" ! xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" ! jaxb:extensionBindingPrefixes="xjc" ! jaxb:version="1.0"> ! ! <!-- Needed for subtypeing --> ! <xsd:annotation> ! <xsd:appinfo> ! <jaxb:globalBindings> ! <xjc:typeSubstitution type="complex"/> ! </jaxb:globalBindings> ! </xsd:appinfo> ! </xsd:annotation> ! ! ! ! <!-- Type definitions --> ! ! <xsd:complexType name="BasicType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:attribute name="id" type="xsd:long" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="EntityType"> ! <xsd:complexContent> ! <xsd:extension base="BasicType"> ! <xsd:attribute name="progid" type="xsd:long" use="optional"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! ! ! <xsd:complexType name="TripletType"> ! <xsd:attribute name="x" type="xsd:double" use="required"/> ! <xsd:attribute name="y" type="xsd:double" use="required"/> ! <xsd:attribute name="z" type="xsd:double" use="required"/> ! </xsd:complexType> ! ! <xsd:complexType name="ClipplaneType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="coordinateSystem" type="CoordinateSystemType" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! <xsd:attribute name="Active" type="xsd:boolean" use="required"/> ! <xsd:attribute name="friend" type="xsd:long"/> ! <xsd:attribute name="number" type="xsd:int" use="required"/> ! <xsd:attribute name="Slice" type="xsd:boolean" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="CameraType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="scalefactor" type="xsd:int" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="camera" type="TripletType" maxOccurs="1" minOccurs="1"/> ! <xsd:element name="center" type="TripletType" maxOccurs="1" minOccurs="1"/> ! <xsd:element name="roll" type="TripletType" maxOccurs="1" minOccurs="1"/> ! <xsd:element name="focalwidth" type="xsd:double" maxOccurs="1" minOccurs="1"/> ! <xsd:element name="type" type="xsd:int" maxOccurs="1" minOccurs="1"/> ! <xsd:element name="clipplanes" type="ClipplaneType" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="name" type="xsd:string" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="NetType"> ! <xsd:complexContent> ! <xsd:extension base="SpaceType"> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="SpaceType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="description" type="xsd:string" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="Classification" type="xsd:string" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="boundary" type="xsd:long" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element name="constructor" type="ConstructorType" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element name="modellor" type="ModellorType" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="transforms" type="TransformType" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="space" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="surface" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="edge" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="vertex" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="material" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="type" type="xsd:int" use="required"/> ! <xsd:attribute name="name" type="xsd:string"/> ! <xsd:attribute name="voidref" type="xsd:long"/> ! <xsd:attribute name="protoref" type="xsd:long"/> ! <xsd:attribute name="transparent" type="xsd:boolean" use="required"/> ! <xsd:attribute name="level" type="xsd:int" use="required"/> ! <xsd:attribute name="union" type="xsd:boolean" use="optional"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="SurfaceType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="edgeref" type="xsd:long" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element name="hole" type="xsd:long" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element name="back" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="front" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="exterior" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="frontMaterial" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="backMaterial" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="EdgeType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="from" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="to" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="constructor" type="xsd:boolean" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="VertexType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:attribute name="x" type="xsd:double" use="required"/> ! <xsd:attribute name="y" type="xsd:double" use="required"/> ! <xsd:attribute name="z" type="xsd:double" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="MaterialType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:attribute name="name" type="xsd:string" use="required"/> ! <xsd:attribute name="R" type="xsd:float" use="required"/> ! <xsd:attribute name="G" type="xsd:float" use="required"/> ! <xsd:attribute name="B" type="xsd:float" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="ConstructorType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element ref="vertex" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="connected" type="xsd:long" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="active" type="xsd:boolean" use="required"/> ! <xsd:attribute name="editable" type="xsd:boolean" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="LineType"> ! <xsd:complexContent> ! <xsd:extension base="ConstructorType"> ! <xsd:sequence> ! <xsd:element ref="direction" maxOccurs="1" minOccurs="0"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="PointType"> ! <xsd:complexContent> ! <xsd:extension base="ConstructorType"> ! <xsd:sequence> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! ! <xsd:complexType name="RelationType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:sequence> ! </xsd:sequence> ! <xsd:attribute name="offset" type="xsd:string"/> ! <xsd:attribute name="geometric" type="xsd:long"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="CoordinateSystemType"> ! <xsd:complexContent> ! <xsd:extension base="ConstructorType"> ! <xsd:sequence> ! <xsd:element ref="ijn" maxOccurs="1" minOccurs="0"/> ! <xsd:element ref="relation" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="onlyplane" type="xsd:boolean" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="VertexesType"> ! <xsd:sequence> ! <xsd:element ref="vertex" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! </xsd:complexType> ! ! <xsd:complexType name="ModellorType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="attribute" type="MapElementType" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="ty" type="xsd:string"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <!-- HASHMAP --> ! <xsd:complexType name="Types"> ! </xsd:complexType> ! ! <xsd:complexType name="RefType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:sequence> ! <xsd:element name="ref" type="xsd:long" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="IntegerType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:sequence> ! <xsd:element name="integer" type="xsd:int" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="DoubleType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:sequence> ! <xsd:element name="double" type="xsd:double" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="BooleanType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:sequence> ! <xsd:element name="boolean" type="xsd:boolean" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="StringType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:sequence> ! <xsd:element name="string" type="xsd:string" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="MapElementType"> ! <xsd:sequence> ! <xsd:element name="key" type="xsd:string" maxOccurs="1" minOccurs="1"/> ! <xsd:element name="value" type="Types" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! </xsd:complexType> ! ! <!-- TRANSFORMATIONS --> ! <xsd:complexType name="TransformType"> ! </xsd:complexType> ! ! <xsd:complexType name="RotateType"> ! <xsd:complexContent> ! <xsd:extension base="TransformType"> ! <xsd:attribute name="x" type="xsd:double" use="required"/> ! <xsd:attribute name="y" type="xsd:double" use="required"/> ! <xsd:attribute name="z" type="xsd:double" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="TranslateType"> ! <xsd:complexContent> ! <xsd:extension base="TransformType"> ! <xsd:attribute name="x" type="xsd:double" use="required"/> ! <xsd:attribute name="y" type="xsd:double" use="required"/> ! <xsd:attribute name="z" type="xsd:double" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="ScaleType"> ! <xsd:complexContent> ! <xsd:extension base="TransformType"> ! <xsd:attribute name="x" type="xsd:double" use="required"/> ! <xsd:attribute name="y" type="xsd:double" use="required"/> ! <xsd:attribute name="z" type="xsd:double" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="AxisRotateType"> ! <xsd:complexContent> ! <xsd:extension base="TransformType"> ! <xsd:attribute name="x" type="xsd:double" use="required"/> ! <xsd:attribute name="y" type="xsd:double" use="required"/> ! <xsd:attribute name="z" type="xsd:double" use="required"/> ! <xsd:attribute name="angle" type="xsd:double" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="IDTransformType"> ! <xsd:complexContent> ! <xsd:extension base="TransformType"> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <!-- Element definitions --> ! <xsd:element name="space" type="SpaceType"/> ! <xsd:element name="surface" type="SurfaceType"/> ! <xsd:element name="edge" type="EdgeType"/> ! <xsd:element name="vertex" type="VertexType"/> ! <xsd:element name="material" type="MaterialType"/> ! <xsd:element name="origin" type="VertexType"/> ! <xsd:element name="direction" type="VertexesType"/> ! <xsd:element name="ijn" type="VertexesType"/> ! <xsd:element name="relation" type="RelationType"/> ! ! <!-- Main element --> ! <xsd:element name="bmodel"> ! <xsd:complexType> ! <xsd:sequence> ! <xsd:element name="active" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="cs" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="name" type="xsd:string" maxOccurs="1" minOccurs="0"/> ! <xsd:element ref="space" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="surface" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="edge" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="vertex" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="material" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element name="camera" type="CameraType" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! </xsd:complexType> ! </xsd:element> ! ! </xsd:schema> --- 1,381 ---- ! <?xml version="1.0" encoding="UTF-8"?> ! <!-- ! XML Schema used for persistence ! ! $Id$ ! --> ! <xsd:schema ! xmlns:bpr="http://bprocessor.sourceforge.net" ! xmlns:xsd="http://www.w3.org/2001/XMLSchema" ! xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" ! xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" ! jaxb:extensionBindingPrefixes="xjc" ! jaxb:version="1.0"> ! ! <!-- Needed for subtypeing --> ! <xsd:annotation> ! <xsd:appinfo> ! <jaxb:globalBindings> ! <xjc:typeSubstitution type="complex"/> ! </jaxb:globalBindings> ! </xsd:appinfo> ! </xsd:annotation> ! ! ! ! <!-- Type definitions --> ! ! <xsd:complexType name="BasicType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:attribute name="id" type="xsd:long" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="EntityType"> ! <xsd:complexContent> ! <xsd:extension base="BasicType"> ! <xsd:attribute name="progid" type="xsd:long" use="optional"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! ! ! <xsd:complexType name="TripletType"> ! <xsd:attribute name="x" type="xsd:double" use="required"/> ! <xsd:attribute name="y" type="xsd:double" use="required"/> ! <xsd:attribute name="z" type="xsd:double" use="required"/> ! </xsd:complexType> ! ! <xsd:complexType name="ClipplaneType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="coordinateSystem" type="CoordinateSystemType" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! <xsd:attribute name="Active" type="xsd:boolean" use="required"/> ! <xsd:attribute name="friend" type="xsd:long"/> ! <xsd:attribute name="number" type="xsd:int" use="required"/> ! <xsd:attribute name="Slice" type="xsd:boolean" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="CameraType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="scalefactor" type="xsd:int" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="camera" type="TripletType" maxOccurs="1" minOccurs="1"/> ! <xsd:element name="center" type="TripletType" maxOccurs="1" minOccurs="1"/> ! <xsd:element name="roll" type="TripletType" maxOccurs="1" minOccurs="1"/> ! <xsd:element name="focalwidth" type="xsd:double" maxOccurs="1" minOccurs="1"/> ! <xsd:element name="type" type="xsd:int" maxOccurs="1" minOccurs="1"/> ! <xsd:element name="clipplanes" type="ClipplaneType" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="name" type="xsd:string" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="NetType"> ! <xsd:complexContent> ! <xsd:extension base="SpaceType"> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="SpaceType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="description" type="xsd:string" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="Classification" type="xsd:string" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="boundary" type="xsd:long" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element name="constructor" type="ConstructorType" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element name="modellor" type="ModellorType" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="transforms" type="TransformType" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="space" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="surface" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="edge" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="vertex" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="material" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="type" type="xsd:int" use="required"/> ! <xsd:attribute name="name" type="xsd:string"/> ! <xsd:attribute name="voidref" type="xsd:long"/> ! <xsd:attribute name="protoref" type="xsd:long"/> ! <xsd:attribute name="transparent" type="xsd:boolean" use="required"/> ! <xsd:attribute name="level" type="xsd:int" use="required"/> ! <xsd:attribute name="union" type="xsd:boolean" use="optional"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="SurfaceType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="edgeref" type="xsd:long" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element name="hole" type="xsd:long" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element name="back" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="front" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="exterior" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="frontMaterial" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="backMaterial" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="EdgeType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="from" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="to" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="constructor" type="xsd:boolean" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="VertexType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:attribute name="x" type="xsd:double" use="required"/> ! <xsd:attribute name="y" type="xsd:double" use="required"/> ! <xsd:attribute name="z" type="xsd:double" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="MaterialType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:attribute name="name" type="xsd:string" use="required"/> ! <xsd:attribute name="R" type="xsd:float" use="required"/> ! <xsd:attribute name="G" type="xsd:float" use="required"/> ! <xsd:attribute name="B" type="xsd:float" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="ConstructorType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element ref="vertex" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="connected" type="xsd:long" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="active" type="xsd:boolean" use="required"/> ! <xsd:attribute name="editable" type="xsd:boolean" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="LineType"> ! <xsd:complexContent> ! <xsd:extension base="ConstructorType"> ! <xsd:sequence> ! <xsd:element ref="direction" maxOccurs="1" minOccurs="0"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="PointType"> ! <xsd:complexContent> ! <xsd:extension base="ConstructorType"> ! <xsd:sequence> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! ! <xsd:complexType name="RelationType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:sequence> ! </xsd:sequence> ! <xsd:attribute name="offset" type="xsd:string"/> ! <xsd:attribute name="geometric" type="xsd:long"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="CoordinateSystemType"> ! <xsd:complexContent> ! <xsd:extension base="ConstructorType"> ! <xsd:sequence> ! <xsd:element ref="ijn" maxOccurs="1" minOccurs="0"/> ! <xsd:element ref="relation" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="onlyplane" type="xsd:boolean" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="VertexesType"> ! <xsd:sequence> ! <xsd:element ref="vertex" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! </xsd:complexType> ! ! <xsd:complexType name="ModellorType"> ! <xsd:complexContent> ! <xsd:extension base="EntityType"> ! <xsd:sequence> ! <xsd:element name="attribute" type="MapElementType" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! <xsd:attribute name="ty" type="xsd:string"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <!-- HASHMAP --> ! <xsd:complexType name="Types"> ! </xsd:complexType> ! ! <xsd:complexType name="RefType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:sequence> ! <xsd:element name="ref" type="xsd:long" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="IntegerType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:sequence> ! <xsd:element name="integer" type="xsd:int" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="DoubleType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:sequence> ! <xsd:element name="double" type="xsd:double" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="BooleanType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:sequence> ! <xsd:element name="boolean" type="xsd:boolean" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="StringType"> ! <xsd:complexContent> ! <xsd:extension base="Types"> ! <xsd:sequence> ! <xsd:element name="string" type="xsd:string" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="MapElementType"> ! <xsd:sequence> ! <xsd:element name="key" type="xsd:string" maxOccurs="1" minOccurs="1"/> ! <xsd:element name="value" type="Types" maxOccurs="1" minOccurs="1"/> ! </xsd:sequence> ! </xsd:complexType> ! ! <!-- TRANSFORMATIONS --> ! <xsd:complexType name="TransformType"> ! </xsd:complexType> ! ! <xsd:complexType name="RotateType"> ! <xsd:complexContent> ! <xsd:extension base="TransformType"> ! <xsd:attribute name="x" type="xsd:double" use="required"/> ! <xsd:attribute name="y" type="xsd:double" use="required"/> ! <xsd:attribute name="z" type="xsd:double" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="TranslateType"> ! <xsd:complexContent> ! <xsd:extension base="TransformType"> ! <xsd:attribute name="x" type="xsd:double" use="required"/> ! <xsd:attribute name="y" type="xsd:double" use="required"/> ! <xsd:attribute name="z" type="xsd:double" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="ScaleType"> ! <xsd:complexContent> ! <xsd:extension base="TransformType"> ! <xsd:attribute name="x" type="xsd:double" use="required"/> ! <xsd:attribute name="y" type="xsd:double" use="required"/> ! <xsd:attribute name="z" type="xsd:double" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="AxisRotateType"> ! <xsd:complexContent> ! <xsd:extension base="TransformType"> ! <xsd:attribute name="x" type="xsd:double" use="required"/> ! <xsd:attribute name="y" type="xsd:double" use="required"/> ! <xsd:attribute name="z" type="xsd:double" use="required"/> ! <xsd:attribute name="angle" type="xsd:double" use="required"/> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <xsd:complexType name="IDTransformType"> ! <xsd:complexContent> ! <xsd:extension base="TransformType"> ! </xsd:extension> ! </xsd:complexContent> ! </xsd:complexType> ! ! <!-- Element definitions --> ! <xsd:element name="space" type="SpaceType"/> ! <xsd:element name="surface" type="SurfaceType"/> ! <xsd:element name="edge" type="EdgeType"/> ! <xsd:element name="vertex" type="VertexType"/> ! <xsd:element name="material" type="MaterialType"/> ! <xsd:element name="origin" type="VertexType"/> ! <xsd:element name="direction" type="VertexesType"/> ! <xsd:element name="ijn" type="VertexesType"/> ! <xsd:element name="relation" type="RelationType"/> ! ! <!-- Main element --> ! <xsd:element name="bmodel"> ! <xsd:complexType> ! <xsd:sequence> ! <xsd:element name="active" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="cs" type="xsd:long" maxOccurs="1" minOccurs="0"/> ! <xsd:element name="name" type="xsd:string" maxOccurs="1" minOccurs="0"/> ! <xsd:element ref="space" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="surface" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="edge" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="vertex" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element ref="material" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element name="camera" type="CameraType" maxOccurs="unbounded" minOccurs="0"/> ! <xsd:element name="global" type="MapElementType" maxOccurs="unbounded" minOccurs="0"/> ! </xsd:sequence> ! </xsd:complexType> ! </xsd:element> ! ! </xsd:schema> |
From: Michael L. <he...@us...> - 2007-10-10 14:16:03
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3845/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: xray experiment Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Display.java 10 Oct 2007 12:43:52 -0000 1.26 --- Display.java 10 Oct 2007 14:15:56 -0000 1.27 *************** *** 268,271 **** --- 268,276 ---- */ + private static void apply(float[] color) { + float[] alpha = new float[]{color[0], color[1], color[2], 1.0f}; + gl.glColor4fv(alpha, 0); + } + private static void draw(Vertex vertex) { gl.glBegin(GL.GL_POINTS); *************** *** 352,356 **** } ! private static void drawSurfaces(Collection<Surface> surfaces) { gl.glEnable(GL.GL_LIGHTING); gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); --- 357,362 ---- } ! private static void paintSurfaces(Collection<Surface> surfaces) { ! gl.glEnable(GL.GL_LIGHTING); gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); *************** *** 364,372 **** gl.glNormal3d(n.getX(), n.getY(), n.getZ()); if (front.isVoid()) { ! gl.glColor3fv(misty, 0); } else if (front.isConstructionSpace()) { ! gl.glColor3fv(Defaults.getFrontColor(), 0); } else { ! gl.glColor3fv(Defaults.getBackColor(), 0); } draw(current, false); --- 370,378 ---- gl.glNormal3d(n.getX(), n.getY(), n.getZ()); if (front.isVoid()) { ! apply(misty); } else if (front.isConstructionSpace()) { ! apply(Defaults.getFrontColor()); } else { ! apply(Defaults.getBackColor()); } draw(current, false); *************** *** 379,387 **** gl.glNormal3d(-n.getX(), -n.getY(), -n.getZ()); if (back.isVoid()) { ! gl.glColor3fv(misty, 0); } else if (back.isConstructionSpace()) { ! gl.glColor3fv(Defaults.getFrontColor(), 0); } else { ! gl.glColor3fv(Defaults.getBackColor(), 0); } draw(current, true); --- 385,393 ---- gl.glNormal3d(-n.getX(), -n.getY(), -n.getZ()); if (back.isVoid()) { ! apply(misty); } else if (back.isConstructionSpace()) { ! apply(Defaults.getFrontColor()); } else { ! apply(Defaults.getBackColor()); } draw(current, true); *************** *** 679,683 **** selectSurfaces(surfaces); } ! if (inside || intersecting()) { selectEdges(edges); } --- 685,689 ---- selectSurfaces(surfaces); } ! if (inside || (intersecting() && !(active instanceof Net))) { selectEdges(edges); } *************** *** 687,691 **** } else { if (inside) { ! drawSurfaces(surfaces); } if (active == space) { --- 693,697 ---- } else { if (inside) { ! paintSurfaces(surfaces); } if (active == space) { |
From: Michael L. <he...@us...> - 2007-10-10 12:43:50
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26900/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: selecting mechanics Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Display.java 10 Oct 2007 11:39:46 -0000 1.25 --- Display.java 10 Oct 2007 12:43:52 -0000 1.26 *************** *** 60,63 **** --- 60,66 ---- private static boolean construction; + private static Project project; + private static Camera camera; + private static Space active; private static float[] white = new float[] {1.0f, 1.0f, 1.0f}; *************** *** 578,588 **** } ! private static void draw(Space space, boolean active) { ! Project project = Project.getInstance(); ! Camera camera = project.getCurrentCamera(); ! if (!active) { ! active = project.getActiveSpace() == space; ! } ! Set<Geometric> hidden = new HashSet(); hidden.addAll(camera.getHiddenGeometrics()); --- 581,585 ---- } ! private static void draw(Space space, boolean inside) { Set<Geometric> hidden = new HashSet(); hidden.addAll(camera.getHiddenGeometrics()); *************** *** 642,646 **** { ! if (selecting() || (space instanceof Net && space == project.getActiveSpace())) { Set<Vertex> visible = new HashSet(); for (Edge current : edges) { --- 639,643 ---- { ! if (selecting() || (space instanceof Net && space == active)) { Set<Vertex> visible = new HashSet(); for (Edge current : edges) { *************** *** 679,694 **** if (selecting()) { ! if (active) { selectSurfaces(surfaces); } ! selectEdges(edges); if (construction()) { selectConstructors(constructors); } } else { ! if (active) { drawSurfaces(surfaces); } ! if (project.getActiveSpace() == space) { if (construction()) { gl.glDepthMask(false); --- 676,693 ---- if (selecting()) { ! if (inside) { selectSurfaces(surfaces); } ! if (inside || intersecting()) { ! selectEdges(edges); ! } if (construction()) { selectConstructors(constructors); } } else { ! if (inside) { drawSurfaces(surfaces); } ! if (active == space) { if (construction()) { gl.glDepthMask(false); *************** *** 710,714 **** size = 1.0f; } ! if (active) { color = black; } else { --- 709,713 ---- size = 1.0f; } ! if (inside) { color = black; } else { *************** *** 724,728 **** if (selecting()) { ! selectVertices(vertices); } else { float[] color; --- 723,729 ---- if (selecting()) { ! if (inside || intersecting()) { ! selectVertices(vertices); ! } } else { float[] color; *************** *** 736,740 **** for (Space current : elements) { ! draw(current, active); } } --- 737,741 ---- for (Space current : elements) { ! draw(current, inside || (current == active)); } } *************** *** 863,868 **** gl = gld.getGL(); initialize(); ! Space world = Project.getInstance().world(); ! draw(world, false); { --- 864,872 ---- gl = gld.getGL(); initialize(); ! project = Project.getInstance(); ! camera = project.getCurrentCamera(); ! active = project.getActiveSpace(); ! Space world = project.world(); ! draw(world, world == active); { |
From: Michael L. <he...@us...> - 2007-10-10 11:39:46
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv476/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: space hilite Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Display.java 10 Oct 2007 09:27:53 -0000 1.24 --- Display.java 10 Oct 2007 11:39:46 -0000 1.25 *************** *** 715,720 **** --- 715,722 ---- color = grey; } + gl.glDepthMask(false); paintEdges(normal, color, size); paintStippled(stippled, middleblue, size); + gl.glDepthMask(true); } *************** *** 757,761 **** --- 759,773 ---- } + for (Geometric current : geometrics) { + if (current instanceof Space) { + Space space = (Space) current; + Collection<Surface> envelope = space.getEnvelope(); + Collection<Edge> edges = Surface.edges(envelope); + paintEdges(edges, redish, 2.0f); + } + } + gl.glEnable(GL.GL_LINE_STIPPLE); + gl.glLineWidth(3.0f); for (Geometric current : geometrics) { if (current instanceof Constructor) { |
From: Michael L. <he...@us...> - 2007-10-10 09:27:51
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10069/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Display.java Log Message: Grid on/off Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Display.java 10 Oct 2007 08:59:02 -0000 1.23 --- Display.java 10 Oct 2007 09:27:53 -0000 1.24 *************** *** 58,61 **** --- 58,62 ---- private static Grid grid; private static boolean intersecting; + private static boolean construction; *************** *** 204,207 **** --- 205,225 ---- /** + * Returns true if construction geometry is visible + * @return true if construction geometry is visible + */ + public static boolean construction() { + return construction; + } + + /** + * Sets the construction flag specifying if construction + * is visible + * @param value new value of construction flag + */ + public static void construction(boolean value) { + construction = value; + } + + /** * Sets the objects table * @param value ArrayList *************** *** 665,669 **** } selectEdges(edges); ! selectConstructors(constructors); } else { if (active) { --- 683,689 ---- } selectEdges(edges); ! if (construction()) { ! selectConstructors(constructors); ! } } else { if (active) { *************** *** 671,678 **** } if (project.getActiveSpace() == space) { ! gl.glDepthMask(false); ! draw(grid); ! paintConstructors(constructors); ! gl.glDepthMask(true); } Collection<Edge> stippled = new LinkedList(); --- 691,700 ---- } if (project.getActiveSpace() == space) { ! if (construction()) { ! gl.glDepthMask(false); ! draw(grid); ! paintConstructors(constructors); ! gl.glDepthMask(true); ! } } Collection<Edge> stippled = new LinkedList(); Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.244 retrieving revision 1.245 diff -C2 -d -r1.244 -r1.245 *** View.java 9 Oct 2007 14:02:10 -0000 1.244 --- View.java 10 Oct 2007 09:27:53 -0000 1.245 *************** *** 696,699 **** --- 696,700 ---- if (UNIFIED_DISPLAY) { Display.selecting(hitdetection); + Display.construction(gridEnabled); initNames(gl); Display.objects(objectTable); |
From: Michael L. <he...@us...> - 2007-10-10 08:59:00
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30449/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: Grid drawing Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Display.java 8 Oct 2007 12:57:36 -0000 1.22 --- Display.java 10 Oct 2007 08:59:02 -0000 1.23 *************** *** 767,775 **** double x = origin.getX() - size / 2; double y = origin.getY(); ! double z = origin.getY(); gl.glBegin(GL.GL_LINE_STRIP); gl.glVertex3d(x, y, z); gl.glVertex3d(x + size, y, z); gl.glEnd(); } --- 767,792 ---- double x = origin.getX() - size / 2; double y = origin.getY(); ! double z = origin.getZ(); gl.glBegin(GL.GL_LINE_STRIP); gl.glVertex3d(x, y, z); gl.glVertex3d(x + size, y, z); gl.glEnd(); + int n = (int) Math.floor((size / 2) / delta); + y = origin.getY(); + for (int i = 0; i < n; i++) { + y += delta; + gl.glBegin(GL.GL_LINE_STRIP); + gl.glVertex3d(x, y, z); + gl.glVertex3d(x + size, y, z); + gl.glEnd(); + } + y = origin.getY(); + for (int i = 0; i < n; i++) { + y -= delta; + gl.glBegin(GL.GL_LINE_STRIP); + gl.glVertex3d(x, y, z); + gl.glVertex3d(x + size, y, z); + gl.glEnd(); + } } *************** *** 777,785 **** double x = origin.getX(); double y = origin.getY() - size / 2; ! double z = origin.getY(); gl.glBegin(GL.GL_LINE_STRIP); gl.glVertex3d(x, y, z); gl.glVertex3d(x, y + size, z); gl.glEnd(); } } --- 794,821 ---- double x = origin.getX(); double y = origin.getY() - size / 2; ! double z = origin.getZ(); gl.glBegin(GL.GL_LINE_STRIP); gl.glVertex3d(x, y, z); gl.glVertex3d(x, y + size, z); gl.glEnd(); + + int n = (int) Math.floor((size / 2) / delta); + x = origin.getX(); + for (int i = 0; i < n; i++) { + x += delta; + gl.glBegin(GL.GL_LINE_STRIP); + gl.glVertex3d(x, y, z); + gl.glVertex3d(x, y + size, z); + gl.glEnd(); + } + x = origin.getX(); + for (int i = 0; i < n; i++) { + x -= delta; + gl.glBegin(GL.GL_LINE_STRIP); + gl.glVertex3d(x, y, z); + gl.glVertex3d(x, y + size, z); + gl.glEnd(); + } + } } |
From: Michael L. <he...@us...> - 2007-10-10 08:32:06
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19783/src/net/sourceforge/bprocessor/gl/tool Removed Files: VectorMoveTool.java Log Message: removed some code --- VectorMoveTool.java DELETED --- |
From: Michael L. <he...@us...> - 2007-10-10 08:32:06
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19683/src/net/sourceforge/bprocessor/model Modified Files: Space.java Geometric.java Constructor.java Added Files: Grid.java Log Message: removed some code Index: Geometric.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometric.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Geometric.java 19 Jul 2007 12:23:39 -0000 1.19 --- Geometric.java 10 Oct 2007 08:32:00 -0000 1.20 *************** *** 203,215 **** */ public abstract void move(double x, double y, double z); - - /** - * Check how much of the given direction this object can move - * @param x the x distance - * @param y the y distance - * @param z the z distance - * @param entities The other entities that are to be moved as well - * @return The possible distance vector this object can move - */ - public abstract Vertex canMove(double x, double y, double z, Collection entities); } --- 203,205 ---- Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.179 retrieving revision 1.180 diff -C2 -d -r1.179 -r1.180 *** Space.java 8 Oct 2007 13:23:43 -0000 1.179 --- Space.java 10 Oct 2007 08:32:00 -0000 1.180 *************** *** 2207,2217 **** } - /** {@inheritDoc} */ - @Override - public Vertex canMove(double x, double y, double z, Collection entities) { - // TODO Think it through - return new Vertex(x, y, z); - } - /** * Perform a consistency check of the geometry. --- 2207,2210 ---- Index: Constructor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Constructor.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Constructor.java 2 Oct 2007 12:37:56 -0000 1.22 --- Constructor.java 10 Oct 2007 08:32:00 -0000 1.23 *************** *** 250,258 **** super.move(x, y, z); } - - /** {@inheritDoc} */ - public Vertex canMove(double x, double y, double z, Collection entities) { - return parent().canMove(x, y, z, entities); - } } } --- 250,253 ---- --- NEW FILE: Grid.java --- //--------------------------------------------------------------------------------- // $Id: Grid.java,v 1.1 2007/10/10 08:32:00 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.model; import java.util.List; /** * */ public class Grid extends Constructor { /** {@inheritDoc} */ @Override public void delete() { } /** {@inheritDoc} */ public List<Attribute> getAttributes() { return null; } /** {@inheritDoc} */ public String getGeneralName() { return null; } /** {@inheritDoc} */ public void setAttributes(List<Attribute> attributes) { } } |
From: Michael L. <he...@us...> - 2007-10-09 14:02:20
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27833/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: Some refactoring Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.191 retrieving revision 1.192 diff -C2 -d -r1.191 -r1.192 *** Surface.java 9 Oct 2007 12:44:10 -0000 1.191 --- Surface.java 9 Oct 2007 14:02:16 -0000 1.192 *************** *** 691,695 **** // spaces here. if (AUTOMATIC) { ! assignSpaceForExtrusion(delta, n, facemap, top); } return top; --- 691,695 ---- // spaces here. if (AUTOMATIC) { ! assignSpaceForExtrusion(delta, sides, top); } return top; *************** *** 703,707 **** * @param top the top surface */ ! private void assignSpaceForExtrusion(double delta, int n, Surface[] facemap, Surface top) { boolean flip = false; boolean inside = false; --- 703,707 ---- * @param top the top surface */ ! private void assignSpaceForExtrusion(double delta, Collection<Surface> sides, Surface top) { boolean flip = false; boolean inside = false; *************** *** 717,741 **** } ! for (int i = 0; i < n; i++) { ! Surface s = facemap[i]; ! if (s == null) { ! continue; ! } if (delta < 0) { ! s.setBackDomain(getBackDomain()); if (exterior != null && inside) { if (flip) { ! s.setFrontDomain(exterior.getFrontDomain()); } else { ! s.setFrontDomain(exterior.getBackDomain()); } } } else { ! s.setFrontDomain(getFrontDomain()); if (exterior != null && inside) { if (flip) { ! s.setBackDomain(exterior.getBackDomain()); } else { ! s.setBackDomain(exterior.getFrontDomain()); } } --- 717,737 ---- } ! for (Surface current : sides) { if (delta < 0) { ! current.setBackDomain(getBackDomain()); if (exterior != null && inside) { if (flip) { ! current.setFrontDomain(exterior.getFrontDomain()); } else { ! current.setFrontDomain(exterior.getBackDomain()); } } } else { ! current.setFrontDomain(getFrontDomain()); if (exterior != null && inside) { if (flip) { ! current.setBackDomain(exterior.getBackDomain()); } else { ! current.setBackDomain(exterior.getFrontDomain()); } } *************** *** 788,795 **** */ public Surface extrusionOnto(Plane p, double distance, Collection<Surface> sides) { - if (p == null) { - log.info("p were null for " + this); - return null; - } Vertex normal = normal(); List vertices = getVertices(); --- 784,787 ---- *************** *** 930,934 **** * @param isRootExtrusion is root extrusion * @param delta the length of extrusion in meters ! * @param sides Will contain the sides that are created * @param e2e a edge to new extruded parallel edge map * @param v2e a vertex to orthogonal edge map --- 922,926 ---- * @param isRootExtrusion is root extrusion * @param delta the length of extrusion in meters ! * @param extrusion Will contain the sides that are created * @param e2e a edge to new extruded parallel edge map * @param v2e a vertex to orthogonal edge map *************** *** 938,942 **** */ public Surface extrudeControlled(double delta, ! boolean isRootExtrusion, Set<Surface> sides, Map<Edge, Edge> e2e, Map<Vertex, Edge> v2e, Map<Edge, Surface> e2s, Map<Vertex, Direction> v2dir) { Vertex normal = normal(); --- 930,934 ---- */ public Surface extrudeControlled(double delta, ! boolean isRootExtrusion, Set<Surface> extrusion, Map<Edge, Edge> e2e, Map<Vertex, Edge> v2e, Map<Edge, Surface> e2s, Map<Vertex, Direction> v2dir) { Vertex normal = normal(); *************** *** 964,968 **** for (Surface hole : getHoles()) { ! sides.add(hole.extrudeControlled(delta, false, sides, e2e, v2e, e2s, v2dir)); } --- 956,960 ---- for (Surface hole : getHoles()) { ! hole.extrudeControlled(delta, false, extrusion, e2e, v2e, e2s, v2dir); } *************** *** 1128,1132 **** facemap[i] = new Surface(newEdges); e2s.put(b, facemap[i]); ! sides.add(facemap[i]); } } --- 1120,1124 ---- facemap[i] = new Surface(newEdges); e2s.put(b, facemap[i]); ! extrusion.add(facemap[i]); } } *************** *** 1139,1148 **** } top = new Surface(newEdges); ! sides.add(top); } else { top = this; } if (AUTOMATIC) { ! assignSpaceForExtrusion(delta, n, facemap, top); } return top; --- 1131,1146 ---- } top = new Surface(newEdges); ! extrusion.add(top); } else { top = this; } if (AUTOMATIC) { ! Collection<Surface> sides = new LinkedList(); ! for (int i = 0; i < n; i++) { ! if (facemap[i] != null) { ! sides.add(facemap[i]); ! } ! } ! assignSpaceForExtrusion(delta, sides, top); } return top; |
From: Michael L. <he...@us...> - 2007-10-09 14:02:20
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27805/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Some refactoring Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.243 retrieving revision 1.244 diff -C2 -d -r1.243 -r1.244 *** View.java 9 Oct 2007 11:58:08 -0000 1.243 --- View.java 9 Oct 2007 14:02:10 -0000 1.244 *************** *** 83,87 **** private static final boolean DISP = false; ! private static final boolean UNIFIED_DISPLAY = true; /** OBJECTS flag */ --- 83,87 ---- private static final boolean DISP = false; ! private static final boolean UNIFIED_DISPLAY = false; /** OBJECTS flag */ |
From: Michael L. <he...@us...> - 2007-10-09 12:44:07
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24696/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: Removed some extrude operation Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.190 retrieving revision 1.191 diff -C2 -d -r1.190 -r1.191 *** Surface.java 9 Oct 2007 11:58:12 -0000 1.190 --- Surface.java 9 Oct 2007 12:44:10 -0000 1.191 *************** *** 750,873 **** /** ! * Extrude this surface ! * @param delta How much to extrude along the normal in meters ! * @param sides Will contain the sides that are created ! * @return The top in the extruded surface ! */ ! public Surface extrude(double delta, Set sides) { ! Map v2dir = new HashMap(); ! Surface top = extrude(delta, sides, new HashMap(), new HashMap(), ! new HashMap(), v2dir); ! Collection c = v2dir.values(); ! Iterator iter = c.iterator(); ! while (iter.hasNext()) { ! Object o = iter.next(); ! if (o instanceof Direction) { ! Direction d = (Direction)o; ! Vertex dir = d.getDirection(); ! Vertex v = dir.copy(); ! v.scale(delta); ! d.getVertex().move(v.getX(), v.getY(), v.getZ()); ! } ! } ! return top; ! } ! ! /** ! * Make the new vertices, edges and surfaces for extrusion ! * @param delta the length of extrusion in meters ! * @param sides Will contain the sides that are created ! * @param e2e a edge to new extruded parallel edge map ! * @param v2e a vertex to orthogonal edge map ! * @param e2s a edge to extruded surface map ! * @param v2dir a vertex to direction map ! * @return The top in the extruded surface */ ! public Surface extrude(double delta, Set sides, Map e2e, Map v2e, Map e2s, Map v2dir) { ! Vertex normal = normal(); ! ! List<Vertex> vertices = getVertices(); ! ! List<Edge> edges = getEdges(); ! ! int n = vertices.size(); ! ! Vertex[] v = new Vertex[n]; ! Edge[] e = new Edge[n]; ! ! ! Vertex[] vmap = new Vertex[n]; ! Edge[] topmap = new Edge[n]; ! Edge[] sidemap = new Edge[n]; ! Surface[] facemap = new Surface[n]; ! ! Surface top = null; ! ! vertices.toArray(v); ! edges.toArray(e); ! ! for (int i = 0; i < n; i++) { ! if (v2dir.containsKey(v[i])) { ! Direction d = (Direction)v2dir.get(v[i]); ! vmap[i] = d.getVertex(); ! d.alterDirection(normal); ! } else { ! vmap[i] = v[i].copy(); ! v2dir.put(v[i], new Direction(vmap[i], normal)); ! getOwner().add(vmap[i]); ! } ! } ! ! for (int i = 0; i < n; i++) { ! if (e2e.containsKey(e[i])) { ! topmap[i] = (Edge)e2e.get(e[i]); ! } else { ! topmap[i] = new Edge(vmap[i], vmap[(i + 1) % n]); ! e2e.put(e[i], topmap[i]); ! getOwner().add(topmap[i]); ! } ! } ! ! for (int i = 0; i < n; i++) { ! if (v2e.containsKey(v[i])) { ! sidemap[i] = (Edge)v2e.get(v[i]); ! } else { ! sidemap[i] = new Edge(v[i], vmap[i]); ! v2e.put(v[i], sidemap[i]); ! getOwner().add(sidemap[i]); ! } ! } ! ! for (int i = 0; i < n; i++) { ! if (e2s.containsKey(e[i])) { ! facemap[i] = (Surface)e2s.get(e[i]); ! } else { ! Edge b = e[i]; ! Edge r = sidemap[i]; ! Edge l = sidemap[(i + 1) % n]; ! Edge t = topmap[i]; ! List newEdges = new LinkedList(); ! newEdges.add(r); ! newEdges.add(t); ! newEdges.add(l); ! newEdges.add(b); ! facemap[i] = new Surface(newEdges); ! e2s.put(b, facemap[i]); ! getOwner().add(facemap[i]); ! } ! sides.add(facemap[i]); ! } ! ! { ! List newEdges = new LinkedList(); ! for (int i = 0; i < n; i++) { ! newEdges.add(topmap[n - i - 1]); } - top = new Surface(newEdges); - getOwner().add(top); } - - assignSpaceForExtrusion(delta, n, facemap, top); - return top; } --- 750,781 ---- /** ! * Extrude and add to space ! * @param delta Distance ! * @param sides Collection of created sides ! * @return top */ ! public Surface extrude(double delta, Set<Surface> sides) { ! Space owner = getOwner(); ! Surface top = extrusion(delta, sides); ! Collection<Surface> creation = new LinkedList(sides); ! creation.add(top); ! if (owner != null) { ! for (Surface side : creation) { ! for (Edge edge : side.getEdges()) { ! if (edge.from.getOwner() == null) { ! owner.add(edge.from); ! } ! if (edge.to.getOwner() == null) { ! owner.add(edge.to); ! } ! if (edge.getOwner() == null) { ! owner.add(edge); ! } ! } ! if (side.getOwner() == null) { ! owner.add(side); ! } } } return top; } |
From: Michael L. <he...@us...> - 2007-10-09 12:03:26
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6164/src/net/sourceforge/bprocessor/gl/tool Removed Files: MultiExtrudeTool.java Log Message: Removed multiextrude tool --- MultiExtrudeTool.java DELETED --- |
From: Michael L. <he...@us...> - 2007-10-09 11:58:12
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3866/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: Removed some comment Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.189 retrieving revision 1.190 diff -C2 -d -r1.189 -r1.190 *** Surface.java 9 Oct 2007 09:15:02 -0000 1.189 --- Surface.java 9 Oct 2007 11:58:12 -0000 1.190 *************** *** 1238,1290 **** assignSpaceForExtrusion(delta, n, facemap, top); } - /* - // FIXME should return the sides instead of assigning - // spaces here. - boolean flip = false; - - if (exterior != null) { - Vertex n0 = normal(); - Vertex n1 = exterior.normal(); - Vertex o = n0.add(n1); - if (o.isZero()) { - flip = true; - } - } - - if (!makeNewTop) { - // We have to assign the other way arround - delta = -delta; - } - for (int i = 0; i < n; i++) { - if (facemap[i] != null) { - if (delta < 0) { - facemap[i].setBackDomain(getBackDomain()); - if (exterior != null) { - if (flip) { - facemap[i].setFrontDomain(exterior.getFrontDomain()); - } else { - facemap[i].setFrontDomain(exterior.getBackDomain()); - } - } - } else { - facemap[i].setFrontDomain(getFrontDomain()); - if (exterior != null) { - if (flip) { - facemap[i].setBackDomain(exterior.getBackDomain()); - } else { - facemap[i].setBackDomain(exterior.getFrontDomain()); - } - } - } - } - } - if (makeNewTop) { - if (delta < 0) { - top.setBackDomain(getBackDomain()); - } else { - top.setFrontDomain(getFrontDomain()); - } - }*/ - return top; } --- 1238,1241 ---- |
From: Michael L. <he...@us...> - 2007-10-09 11:58:07
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3835/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Removed some comment Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.242 retrieving revision 1.243 diff -C2 -d -r1.242 -r1.243 *** View.java 3 Oct 2007 11:18:56 -0000 1.242 --- View.java 9 Oct 2007 11:58:08 -0000 1.243 *************** *** 83,87 **** private static final boolean DISP = false; ! private static final boolean UNIFIED_DISPLAY = false; /** OBJECTS flag */ --- 83,87 ---- private static final boolean DISP = false; ! private static final boolean UNIFIED_DISPLAY = true; /** OBJECTS flag */ |
From: Michael L. <he...@us...> - 2007-10-09 09:15:07
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31623/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: Extrude assigns spaces Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.188 retrieving revision 1.189 diff -C2 -d -r1.188 -r1.189 *** Surface.java 5 Oct 2007 09:15:54 -0000 1.188 --- Surface.java 9 Oct 2007 09:15:02 -0000 1.189 *************** *** 35,39 **** */ public class Surface extends Geometric implements Parametric { ! private static final boolean AUTOMATIC = false; private static Logger log = Logger.getLogger(Surface.class); --- 35,39 ---- */ public class Surface extends Geometric implements Parametric { ! private static final boolean AUTOMATIC = true; private static Logger log = Logger.getLogger(Surface.class); |
From: Michael L. <he...@us...> - 2007-10-08 13:23:42
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14252/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: void experiment Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.178 retrieving revision 1.179 diff -C2 -d -r1.178 -r1.179 *** Space.java 28 Sep 2007 14:06:45 -0000 1.178 --- Space.java 8 Oct 2007 13:23:43 -0000 1.179 *************** *** 494,499 **** constructors.clear(); nextConstructorId = 1; ! empty = new Space("Void", FUNCTIONAL, this.level + 1, false); ! this.add(empty); } } --- 494,499 ---- constructors.clear(); nextConstructorId = 1; ! empty.clear(); ! add(empty); } } |
From: Michael L. <he...@us...> - 2007-10-08 13:09:27
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18514/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: refactored drawing Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Display.java 3 Oct 2007 11:18:56 -0000 1.20 --- Display.java 8 Oct 2007 12:11:54 -0000 1.21 *************** *** 32,35 **** --- 32,36 ---- import net.sourceforge.bprocessor.model.Geometric; import net.sourceforge.bprocessor.model.Line; + import net.sourceforge.bprocessor.model.Net; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selection; *************** *** 241,244 **** --- 242,276 ---- } + + /** + * Drawing methods. + */ + + private static void draw(Vertex vertex) { + gl.glBegin(GL.GL_POINTS); + gl.glVertex3d(vertex.getX(), vertex.getY(), vertex.getZ()); + gl.glEnd(); + } + private static void paint(Vertex vertex, float[] color, float size) { + gl.glColor3fv(color, 0); + gl.glPointSize(size); + draw(vertex); + } + private static void paintVertices(Collection<Vertex> vertices, float[] color, float size) { + gl.glColor3fv(color, 0); + gl.glPointSize(size); + for (Vertex current : vertices) { + draw(current); + } + } + private static void selectVertices(Collection<Vertex> vertices) { + for (Vertex current : vertices) { + push(current); + draw(current); + pop(); + } + } + + private static void selectSurfaces(Collection<Surface> surfaces) { for (Surface current : surfaces) { *************** *** 357,384 **** } - private static void drawVertices(Collection<Vertex> vertices) { - gl.glColor3fv(black, 0); - gl.glPointSize(9.0f); - for (Vertex current : vertices) { - if (current != target) { - draw(current); - } - } - } - private static void selectVertices(Collection<Vertex> vertices) { - gl.glPointSize(9.0f); - for (Vertex current : vertices) { - push(current); - draw(current); - pop(); - } - } ! private static void draw(Vertex vertex) { ! gl.glBegin(GL.GL_POINTS); ! gl.glVertex3d(vertex.getX(), vertex.getY(), vertex.getZ()); ! gl.glEnd(); ! } private static void paintConstructors(Collection<Constructor> constructors) { --- 389,396 ---- } ! ! private static void paintConstructors(Collection<Constructor> constructors) { *************** *** 610,614 **** { ! if (selecting()) { Set<Vertex> visible = new HashSet(); for (Edge current : edges) { --- 622,626 ---- { ! if (selecting() || (space instanceof Net && space == project.getActiveSpace())) { Set<Vertex> visible = new HashSet(); for (Edge current : edges) { *************** *** 623,627 **** } ! // FIXME: The set of lonely vertices should be cached. Set<Vertex> mark = new HashSet(); for (Edge current : space.getEdges()) { --- 635,639 ---- } ! //FIXME: The set of lonely vertices should be cached. Set<Vertex> mark = new HashSet(); for (Edge current : space.getEdges()) { *************** *** 670,674 **** selectVertices(vertices); } else { ! drawVertices(vertices); } --- 682,692 ---- selectVertices(vertices); } else { ! float[] color; ! if (space instanceof Net) { ! color = middleblue; ! } else { ! color = black; ! } ! paintVertices(vertices, color, 9.0f); } *************** *** 711,721 **** if (current instanceof Vertex) { if (current.getOwner() != null) { ! gl.glColor3fv(redish, 0); ! gl.glPointSize(9.0f); } else { ! gl.glColor3fv(blueish, 0); ! gl.glPointSize(6.0f); } - draw((Vertex) current); } } --- 729,736 ---- if (current instanceof Vertex) { if (current.getOwner() != null) { ! paint((Vertex) current, redish, 9.0f); } else { ! paint((Vertex) current, blueish, 6.0f); } } } *************** *** 789,793 **** selectVertices(vertices); } else { ! drawVertices(vertices); } --- 804,808 ---- selectVertices(vertices); } else { ! paintVertices(vertices, black, 9.0f); } |
From: Michael L. <he...@us...> - 2007-10-08 12:57:41
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3965/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: refactored edge drawing Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Display.java 8 Oct 2007 12:11:54 -0000 1.21 --- Display.java 8 Oct 2007 12:57:36 -0000 1.22 *************** *** 272,275 **** --- 272,323 ---- } + private static void draw(Edge edge) { + Vertex to = edge.getTo(); + Vertex from = edge.getFrom(); + gl.glBegin(GL.GL_LINE_STRIP); + gl.glVertex3d(to.getX(), to.getY(), to.getZ()); + gl.glVertex3d(from.getX(), from.getY(), from.getZ()); + gl.glEnd(); + } + private static void paint(Edge edge, float[] color, float size) { + gl.glColor3fv(color, 0); + gl.glLineWidth(size); + draw(edge); + } + private static void paintEdges(Collection<Edge> edges, float[] color, float size) { + gl.glColor3fv(color, 0); + gl.glLineWidth(size); + for (Edge current : edges) { + draw(current); + } + } + private static void paintStippled(Collection<Edge> edges, float[] color, float size) { + if (!edges.isEmpty()) { + gl.glEnable(GL.GL_LINE_STIPPLE); + paintEdges(edges, color, size); + gl.glDisable(GL.GL_LINE_STIPPLE); + } + } + + private static void selectEdges(Collection<Edge> edges) { + for (Edge current : edges) { + push(current); + draw(current); + pop(); + } + } + + private static void split(Collection<Edge> edges, + Collection<Edge> normal, + Collection<Edge> stippled) { + for (Edge current : edges) { + if (current.getStrippled()) { + stippled.add(current); + } else { + normal.add(current); + } + } + } + private static void selectSurfaces(Collection<Surface> surfaces) { *************** *** 348,397 **** } - private static void drawEdges(Collection<Edge> edges, boolean active) { - Collection<Edge> stippled = new LinkedList(); - if (active) { - gl.glColor3fv(black, 0); - } else { - gl.glColor3fv(grey, 0); - } - gl.glLineWidth(1.0f); - for (Edge current : edges) { - if (current.getStrippled()) { - stippled.add(current); - } else { - draw(current); - } - } - if (!stippled.isEmpty()) { - gl.glColor3fv(middleblue, 0); - gl.glEnable(GL.GL_LINE_STIPPLE); - for (Edge current : stippled) { - draw(current); - } - gl.glDisable(GL.GL_LINE_STIPPLE); - } - } - private static void selectEdges(Collection<Edge> edges) { - for (Edge current : edges) { - push(current); - draw(current); - pop(); - } - } - - private static void draw(Edge edge) { - Vertex to = edge.getTo(); - Vertex from = edge.getFrom(); - gl.glBegin(GL.GL_LINE_STRIP); - gl.glVertex3d(to.getX(), to.getY(), to.getZ()); - gl.glVertex3d(from.getX(), from.getY(), from.getZ()); - gl.glEnd(); - } - - - - - - private static void paintConstructors(Collection<Constructor> constructors) { for (Constructor current : constructors) { --- 396,399 ---- *************** *** 674,678 **** gl.glDepthMask(true); } ! drawEdges(edges, active); } --- 676,698 ---- gl.glDepthMask(true); } ! Collection<Edge> stippled = new LinkedList(); ! Collection<Edge> normal = new LinkedList(); ! split(edges, normal, stippled); ! ! float size; ! float[] color; ! ! if (space instanceof Net) { ! size = 2.0f; ! } else { ! size = 1.0f; ! } ! if (active) { ! color = black; ! } else { ! color = grey; ! } ! paintEdges(normal, color, size); ! paintStippled(stippled, middleblue, size); } *************** *** 793,797 **** selectEdges(edges); } else { ! drawEdges(edges, true); } if (selecting()) { --- 813,821 ---- selectEdges(edges); } else { ! Collection<Edge> stippled = new LinkedList(); ! Collection<Edge> normal = new LinkedList(); ! split(edges, normal, stippled); ! paintEdges(normal, black, 1.0f); ! paintStippled(stippled, middleblue, 1.0f); } if (selecting()) { |
From: rimestad <rim...@us...> - 2007-10-08 11:56:32
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12640/src/net/sourceforge/bprocessor/gl/tool Modified Files: ControlledExtrudeTool.java Log Message: Fixed a snap problem to surfaces Index: ControlledExtrudeTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ControlledExtrudeTool.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ControlledExtrudeTool.java 5 Oct 2007 09:21:06 -0000 1.7 --- ControlledExtrudeTool.java 8 Oct 2007 11:56:27 -0000 1.8 *************** *** 81,85 **** glv.getView().makeTarget(null); ArrayList<Surface> starter = new ArrayList<Surface>(); ! starter.add(pressedSurface); findTarget(e, starter); double x = e.getX(); --- 81,87 ---- glv.getView().makeTarget(null); ArrayList<Surface> starter = new ArrayList<Surface>(); ! if (topSurface != pressedSurface) { ! starter.add(pressedSurface); ! } findTarget(e, starter); double x = e.getX(); |