[vtkusers] InteractionProp in Java

Ambar C ambarc at gmail.com
Sat Nov 13 13:14:44 EST 2010


Hi Jim,

Could you be more specific? What would I need to do to be able to grab
the mouse driven value changes in orientation and position in Java? I
don't understand how I'd be able to replace the interaction prop's
functionality. Thanks for the help.

Best,
Ambar

On Tue, Nov 9, 2010 at 4:04 AM, Jim Peterson <jimcp at cox.net> wrote:
> Ambar C wrote:
>>
>> Hello,
>>
>> I'm working on modifying an vtkInteractorStyleTrackballActor to have
>> my own custom class, and am trying to access it's InteractionProp
>> member but it doesn't seem to be coming through. The equivalent code
>> works in C++, but something along the lines of
>>
>> public modifiedClass extends vtkInteractorStyleTrackballActor
>> {
>>     .....
>>     this.InteractionProp. //Doesn't recognize the member.
>>
>> }
>>
>>
>
> Ambar,
> I think this is not a valid construct for classes that are used for JNI
> interfaces. Yes, Java compiles it, but no, there is no runtime inheritance
> to the c++ classes.  The pure java way to modify interaction behavior is to
> use the interaction observers. If you want to use your C++ code you would
> need to add it to the vtk source tree and rebuild both vtk and the java
> wrappers, The new class can be wrapped and accessible to Java in that way.
>
> If you need to address this completely in Java, maybe it would be better to
> identify your desired modification to the interaction rather than the
> solution first.
>
> Hope that helps,
> Jim
>



More information about the vtkusers mailing list