Author: paperwing
Date: 2012-01-31 07:23:54 -0800 (Tue, 31 Jan 2012)
New Revision: 28163

Modified:
   
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/input/NetworkChangeInputHandler.java
Log:
Adjusted node creation algorithm to place nodes at a fixed distance relative to 
the camera rather than use the distance between the camera and its target point 
(center of rotation)

Modified: 
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/input/NetworkChangeInputHandler.java
===================================================================
--- 
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/input/NetworkChangeInputHandler.java
  2012-01-31 00:52:07 UTC (rev 28162)
+++ 
csplugins/trunk/toronto/yuedong/paperwing-impl/src/main/java/org/cytoscape/paperwing/internal/input/NetworkChangeInputHandler.java
  2012-01-31 15:23:54 UTC (rev 28163)
@@ -17,6 +17,8 @@
 
 public class NetworkChangeInputHandler implements InputHandler {
        
+       private static final double NODE_PLACEMENT_DISTANCE = 2.3;
+       
        @Override
        public void processInput(KeyboardMonitor keys, MouseMonitor mouse,
                        GraphicsData graphicsData) {
@@ -40,7 +42,7 @@
                        // Project mouse coordinates into 3d space to determine 
where to put the node
                        Vector3 projection = GeometryToolkit.convertScreenTo3d(
                                        mouse.x(), mouse.y(), 
graphicsData.getScreenWidth(),
-                                       graphicsData.getScreenHeight(), 
camera.getDistance(), camera);
+                                       graphicsData.getScreenHeight(), 
NODE_PLACEMENT_DISTANCE, camera);
                        
                        System.out.println("Node created at: " + projection);
                        

-- 
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.

Reply via email to