Revision: 33964
          http://brlcad.svn.sourceforge.net/brlcad/?rev=33964&view=rev
Author:   bob1961
Date:     2009-03-06 17:57:07 +0000 (Fri, 06 Mar 2009)

Log Message:
-----------
This fixes the "Pick Edit-Primitive" mode in MGED.

Modified Paths:
--------------
    brlcad/trunk/src/mged/setup.c
    brlcad/trunk/src/tclscripts/mged/ray.tcl

Modified: brlcad/trunk/src/mged/setup.c
===================================================================
--- brlcad/trunk/src/mged/setup.c       2009-03-06 17:52:49 UTC (rev 33963)
+++ brlcad/trunk/src/mged/setup.c       2009-03-06 17:57:07 UTC (rev 33964)
@@ -188,6 +188,7 @@
     {"lookat", cmd_ged_view_wrapper, ged_lookat},
     {"ls", cmd_ged_plain_wrapper, ged_ls},
     {"M", f_mouse, GED_FUNC_PTR_NULL},
+    {"m2v_point", cmd_ged_plain_wrapper, ged_m2v_point},
     {"make", f_make, GED_FUNC_PTR_NULL},
     {"make_bb", cmd_ged_plain_wrapper, ged_make_bb},
     {"make_name", cmd_ged_plain_wrapper, ged_make_name},
@@ -331,6 +332,7 @@
     {"tree", cmd_ged_plain_wrapper, ged_tree},
     {"unhide", cmd_ged_plain_wrapper, ged_unhide},
     {"units", cmd_units, GED_FUNC_PTR_NULL},
+    {"v2m_point", cmd_ged_plain_wrapper, ged_v2m_point},
     {"vars", f_set, GED_FUNC_PTR_NULL},
     {"vdraw", cmd_ged_plain_wrapper, ged_vdraw},
     {"view", cmd_ged_view_wrapper, ged_view},

Modified: brlcad/trunk/src/tclscripts/mged/ray.tcl
===================================================================
--- brlcad/trunk/src/tclscripts/mged/ray.tcl    2009-03-06 17:52:49 UTC (rev 
33963)
+++ brlcad/trunk/src/tclscripts/mged/ray.tcl    2009-03-06 17:57:07 UTC (rev 
33964)
@@ -40,9 +40,9 @@
     ray no_bool 1
     set xx [expr $x / 2048.0]
     set yy [expr $y / 2048.0]
-    set target [view2model $xx $yy 0]
+    set target [v2m_point $xx $yy 0]
     if {$perspective_mode} {
-       set start [view2model 0 0 1]
+       set start [v2m_point 0 0 1]
     } elseif {!$zclip} {
        # calculate a view Z that's in front of all geometry
 
@@ -50,14 +50,14 @@
        set center_size [get_autoview]
 
        # extract view Z from center of geometry, then back the rest of the way 
out of the geometry
-       set Z [expr [lindex [eval model2view [lindex $center_size 1]] 2] + 
[expr [lindex $center_size 3] / [size]]]
+       set Z [expr [lindex [eval m2v_point [lindex $center_size 1]] 2] + [expr 
[lindex $center_size 3] / [size]]]
        if {$Z < 1} {
            set Z 1
        }
 
-       set start [view2model $xx $yy $Z]
+       set start [v2m_point $xx $yy $Z]
     } else {
-       set start [view2model $xx $yy 1]
+       set start [v2m_point $xx $yy 1]
     }
 
     return [ray shootray $start at $target]


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
BRL-CAD Source Commits mailing list
brlcad-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to