Update of /cvsroot/bprocessor//gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16856/src/net/sourceforge/bprocessor/gl/tool
Modified Files:
ConstructorTool.java AbstractPencil.java
Log Message:
when hoovering over a coordinatesystem it is shows its xy plane... still need to implement intersection with it...
Index: ConstructorTool.java
===================================================================
RCS file: /cvsroot/bprocessor//gl/src/net/sourceforge/bprocessor/gl/tool/ConstructorTool.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** ConstructorTool.java 7 Dec 2007 12:48:31 -0000 1.18
--- ConstructorTool.java 30 Dec 2007 23:24:32 -0000 1.19
***************
*** 76,80 ****
Vertex k = i.cross(j);
CoordinateSystem cs = new CoordinateSystem(i, j, k, p1);
- cs.onlyPlane(true);
cs.normalize();
Project.getInstance().getActiveSpace().add(cs);
--- 76,79 ----
Index: AbstractPencil.java
===================================================================
RCS file: /cvsroot/bprocessor//gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v
retrieving revision 1.104
retrieving revision 1.105
diff -C2 -d -r1.104 -r1.105
*** AbstractPencil.java 20 Dec 2007 11:44:57 -0000 1.104
--- AbstractPencil.java 30 Dec 2007 23:24:32 -0000 1.105
***************
*** 129,132 ****
--- 129,134 ----
/** A highlight for the lockingedge */
private Edge lockHighlightEdge;
+
+ private CoordinateSystem hooverConstructor;
private static final boolean FALSE = false;
***************
*** 235,239 ****
(Intersection) editor.getView().getObjectAtPoint(e.getX(), e.getY(),
unwanted, View.INTERSECTIONS, work);
-
if (intersection != null) {
Container space = Project.getInstance().getActiveSpace();
--- 237,240 ----
***************
*** 474,478 ****
}
}
-
if (hooverEdge != null) {
Edge edge = hooverEdge;
--- 475,478 ----
***************
*** 593,596 ****
--- 593,615 ----
hooverEdge = (Edge) current.object();
}
+ if (current.object() instanceof Geometric) {
+ Geometric l = (Geometric)current.object();
+ Geometric g = l.parent();
+ if (g != null) {
+ Geometric p = g.parent();
+ if (p instanceof CoordinateSystem) {
+ CoordinateSystem cs = (CoordinateSystem)p;
+ if (cs.isEditable()) {
+ if (hooverConstructor != null) {
+ hooverConstructor.onlyPlane(false);
+ }
+ if (!cs.onlyPlane()) {
+ hooverConstructor = (CoordinateSystem)p;
+ hooverConstructor.onlyPlane(true);
+ }
+ }
+ }
+ }
+ }
switch (current.type()) {
***************
*** 798,801 ****
--- 817,824 ----
incident = null;
hooverEdge = null;
+ if (hooverConstructor != null) {
+ hooverConstructor.onlyPlane(false);
+ }
+ hooverConstructor = null;
lock = false;
lockingEdge = null;
|