Author: paperwing
Date: 2012-01-23 16:06:12 -0800 (Mon, 23 Jan 2012)
New Revision: 28079
Modified:
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/coordinator/BirdsEyeCoordinatorProcessor.java
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/coordinator/ViewingCoordinator.java
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/RenderNodesProcedure.java
Log:
in process of making the cube, sphere, and tetrahedron shapes available via
vizmapper, fixing window resize bug that causes viewing volume representation
on bird's eye view to distort when width:height ratio decreased to less than 1:1
Modified:
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/coordinator/BirdsEyeCoordinatorProcessor.java
===================================================================
---
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/coordinator/BirdsEyeCoordinatorProcessor.java
2012-01-23 23:48:17 UTC (rev 28078)
+++
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/coordinator/BirdsEyeCoordinatorProcessor.java
2012-01-24 00:06:12 UTC (rev 28079)
@@ -59,7 +59,7 @@
} else if (coordinator.isMainCameraMoved()) {
// Obtain data from coordinator
-
coordinatorData.setNearBoundsTo(coordinator.calculateBounds());
+
coordinatorData.setNearBoundsTo(coordinator.calculateNearBounds());
coordinatorData.setFarBoundsTo(coordinator.calculateBackBounds());
// Unset flag
@@ -70,7 +70,7 @@
if (coordinator.isSuggestRecalculateBounds()) {
// Obtain data from coordinator
-
coordinatorData.setNearBoundsTo(coordinator.calculateBounds());
+
coordinatorData.setNearBoundsTo(coordinator.calculateNearBounds());
coordinatorData.setFarBoundsTo(coordinator.calculateBackBounds());
// Unset flag
Modified:
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/coordinator/ViewingCoordinator.java
===================================================================
---
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/coordinator/ViewingCoordinator.java
2012-01-23 23:48:17 UTC (rev 28078)
+++
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/coordinator/ViewingCoordinator.java
2012-01-24 00:06:12 UTC (rev 28079)
@@ -117,7 +117,7 @@
}
// Returns null if main camera not initialized
- public Quadrilateral calculateBounds() {
+ public Quadrilateral calculateNearBounds() {
if (!initialMainCameraInitialized) {
return null;
} else {
Modified:
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/RenderNodesProcedure.java
===================================================================
---
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/RenderNodesProcedure.java
2012-01-23 23:48:17 UTC (rev 28078)
+++
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/rendering/RenderNodesProcedure.java
2012-01-24 00:06:12 UTC (rev 28079)
@@ -2,6 +2,7 @@
import java.awt.Color;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import javax.media.opengl.GL2;
@@ -19,6 +20,7 @@
import org.cytoscape.view.model.View;
import org.cytoscape.view.presentation.property.MinimalVisualLexicon;
import org.cytoscape.view.presentation.property.RichVisualLexicon;
+import org.cytoscape.view.presentation.property.values.NodeShape;
public class RenderNodesProcedure implements ReadOnlyGraphicsProcedure {
@@ -41,8 +43,8 @@
/** The stacks detail level to use for drawing spherical nodes */
private static int NODE_STACKS_DETAIL = 12;
- private int nodeListIndex;
-
+ private Map<NodeShape, ShapeType> cytoscapeShapeMap;
+
private ScalableShapeDrawer shapeDrawer;
public RenderNodesProcedure() {
@@ -52,24 +54,6 @@
@Override
public void initialize(GraphicsData graphicsData) {
GL2 gl = graphicsData.getGlContext();
-
- nodeListIndex = 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 Node
- // ---------
-
- gl.glNewList(nodeListIndex, GL2.GL_COMPILE);
- glu.gluSphere(quadric, SMALL_SPHERE_RADIUS, NODE_SLICES_DETAIL,
- NODE_STACKS_DETAIL);
- // glut.glutSolidSphere(SMALL_SPHERE_RADIUS, NODE_SLICES_DETAIL,
- // NODE_STACKS_DETAIL);
- gl.glEndList();
shapeDrawer.initialize(gl);
--
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.