Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3359
Modified Files:
AbstractPencil.java
Log Message:
added color to the xyz constructors, added a set of objects to exlude in findintersection
Index: AbstractPencil.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** AbstractPencil.java 29 Mar 2006 14:12:27 -0000 1.16
--- AbstractPencil.java 29 Mar 2006 18:37:24 -0000 1.17
***************
*** 27,30 ****
--- 27,32 ----
import net.sourceforge.bprocessor.model.Vertex;
+ import org.apache.log4j.Logger;
+
/**
* AbstractPencil
***************
*** 32,38 ****
--- 34,47 ----
*/
public abstract class AbstractPencil extends AbstractTool {
+
+ /** The logger */
+ private static Logger log = Logger.getLogger(AbstractPencil.class);
+
/** Feedback elements */
protected Collection elements = new HashSet();
+ /** Excluded elements */
+ protected Collection excluded = new HashSet();
+
/** Constructor elements */
protected Collection constructors = new HashSet();
***************
*** 77,82 ****
*/
protected Intersection findIntersection(MouseEvent e) {
Intersection intersection = (Intersection) glv.getView().getObjectAtPoint(e.getX(), e.getY(),
! elements, true, new Plane(0, 0, 1, 0));
return intersection;
}
--- 86,94 ----
*/
protected Intersection findIntersection(MouseEvent e) {
+ Collection unwanted = new HashSet();
+ unwanted.addAll(elements);
+ unwanted.addAll(excluded);
Intersection intersection = (Intersection) glv.getView().getObjectAtPoint(e.getX(), e.getY(),
! unwanted, true, new Plane(0, 0, 1, 0));
return intersection;
}
***************
*** 272,276 ****
}
}
!
/**
* Make target
--- 284,297 ----
}
}
!
! /**
! * Supply exluded elements
! * @param feed Collection of edges
! */
! protected void excluded(Collection feed) {
! excluded.clear();
! excluded.addAll(feed);
! }
!
/**
* Make target
***************
*** 348,351 ****
--- 369,375 ----
e2.setConstructor(true);
e3.setConstructor(true);
+ glv.getView().changeColor(e1, new float[] {0, 1, 0});
+ glv.getView().changeColor(e2, new float[] {1, 0, 0});
+ glv.getView().changeColor(e3, new float[] {0, 0, 1});
constructors.add(e1);
constructors.add(e2);
|