Hi all,
I can run the example properly, but I'm having an hard time with visual object.
Consider the following code:
from enthought.mayavi import mlab
from enthought.tvtk.tools import visual
# Create a figure
f = mlab.figure(size=(500,500))
# Tell visual to use this as the viewer.
visual.set_viewer(f)
cyl = visual.Cylinder(pos=(0.,0.,0.,), axis=(100.,0.,0.),
radius=5, length=100.0)
cyl2 = visual.Cylinder(pos=(100.,0.,0,),
axis=(92.1060943604,38.9418334961,0),
radius=1.5, length=100.0)
cyl3 = visual.Cylinder(pos=(100.0,0.,0.),
axis=(92.1060943604,-38.9418334961,0),
radius=1.5, length=100.0)
cyls = [cyl, cyl2, cyl3]
def picker_callback(picker_obj):
""" Picker callback: this get called when on pick events.
"""
picked = picker_obj.actor
print picked
if picked is not None:
print "Picked something"
picker = f.on_mouse_pick(picker_callback)
The picked object is an actor object, not a visual as it should be (no
access to color attribute and so on.)
More over the picking doesn't work properly, because I guess the
volume is not considered. (It works only if you pick on top of the
cylinder)
When working with the visual object the picking routine should be different?
Cheers,
Michele.
On Thu, Jan 21, 2010 at 12:48 PM, Gael Varoquaux
<[email protected]> wrote:
> On Thu, Jan 21, 2010 at 12:47:05PM +0000, Michele Mattioni wrote:
>> from configobj import ConfigObj
>> ImportError: No module named configobj
>
>> SVN Revision: 25136
>
> You need to install configobj. I am surprised that this problem didn't
> pop up earlier.
>
> Gaël
>
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users