Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18389
Modified Files:
AbstractView.java
Log Message:
Added naming of edges
Index: AbstractView.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/AbstractView.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AbstractView.java 5 Aug 2005 11:06:11 -0000 1.3
--- AbstractView.java 15 Aug 2005 12:55:52 -0000 1.4
***************
*** 97,101 ****
/** The GL */
protected GL gl = null;
!
/** The zoomFactor in the parent view */
protected double zoomFactor = 1.0;
--- 97,107 ----
/** The GL */
protected GL gl = null;
!
! /** The GLU */
! protected GLU glu = null;
!
! /** The GLDrawable */
! protected GLDrawable drawable = null;
!
/** The zoomFactor in the parent view */
protected double zoomFactor = 1.0;
***************
*** 121,129 ****
}
gl = gld.getGL();
!
this.width = gld.getSize().getWidth();
this.height = gld.getSize().getHeight();
this.aspect = this.width / this.height;
gl.glClearColor(0.7f, 0.7f, 0.7f, 0.0f);
--- 127,138 ----
}
gl = gld.getGL();
! glu = gld.getGLU();
! gl.glEnable(GL.GL_CULL_FACE);
this.width = gld.getSize().getWidth();
this.height = gld.getSize().getHeight();
this.aspect = this.width / this.height;
+
+ drawable = gld;
gl.glClearColor(0.7f, 0.7f, 0.7f, 0.0f);
***************
*** 137,146 ****
public void display(GLDrawable gld) {
gl = gld.getGL();
!
gl.glClear(GL.GL_COLOR_BUFFER_BIT);
gl.glViewport(0, 0, (int)width, (int)height);
camera(gld);
!
grid();
coords();
--- 146,157 ----
public void display(GLDrawable gld) {
gl = gld.getGL();
! glu = gld.getGLU();
! drawable = gld;
!
gl.glClear(GL.GL_COLOR_BUFFER_BIT);
gl.glViewport(0, 0, (int)width, (int)height);
camera(gld);
!
grid();
coords();
***************
*** 184,195 ****
protected void drawAll(GLDrawable gld) {
Set edges = EdgeFacade.getInstance().findAll();
! GL gl = gld.getGL();
! GLU glu = gld.getGLU();
!
Iterator it = edges.iterator();
gl.glColor3dv(STD_LINE_COLOR);
while (it.hasNext()) {
Edge e = (Edge)it.next();
! drawEdge(e);
}
--- 195,207 ----
protected void drawAll(GLDrawable gld) {
Set edges = EdgeFacade.getInstance().findAll();
! gl = gld.getGL();
! glu = gld.getGLU();
!
! gl.glInitNames();
Iterator it = edges.iterator();
gl.glColor3dv(STD_LINE_COLOR);
while (it.hasNext()) {
Edge e = (Edge)it.next();
! drawEdge(e);
}
***************
*** 294,297 ****
--- 306,311 ----
Vertex to = e.getTo();
Vertex from = e.getFrom();
+ int name = e.getId().intValue();
+ gl.glPushName(name);
if (to != null && from != null) {
gl.glBegin(GL.GL_LINES);
***************
*** 300,303 ****
--- 314,318 ----
gl.glEnd();
}
+ gl.glPopName();
}
***************
*** 456,459 ****
--- 471,484 ----
/**
+ * Gets id of the object under a point. For use in 3D selection.
+ * @param x the x coordinate of the point
+ * @param y the y coordinate of the point
+ * @return a Long id of the object under the point, null if no object is there
+ */
+ public Long getObjectAtPoint(double x, double y) {
+ return null;
+ }
+
+ /**
* The camera init function
* @param gld The GLDrawable object
|