Login  Register

Re: JOGL 2 support for Ardor3D, JMonkeyEngine 3, jzy3d and NiftyGUI

Posted by Sven Gothel on Nov 04, 2012; 3:53pm
URL: https://forum.jogamp.org/JOGL-2-support-for-Ardor3D-JMonkeyEngine-3-jzy3d-and-NiftyGUI-tp1706747p4026761.html

On 11/04/2012 04:26 PM, Sven Gothel wrote:

> On 11/04/2012 12:45 PM, gouessej [via jogamp] wrote:
>> How can I make a distinction between an event coming from a touch screen and
>> an event coming from a real mouse? Does an event coming from the mouse always
>> have a pressure set to zero?
>
> That is a good question, right now I don't know.
>
> On Android we only have either or machines set-up right now
> and sadly I have non X11 machine avail w/ touch.
>
> At least I could add a 2nd mouse/pointer I guess to test multi pointers on X11 .. etc.
>
> Maybe it is a good idea to have something like 'enum PointerType getType(intindex)',
> if the NEWT driver can differentiate it. Don't know how at this point thought.
>
> IMHO best would be to have a real world use case w/ machine and see how that goes.
>
Correction, MouseEvent has:

    /**
     * @return the pointer id for the data at index.
     *  return -1 if index not available.
     */
    public int getPointerId(int index) { ...

If MouseEvent is constructed via the single pointer constructor,
i.e. no array of pointer [currently: X11, Windows, ..]
then the pointerID of index 0 is -1 - even though index 0 does
represent the single pointer count.

If MouseEvent is constructed via the multiple pointer constructor,
i.e. w/ array of pointers [currently: Android]
then the pointerID of each index [0..count-1] will be >= 0.

Integer pointerID's semantic is machine/OS dependent.

~Sven



signature.asc (907 bytes) Download Attachment