[vtkusers] InteractionProp in Java

Jim Peterson jimcp at cox.net
Tue Nov 9 07:04:58 EST 2010


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