It works!!! Thanks Aaron Cohen and Mark Rathwell. The code final that works 100% of the example cone6 of vtk in clojure is this:
(ns example (:import (javax.swing JFrame JPanel SwingUtilities))) (clojure.lang.RT/loadLibrary "vtkCommonJava") (clojure.lang.RT/loadLibrary "vtkWidgetsJava") (def boxWidget (vtk.vtkBoxWidget.)) (def myCallback (fn [] (println "Invoked!") (let [t (vtk.vtkTransform.)] (doto boxWidget (.GetTransform t) (.. GetProp3D (SetUserTransform t)) )))) (defn main [] (let [cone (vtk.vtkConeSource.) coneMapper (vtk.vtkPolyDataMapper.) coneActor (vtk.vtkActor.) ren (vtk.vtkRenderer.) renWin (vtk.vtkRenderWindow.) iren (vtk.vtkRenderWindowInteractor.) style (vtk.vtkInteractorStyleTrackballCamera.) t (vtk.vtkTransform.)] (doto cone (.SetHeight 3.0) (.SetRadius 1.0) (.SetResolution 10)) (doto coneMapper (.SetInput (.GetOutput cone))) (doto coneActor (.SetMapper coneMapper)) (doto ren (.GradientBackgroundOn) (.SetBackground 0.5 0.6 0.8) (.AddActor coneActor) (.ResetCamera)) (doto renWin (.AddRenderer ren) (.SetSize 300 300)) (doto iren (.SetRenderWindow renWin) (.SetInteractorStyle style)) (doto boxWidget (.SetInteractor iren) (.SetPlaceFactor 1.25) (.SetProp3D coneActor) (.PlaceWidget) (.AddObserver "InteractionEvent" myCallback "run") (.On)) (doto iren (.Initialize) (.Start)))) (example/main) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en