Author: paperwing
Date: 2012-01-17 15:21:12 -0800 (Tue, 17 Jan 2012)
New Revision: 28034
Added:
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/shapes/ScalableShapeDrawer.java
Removed:
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/shapes/ShapeProducer.java
Modified:
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/RenderArcEdgesProcedure.java
Log:
circular arc edge drawing algorithm completed, shape drawing class for drawing
standard-sized 3d shapes started
Modified:
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/RenderArcEdgesProcedure.java
===================================================================
---
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/RenderArcEdgesProcedure.java
2012-01-17 23:02:33 UTC (rev 28033)
+++
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/RenderArcEdgesProcedure.java
2012-01-17 23:21:12 UTC (rev 28034)
@@ -192,12 +192,12 @@
// Level 1 has 2^2 - 1^1 = 3 edges,
level 2 has 3^3 - 2^2 = 5, level 3 has 7
int edgeLevel = (int)
(Math.sqrt((double) container.edgeNumber));
- int maxLevel = (int)
(Math.sqrt((double) container.totalCoincidentEdges / 2));
+ int maxLevel = (int)
(Math.sqrt((double) container.totalCoincidentEdges));
int edgesInLevel = edgeLevel * 2 + 1;
// Smaller edge level -> greater radius
- curvedEdgeRadius = start.distance(end)
* (1.6 + (double) 1 / edgeLevel);
+ curvedEdgeRadius = start.distance(end)
* (0.5 + (double) 1.5 / Math.pow(edgeLevel, 2));
// The outmost level is usually not
completed
if (edgeLevel == maxLevel) {
Copied:
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/shapes/ScalableShapeDrawer.java
(from rev 28031,
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/shapes/ShapeProducer.java)
===================================================================
---
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/shapes/ScalableShapeDrawer.java
(rev 0)
+++
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/shapes/ScalableShapeDrawer.java
2012-01-17 23:21:12 UTC (rev 28034)
@@ -0,0 +1,45 @@
+package org.cytoscape.paperwing.internal.rendering.shapes;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.media.opengl.GL2;
+import javax.media.opengl.glu.GLU;
+import javax.media.opengl.glu.GLUquadric;
+
+public class ScalableShapeDrawer {
+ public static enum ShapeType {
+ SHAPE_CUBIC,
+ SHAPE_TETRAHEDRAL
+ }
+
+ private Map<ShapeType, Integer> shapeLists;
+
+ public ScalableShapeDrawer() {
+ shapeLists = new HashMap<ShapeType, Integer>(12);
+ }
+
+ public void initialize(GL2 gl) {
+ int shapeListIndex = gl.glGenLists(1);
+
+ GLU glu = GLU.createGLU(gl);
+
+ GLUquadric quadric = glu.gluNewQuadric();
+ glu.gluQuadricDrawStyle(quadric, GLU.GLU_FILL);
+ glu.gluQuadricNormals(quadric, GLU.GLU_SMOOTH);
+
+ // Draw Shape
+ // ---------
+
+ gl.glNewList(shapeListIndex, GL2.GL_COMPILE);
+
+
+ gl.glEndList();
+ }
+
+
+
+ public void drawShape(ShapeType shapeType) {
+
+ }
+}
Property changes on:
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/shapes/ScalableShapeDrawer.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted:
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/shapes/ShapeProducer.java
===================================================================
---
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/shapes/ShapeProducer.java
2012-01-17 23:02:33 UTC (rev 28033)
+++
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/shapes/ShapeProducer.java
2012-01-17 23:21:12 UTC (rev 28034)
@@ -1,9 +0,0 @@
-package org.cytoscape.paperwing.internal.rendering.shapes;
-
-public class ShapeProducer {
- public static enum ShapeType {
- SHAPE_CUBIC,
- SHAPE_TETRAHEDRAL};
-
-
-}
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.