Code Monkey home page Code Monkey logo

mt4j's Introduction

-----------------------------------------------------------------
	   
	  **********************************
	  *   				   *
	  *   MT4j - Multitouch for Java   *
	  * 		  		   *
	  **********************************

MT4J - Multi-Touch for Java - is an open source java development platform, 
created for rapid developement of visually rich applications. 
MT4J is designed to support different kinds of input devices with a special 
focus on multi touch support. 

Copyright (C) 2008-2010  Christopher Ruff, Fraunhofer-Institute for Industrial Engineering 
-----------------------------------------------------------------

License:
--------------------
*********************
GPL - See the License.txt file.


System Requirements:
--------------------
*********************
- Java 1.5 or higher 
- OpenGL capable graphics card with proper drivers



DISCLAIMER OF WARRANTY:
-----------------------
************************

This Software is provided on an "AS IS" basis, without warranty of any kind, 
express or implied, including without limitation, any implied warranties of 
merchantability, fitness for a particular purpose and non-infringement of 
intellectual property of any third party. This Software has inherent 
limitations including design faults and programming bugs. The entire risk as 
to the quality and performance of the Software is borne by you, and it is
your responsibility to ensure that it does what you require it to do prior to
using it for any purpose (other than testing it), and prior to distributing
it in any fashion. Should the Software prove defective, you agree that you
alone assume the entire cost resulting in any way from such defect.

This disclaimer of warranty constitutes an essential and material term of
this agreement. If you do not or cannot accept this, or if it is
unenforceable in your jurisdiction, then you may not use the Software in any
manner.



NO LIABILITY
-------------

When you use the Software you acknowledge and accept that you do so at your 
sole risk. You agree that under no circumstances shall you have any claim 
against the Company or anyone associated directly or indirectly with the 
Company whether as employee, subcontractor, agent, representative,
consultant, licensee or otherwise ("Company Associates") for any loss,
damages, harm, injury, expense, work stoppage, loss of business information,
business interruption, computer failure or malfunction which may be suffered
by you or by any third party from any cause whatsoever, howsoever arising, in
connection with your use or distribution of the Software even where the
Company were aware, or ought to have been aware, of the potential of such
loss. Damages referred to above shall include direct, indirect, general,
special, incidental, punitive and/or consequential.

This disclaimer of liability constitutes an essential and material term of 
this agreement. If you do not or cannot accept this, or if it is
unenforceable in your jurisdiction, then you may not use the Software.

mt4j's People

Watchers

James Cloos avatar

mt4j's Issues

Invalid memory access when creating font

I use a single font throughout my complete project. Therefore I mostly use:

        IFont font = FontManager.getInstance().createFont(pApplet, "fonts/Trebuchet MS.ttf", 
                16,     //Font size
                new MTColor(255,255,255));  //Font color

However, at one place I wanted to use font-size 12. I copied over the code and 
changed 16 to 12. This resulted in a crash with the following console message:

Invalid memory access of location 0x0 rip=0x7fff88ed00b2

Using the latest SVN checkout of the MT4j project, the latest Java binary 
available to OSX and OSX 10.6.6

Original issue reported on code.google.com by [email protected] on 28 Feb 2011 at 8:38

MTSceneTexture: texture vertical flip bug

What steps will reproduce the problem?
1. If i have a MTSceneTexture object and set the Texture via setTexture
with a new GLTexture the  Texture is flipped horizontally(y-axis)
2. The same is in the opposite way: if i use a GLTexture from a
MTSceneTexture object via getTexture() i get a flipped image.



Original issue reported on code.google.com by [email protected] on 8 Apr 2010 at 4:46

Water Web Start demo not working

The Web Start process it self worked ok and the settings dialog did pop-up. But 
the water it self seems to have issues.

* When I run it in hardware OpenGL mode I get:

A black window with just a little block of water in the left-bottom corner. 
Click events are only registered in this block. Besides this the water tap 
effect doesn't happen under the cursor but always in the most left-bottom 
corner pixel. So here i think we have a coordinates related issue.

I've attached a screenshot.

* When I run it in software P3D mode I get:

A gray window and an exception:

INFO - Platform: "Linux" -> JVM Bit: "64"
java.lang.NullPointerException
    at javax.swing.ImageIcon.<init>(ImageIcon.java:167)
    at org.mt4j.MTApplication.setup(MTApplication.java:460)
    at processing.core.PApplet.handleDraw(Unknown Source)
    at processing.core.PApplet.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:619)
INFO - MT4j window dimensions: "1024 X 768"
INFO - Maximum framerate: "60"
ERROR - Error while loading Settings.txt file. Using defaults.
INFO - Initializing TUIO input on port: 3333
Water Scene requires OpenGL renderer
Exception in thread "Animation Thread" java.lang.NullPointerException
    at scenes.WaterSceneExportObf.drawAndUpdate(WaterSceneExportObf.java:423)
    at org.mt4j.MTApplication.runApplication(MTApplication.java:622)
    at org.mt4j.MTApplication.draw(MTApplication.java:554)
    at processing.core.PApplet.handleDraw(Unknown Source)
    at processing.core.PApplet.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:619)


Original issue reported on code.google.com by [email protected] on 29 Jul 2010 at 3:03

Attachments:

Disabled child still be selected !


1. add more children into ListCell, one is the background and not fullfilled, 
2. and set listcell.setComposite(false)
3.when drag on the backgound child, nothing happend!

I use v0.98, and I think the drag gesture should work as normal !

when I modified MTComponent.pickRecursive(), changed some lines with  "&& 
enabled" and "&& child.isEnabled()", It worked!

Is this way correct!


Original issue reported on code.google.com by [email protected] on 30 Jul 2011 at 5:25

Subtracting the same vector results in Nan distance vector

What steps will reproduce the problem?
1. Create a vector, make a copy of it.
2. Subtract the one from the other (use getSubtracted)
3.

What is the expected output? What do you see instead?
the result should be (0,0,0), but result is (Nan,Nan,Nan)

What version of the product are you using? On what operating system?
Latest version in SVN on Mac OS X 10.6.7


Original issue reported on code.google.com by [email protected] on 29 Apr 2011 at 1:29

Not able to run HelloWorld demo with multitouch

What steps will reproduce the problem?
1. Downloaded the sample program from MT4J.org
2. Configured on my system.
3. run as java program.

What is the expected output? What do you see instead?
We are able to see the Hello Word text on the screen, but when trying to use 
multitouch it is showing only single touch but it should work for like rotate 
with two fingure.

What version of the product are you using? On what operating system?
MT4J 0.98
Windows 8.1 (Multitouch with 10 fingures)
JDK 1.7/jvM 32 Bit
Eclipse 32 Bit
2 GB Graphics(AMD card)
Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 26 Jan 2014 at 2:23

Vertical_sync in settings.txt has no effect

What steps will reproduce the problem?

1.  In settings.txt, add the line "Vertical_sync=true" 

2.  Pay close attention to logger info statements.  You'll see 
    "Vertical Sync enabled: 'false'"

This is very simple to fix.  Just delete the private field vSync from
MTApplication and use MT4jSettings.getInstance().vSync instead.  The two vSyncs 
aren't in sync!

I'm got the latest code from the svn repo on 1/7/2011 and tested on Windows 7.



Original issue reported on code.google.com by [email protected] on 5 Jan 2011 at 6:39

library import failed (JSyn)

What steps will reproduce the problem?
1. go to http://www.softsynth.com/jsyn/developers/ and download JSynth
2. add jsyn.jar and SoftSynthTools.jar as libraries in MT4J-buildpath
3. as you see here: http://www.softsynth.com/jsyn/docs/installation.html
   --> for windows put the JSynV144.dll in C:\Windows or
C:\Windows\System32 flder
4. Create new Example and try to call Synth.startEngine(0);

What is the expected output? What do you see instead?
Jsyn should run as it is doing in a blank "not MT4J-project" and NOT throw
these exception 

"JSyn error: Could not access JSyn synthesis engine.  -  JSyn not properly
installed, or web page is not calling smart_embed_jsyn.js!, 0x0=0, 0x0=0"

The exception occures when libs or dll file can not be found. I assume that
MT4J is blocking or redirecting something that the dll file can not be found

What version of the product are you using? On what operating system?

- MT4J rev25 
- Windows 7 Professional 64-bit

Please provide any additional information below.

I put the dll file in C:\Windows created a new Java-Project included the 2
libs called Synth.startEngine(0); and it worked.

When i try to do it with the mt4j project and include the 2 libs the
exception occures.
Not tutorial how to include other libs is not provided so i assumed to do
it the ususal way. ich tried to copy the dll file in the project path
(where other mt4j dlls are located) with the same result

Original issue reported on code.google.com by [email protected] on 31 Mar 2010 at 12:39

GSVideo on Windows... how I got this to work.

I'm using mt4j for a demo on a windows touchtable. Our development machines use 
Ubuntu, so some complexities on DLL installations and so on only come up when 
we test integration and platform issues.

In our build, we use the modestmaps and video extensions to play a bit of video 
after a user clicks on an icon (it actually shows the simple player). On Linux, 
it more or less worked right out of the box, but getting this to work on 
windows proved a larger challenge. Our errors included DLL's not found, paths 
incorrect and none of the videos played. I tried various versons of GSVideo, 
found them to be API incompatible and kept switching between different 
versions. 

I worked with mt4j-0.95, so I decided to upgrade to dev. preview 0.98. Some 
errors came up with some "lasso processor" interface, which I eventually simply 
removed.

The GSVideo extension was part of mt-0.95, so worked out of the box. There's 
some misleading information on the "mt4j-gstreamer-extension" page, which I 
mostly followed in my mt-0.95 attempts to get this to work.

All in all, here's what I did to get at least the video to play and get rid of 
all and any error messages that were flooding the console:

= Downloaded mt-0.98
= Downloaded GSVideo stable version 0.9: 
http://sourceforge.net/projects/gsvideo/files/gsvideo/0.9/
= Downloaded "GStreamer-WinBuilds-LGPL-x86.msi" from OSS builds: 
http://code.google.com/p/ossbuild/downloads/list
= Did an 'svn checkout' of mt4j-extensions: 
http://code.google.com/p/mt4jextensions/source/checkout
= Took out the classes "MTMovieClip" and "MTVideoTexture" from the mt4j 
extensions project and included these in my own project (to save the trouble of 
gettting these jars to build). Included required GSVideo .jar libraries (from 
within GSVideo 0.9 zip file).
= Downloaded GTK + MS VC++ redistributables as per mt4j-gstreamer-extension 
google page (but did *not* use any of the software located there):

1. Install GTK: http://gtk-win.sourceforge.net/home/index.php/en/Downloads
2. Install Microsoft Visual C++ 2008 SP1 Redistributable Package (x86): 
http://www.microsoft.com/downloads/details.aspx?FamilyID=a5c84275-3b97-4ab7-a40d
-3802b2af5fc2&DisplayLang=en 

= Built my project, resolved compilation issues. More on that at the end.
= Moved everything on a USB stick to a windows platform.

There:
- Installed "GStreamer-WinBuilds-LGPL-x86.msi" (into C:\gstreamer)
- Installed GTK
- Installed VC redistributable
- Unpacked GSVideo 0.9 "gstreamer/win" into C:\gstreamer, following the same 
path hierarchy. (gstreamer merges with C:\gstreamer). These are the binaries 
that are needed.
- Installed my app in some directory.
- Started, played a video. This worked.

The other instructions and the forum posts on when this was introduced now seem 
to cause more harm then get things to work. I also noticed that GSVideo 0.9 has 
been modified in API and in the performance. You can't grab the pixels from the 
MovieCLip object any longer and you're now supposed to hand it a "GLTexture" or 
"PImage" object where this movie can now copy the pixels to. This requires a 
modification of the MTMovieTexture class. I'm still evaluating ways to improve 
performance here, but I managed to get this to work as follows:

in "onFirstFrame" somewhere:

            if (MT4jSettings.getInstance().isOpenGlMode()){
                m.setPixelDest( (GLTexture)this.getTexture() );
            }

And in "updateComponent", instead of:

((GLTexture)this.getTexture()).updateGLTexture(m.getMoviePixelsBuffer());

I now do this:

m.read();
((GLTexture)this.getTexture()).loadPImageTexture(m);
((GLTexture)this.getTexture()).updateGLTextureFromPImage();

Performance is disappointing this way, but I'm getting an acceptable moving 
image for this purpose (5-10fps).


So a couple of things:
- Can the other pages / forum posts be updated where it concerns video and 
possibly the mt4j-gstreamer-extension project be closed, since it's all wrapped 
into the mt4j-extensions project? This would reduce the amount of 
misinformation people may be getting when searching on how to resolve these 
issues. The biggest problems are related to version matching of GSVideo, 
Processing, gstreamer builds and mt4j installations. This is mostly on windows, 
since on linux they appear as api incompatibilities between gsvideo+mt4j.

- What should MTVideoTexture look like to get better performance due to the 
newer api of GSVideo?  (the mt4j equivalent of "tex.putPixelsIntoTexture();" 
and "image( .... )" ?

Original issue reported on code.google.com by [email protected] on 8 Sep 2011 at 1:40

setHeightLocal() and setSizeLocal() for MTTextArea

What steps will reproduce the problem?
1. create a MTTextArea without any X or Y coordinates just the mtapp and font 
2. then call the methods either setHeightLocal(float) or setSizeLocal(float, 
float) on the MTTextArea

What is the expected output? What do you see instead?

the height of the MTTextArea is 10 pixels higher than what would be expected if 
you had of passed in a width and height parameters to the constructor of the 
MTTextArea.

What version of the product are you using? On what operating system?

Version 0.98 on MacOSX 10.5.8 and Windows 7, both 64 bit.

Please provide any additional information below.

I made a forum post about it and discussed with Therion on #mt4j freenode.

http://nuigroup.com/forums/viewthread/14164/

The workaround to this problem is to modify two of the new vertices when 
this.setVertices is called in both of these methods in the MODE_EXPAND: case.

Instead of having:

height + (2 * innerPaddingTop)

just change to:

height

However, there are no guarantees that this is fully tested and that it won’t 
affect other parts of the code. I am yet to test in more detail. 

Kind regards,
Craig
http://homepages.ecs.vuw.ac.nz/~craig

Original issue reported on code.google.com by [email protected] on 21 Jun 2012 at 1:23

StencilBuffer conflict between MTClipRectangle and MTStencilPolygon

What steps will reproduce the problem?
1. Put a MTClipRectangle somewhere in the scene
2. Put a MTStencilPolygon somewhere in the scene
3. Drag the MTStencilPolygon over the Clip

What is the expected output? What do you see instead?
We should see the MTStencilPolygon over the clip ; however since they both use 
the StencilBuffer to be rendered, we actually see an opposite version of the 
polygon

What version of the product are you using? On what operating system?
last release (0.9)

Please provide any additional information below.
MTStecilPolygon.drawPureGL() should start by
    gl.glPushAttrib(GL.GL_STENCIL_BUFFER_BIT | GL.GL_STENCIL_TEST);
    gl.glClear(GL.GL_STENCIL_BUFFER_BIT);
    gl.glDisable(GL.GL_STENCIL_TEST);
and end with 
    gl.glPopAttrib();

Original issue reported on code.google.com by [email protected] on 5 Aug 2010 at 9:39

IndexOutOfBoundsException in reparenting an MTComponent.

To get the stack trace pasted at the bottom of this report:

1.  I sometimes get the stack trace when running the following method.

/**
 * Transfer a component to a new parent without changing the
 * component's global position, rotation, or scaling.
 * 
 * @param child
 * @param newParent
 */
  public static void addChildInPlace(
    MTComponent child, MTComponent newParent) {

    if (child.getParent() != newParent) {

      // In order for the child not to jump or scale, 
      // need for the its new global matrix to be equal
      // to its old one.
      Matrix gmat = child.getGlobalMatrix();
      Matrix newParentGMatInverse = 
        newParent.getGlobalInverseMatrix();

      newParent.addChild(child);

      // ParentGlobal X Local = OldGlobal
      // ==> ParentGlobalInv X ParentGlobal X Local = 
      //   ParentGlobalInv X OldGlobal
      // ==> Local = ParentGlobalInv X OldGlobal.

      child.setLocalMatrix(newParentGMatInverse.mult(gmat));
    }
  }

2. I ensured that this method is only called on the animation
   thread.

3. To make the stack go away, I added the following lines to the
   method above before newParent.addChild(child)

   if (child.getParent() != null) {
      child.getParent().removeChild(child);
   }

4. I figured out the reason why this is happening.  The old parent is
  a child of the new parent.  But the old parent self-destructs when
  it loses all of its children, decreasing the size of the new 
  parent's array of child components.

I'm using the MT4j trunk code as of Feb 9, 2011.

THE STACK TRACE:

Exception in thread "Animation Thread" java.lang.IndexOutOfBoundsException: 
Index: 105, Size: 104
    at java.util.ArrayList.add(ArrayList.java:367)
    at org.mt4j.components.MTComponent.addChild(MTComponent.java:1872)
    at org.mt4j.components.MTComponent.addChild(MTComponent.java:1849)
    at gov.pnnl.nvac.mt.util.MTUtils.addChildInPlace(MTUtils.java:66)
    at gov.pnnl.nvac.mt.projectmgt.ProjectMgtScene$DnDProxy.componentDropped(ProjectMgtScene.java:1573)
    at gov.pnnl.nvac.mt.projectmgt.ui.TearSheetWidget.componentDropped(TearSheetWidget.java:469)
    at org.mt4jx.input.gestureAction.dnd.DragAndDropAction.gestureEnded(DragAndDropAction.java:116)
    at org.mt4jx.input.gestureAction.dnd.AbstractDnDAction.processGestureEvent(AbstractDnDAction.java:38)
    at org.mt4j.input.GestureEventSupport.fire(GestureEventSupport.java:184)
    at org.mt4j.input.GestureEventSupport.fireGestureEvt(GestureEventSupport.java:169)
    at org.mt4j.components.MTComponent.processGestureEvent(MTComponent.java:3007)
    at org.mt4j.input.inputProcessors.componentProcessors.AbstractComponentProcessor.fireGestureEvent(AbstractComponentProcessor.java:238)
    at org.mt4j.input.inputProcessors.componentProcessors.AbstractCursorProcessor.fireGestureEvent(AbstractCursorProcessor.java:172)
    at org.mt4j.input.inputProcessors.componentProcessors.dragProcessor.DragProcessor.cursorEnded(DragProcessor.java:117)
    at org.mt4j.input.inputProcessors.componentProcessors.AbstractCursorProcessor.processInputEvtImpl(AbstractCursorProcessor.java:146)
    at org.mt4j.input.inputProcessors.componentProcessors.AbstractComponentProcessor.processInputEvent(AbstractComponentProcessor.java:101)
    at org.mt4j.input.ComponentInputProcessorSupport.processInputEvent(ComponentInputProcessorSupport.java:78)
    at org.mt4j.components.MTComponent.dispatchInputEvent(MTComponent.java:2820)
    at org.mt4j.components.MTComponent.processInputEvent(MTComponent.java:2951)
    at org.mt4j.components.MTCanvas.processInputEvent(MTCanvas.java:434)
    at org.mt4j.input.inputProcessors.globalProcessors.AbstractGlobalInputProcessor.fireInputEvent(AbstractGlobalInputProcessor.java:139)
    at org.mt4j.input.inputProcessors.globalProcessors.InputRetargeter.processInputEvtImpl(InputRetargeter.java:94)
    at org.mt4j.input.inputProcessors.globalProcessors.AbstractGlobalInputProcessor.processInputEvent(AbstractGlobalInputProcessor.java:68)
    at org.mt4j.input.inputSources.AbstractInputSource.fireInputEvent(AbstractInputSource.java:209)
    at org.mt4j.input.inputSources.AbstractInputSource.flushEvents(AbstractInputSource.java:185)
    at org.mt4j.input.inputSources.AbstractInputSource.pre(AbstractInputSource.java:128)
    at org.mt4j.input.inputSources.AbstractInputSource.processAction(AbstractInputSource.java:88)
    at org.mt4j.MTApplication.runApplication(MTApplication.java:720)
    at org.mt4j.MTApplication.draw(MTApplication.java:660)
    at processing.core.PApplet.handleDraw(Unknown Source)
    at processing.core.PApplet.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:662)

Original issue reported on code.google.com by [email protected] on 10 Mar 2011 at 12:08

MTImage can add more than one close button if we call setDisplayCloseButton(true) twice

What steps will reproduce the problem?
1. add MTImage to scene
2. call MTImage.setDisplayCloseButton(true) 
3. call MTImage.setDisplayCloseButton(true) 

What is the expected output? What do you see instead?
Should see one close button.

What version of the product are you using? On what operating system?

version 0.95

Please provide any additional information below.
i change code to 
if (dispClose){
            if(getChildByName("closeButton")!=null){
                return;
            }
...
..
..
It do work


Original issue reported on code.google.com by [email protected] on 9 Feb 2011 at 1:35

Add position anchor for MTRoundRectangle

It would be great if the MTRoundRectangle could also have some position anchors 
similar to the MTRectangle class. Perhaps position features can be added to the 
MTPolygon class so all subclasses also have these features.

I have made a post about it on the forums here, as that is what you recommended 
I do in one of the earlier threads.

http://nuigroup.com/forums/viewthread/13431/

Thanks.

Cheers Craig
http://homepages.ecs.vuw.ac.nz/~craig

Original issue reported on code.google.com by [email protected] on 1 Dec 2011 at 3:20

Destroying a cell from an MTList doesn't make the rest align to the top

What steps will reproduce the problem?

1. Create and MTList, add some MTListCell's
2. Remove a cell somewhere with cell.destroy

What is the expected output? What do you see instead?

You see that the cell is removed from it's parent, but the other cells are not 
aligned right. We do not get the same output as when we use 
list.removeElement(cell). cell.destroy should call it's parent list 
removeElement so the output is the same.

What version of the product are you using? On what operating system?

Latest svn. Mac OS X 10.6.7. Latest Java version

Original issue reported on code.google.com by [email protected] on 25 Mar 2011 at 10:40

Weird comportment when a MTComponent has no registered input processor

What steps will reproduce the problem?
MTRectangle a = new MTRectangle(150,100,0,40,40,mtApplication);
getCanvas().addChild(a);
MTRectangle b = new MTRectangle(100,150,0,40,40,mtApplication);
b.unregisterAllInputProcessors();
a.addChild(b);
MTRectangle c = new MTRectangle(200,150,0,40,40,mtApplication);
c.unregisterAllInputProcessors();
c.registerInputProcessor(new TapProcessor(mtApplication));
a.addChild(c);

What is the expected output? What do you see instead?
I would assume that b and c should have the same comportment, but they don't. 
Dragging c does nothing (as expected), but dragging b drags a (and therefore 
all 3 squares).

What version of the product are you using? On what operating system?
last from repository

Please provide any additional information below.
It may not be a bug, and anyway it is not that big of a deal, but I just wanted 
to point it out.

Original issue reported on code.google.com by [email protected] on 19 Oct 2010 at 1:06

MTStencilPolygons are not clipped correctly in a MTClipRectangle

What steps will reproduce the problem?
1. Create a MTStencilPolygon
2. Add it as a child of a MTClipRectangle, but out of the clip

What is the expected output? What do you see instead?
the MTStencilPolygon should not be visible but kind of is

What version of the product are you using? On what operating system?
last repository version

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 11 Oct 2010 at 9:21

Snap to Rotation Angle

A potential enhancement for MT4J.

I often want to limit rotation of a component to a specific set of angles as 
opposed to having completely free rotation.  Attached is a potential solution 
for creating a default Rotation event listener with this functionality.

Original issue reported on code.google.com by [email protected] on 22 Apr 2012 at 7:55

Attachments:

Add keyEvent() to Physics example

What steps will reproduce the problem?
1. run the physics example

What is the expected output? What do you see instead?
the physics example produces a runtime error since it cannot find a 
keyEvent(...) method.

What version of the product are you using? On what operating system?
v0.98 on windows

Please provide any additional information below.
it can be solved by adding the method. It worked after i added the 
keyEvent(...) method from the hockey example: 

    /**
     * 
     * @param e
     */
    public void keyEvent(KeyEvent e){
        int evtID = e.getID();
        if (evtID != KeyEvent.KEY_PRESSED)
            return;
        switch (e.getKeyCode()){
        case KeyEvent.VK_BACK_SPACE:
            app.popScene();
            break;
            default:
                break;
        }
    }

Original issue reported on code.google.com by [email protected] on 12 Nov 2012 at 4:40

mini font bug

Please change in the package org.mt4j.components.visibleComponents.font in
the class FontManager the Line 145

from 

suffix.toLowerCase();

to 

suffix = suffix.toLowerCase();

thx.

Original issue reported on code.google.com by [email protected] on 6 Apr 2010 at 6:19

Cannot unregister Tuio2DCursorInputSource and Tuio2dObjectInputSource

What steps will reproduce the problem?
1. Build a new MTApplication (I did it with something like this : public class 
MyApp extends MTApplication)
2. In the StartUp method, try to unregister all default input sources :
for (AbstractInputSource source : registeredInputSources)
    this.getInputManager().unregisterInputSource(source);

What is the expected output?
Nothing...

What do you see instead?
An exception...

TUIO client connected: port 3333
java.net.SocketException: Socket closed
    at java.net.PlainDatagramSocketImpl.receive0(Native Method)
    at java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:145)
    at java.net.DatagramSocket.receive(DatagramSocket.java:725)
    at com.illposed.osc.OSCPortIn.run(OSCPortIn.java:64)
    at java.lang.Thread.run(Thread.java:662)
Exception in thread "Animation Thread" java.lang.NullPointerException
    at org.tuio4j.TuioClient.disconnect(TuioClient.java:65)
    at org.mt4j.input.inputSources.Tuio2dObjectInputSource.onUnregistered(Tuio2dObjectInputSource.java:42)
    at org.mt4j.input.InputManager.unregisterInputSource(InputManager.java:128)
    at atol.example.diamondtouch.mt4j.basic.dtCursor.StartDTCursor.startUp(StartDTCursor.java:28)
    at org.mt4j.MTApplication.setup(MTApplication.java:328)
    at processing.core.PApplet.handleDraw(PApplet.java:1580)
    at processing.core.PApplet.run(PApplet.java:1502)
    at java.lang.Thread.run(Thread.java:662)


What version of the product are you using? On what operating system?
0.98 under Linux Debian x86


Original issue reported on code.google.com by [email protected] on 30 May 2011 at 11:52

Problem when putting a MTSceneTexture in a MTClipRectangle

What steps will reproduce the problem?
1. create a MTClipRectangle
2. create an AbstractScene and a MTSceneTexture
3. add the MTSceneTexture as a child of the MTRectangle

What is the expected output? What do you see instead?
We should see a clipped part of the scene ; however the stencil buffer is not 
reinitialized before rendering the second scene, therefore clipping the second 
scene also.

What version of the product are you using? On what operating system?
last release (0.9)

Please provide any additional information below.
in MTSceneTexture.drawComponent(), there should be
    gl.glPushAttrib(GL.GL_STENCIL_BUFFER_BIT | GL.GL_STENCIL_TEST);
    gl.glClear(GL.GL_STENCIL_BUFFER_BIT);
    gl.glDisable(GL.GL_STENCIL_TEST);
before scene.drawAndUpdate() and
    gl.glPopAttrib();
just after


Original issue reported on code.google.com by [email protected] on 5 Aug 2010 at 9:30

Can't use xstream with Vector3D and subclasses.


I'm using xstream to serialize the state of an MT4j application. Deserialized 
instances of Vector3D and Vertex objects do not test equal to the original 
objects. Attached is a very simple JUnit test case which demonstrates the 
problem.

I found that the reason for this is that xstream bypasses the constructors 
entirely, so "type" never gets set.  The field "type" is declared transient and 
xstream ignores transient fields.

I recommend deleting the type field from Vector3D altogether and giving 
Vector3D and its subclasses robust hashCode() and equals() methods. I've 
attached versions of Vector3D, Vertex, and BezierVertex that have these.

Any code that calls getType() can simply use "instanceof" instead.    



Original issue reported on code.google.com by [email protected] on 21 Apr 2011 at 7:14

Attachments:

jogl with mt4j


Please, i used mt4j to reproduce a gis component and relationship. But now i 
get some problem. I need to know the  generated idea which come frome this 
error: 
java.lang.IllegalArgumentException: 
GLDrawableFactory.chooseGraphicsConfiguration() was not used when creating this 
Component
    at com.sun.opengl.impl.x11.X11GLDrawableFactory.getGLDrawable(X11GLDrawableFactory.java:238)
    at org.mt4j.util.opengl.CustomPGraphicsOpenGL.allocate(CustomPGraphicsOpenGL.java:91)
    at processing.core.PGraphics3D.setSize(PGraphics3D.java:316)
    at processing.core.PApplet.makeGraphics(PApplet.java:1148)
    at processing.core.PApplet.size(PApplet.java:982)
    at processing.core.PApplet.size(PApplet.java:942)
    at swingMt4j.MTApplication.setup(MTApplication.java:211)
    at processing.core.PApplet.handleDraw(PApplet.java:1383)
    at processing.core.PApplet.run(PApplet.java:1311)
    at java.lang.Thread.run(Thread.java:662)
Exception in thread "Animation Thread" java.lang.RuntimeException: 
org.mt4j.util.opengl.CustomPGraphicsOpenGL needs to be updated for the current 
release of Processing.
    at processing.core.PApplet.makeGraphics(PApplet.java:1195)
    at processing.core.PApplet.size(PApplet.java:982)
    at processing.core.PApplet.size(PApplet.java:942)
    at swingMt4j.MTApplication.setup(MTApplication.java:211)
    at processing.core.PApplet.handleDraw(PApplet.java:1383)
    at processing.core.PApplet.run(PApplet.java:1311)
    at java.lang.Thread.run(Thread.java:662)

Original issue reported on code.google.com by [email protected] on 12 Dec 2012 at 1:08

InputCursor getPosition() Method?

Some suggestion for enhancement:
a getPosition() Method to get a Vector3D of the Position from a InputCursor.
(At the moment i use pos = new Vector3D(InputCursor.getCurrentEvtPosX() 
,InputCursor.getCurrentEvtPosY()  ) ) which is a bit cumbersome.

Original issue reported on code.google.com by [email protected] on 8 Apr 2010 at 2:48

Removing all children from MT4j list

When removing all children from an MT4j list after initializeing, adding new 
children afterwards results in those children not being shown. The children 
used in my application are all MTListCell objects. When I use the remove method 
the first time, no children are currently present.

The configuration used is the latest svn version of MT4j available. On Mac OS X 
10.6 with the latest Java version.


Original issue reported on code.google.com by [email protected] on 23 Feb 2011 at 4:50

StyleInfo objects expose references to private fields.

What steps will reproduce the problem?
1. Create a StyleInfo object and set the fill color to red.
2. Create two MTRectangles, and set their fill colors to blue.
3. Set the StyleInfo to the first MTRectangle.
4. Set the first MTRectangle's fill color to yellow.
5. Set the StyleInfo to the second MTRectangle.

What is the expected output? What do you see instead?
The second MTRectangle should end up red (what was set in the StyleInfo),
but it ends up yellow (what was set in the first rectangle after the StyleInfo 
was applied to it).

What version of the product are you using? On what operating system?
Both v0.95 and svn trunk exhibit the problem.  Ubuntu 10.4 x86_64, 
JavaSE-1.6(java-6-openjdk).

Please provide any additional information below.
It looks like when you set a StyleInfo to a shape, the fields of the StyleInfo 
are set to the shape by reference.  So when the shape's fill color is set 
manually (via .setFillColor()), it changes in the StyleInfo too.  This should 
probably be fixed by making defensive copies somewhere.  I'd put together a 
patch for this, but I'm unsure where the best place to make the copies is.  In 
the StyleInfo?  In the shape?  Somewhere else?  I can provide a code example to 
demonstrate if needed.

Original issue reported on code.google.com by [email protected] on 17 Sep 2010 at 12:04

Memory leak in css code

What steps will reproduce the problem?
1. create new components
2. destroy them
3. check memory usage

Problem probably in getRelevantStyles in CSSStyleManager

public List<CSSStyleHierarchy> getRelevantStyles(MTComponent c) {
        if (!components.contains(c) && c instanceof CSSStylableComponent){ 
            //here exactly
            components.add((CSSStylableComponent)c);
        }

they dont get removed

Original issue reported on code.google.com by [email protected] on 23 Jun 2011 at 2:19

Android: send input_ended events if the application is paused (eg. when home button pressed) to prevent sticky cursors that dont get removed

What steps will reproduce the problem?
1. enter mt4j android application
2. press with one finger on the screen
3. while pressing, press Home button of device
4. enter MT4j app gain

What is the expected output? What do you see instead?
- finger cursors should be removed and not stay on the screen


Please use labels and text to provide additional information.


Original issue reported on code.google.com by [email protected] on 7 Apr 2011 at 1:23

Auto Wrap mode in MTTextArea doesent break the line if no previous 'space' is there

        AbstractMTApplication instance = getMTApplication();
        MTColor textAreaColor = MTColor.randomColor();

        MTTextArea mt = new MTTextArea(instance, 0,0, 300, 500);
         mt.setFillColor(textAreaColor);
         mt.setStrokeColor(textAreaColor);

         MTList aList = new MTList(0, 0, 300, 500, instance);

         MTListCell cell1 = new MTListCell(300, 500, instance);
         cell1.setFillColor(textAreaColor);
         cell1.addChild(mt);
         aList.addListElement(cell1);
         getCanvas().addChild(aList);

         MTKeyboard keyboard = new MTKeyboard(instance);
         keyboard.setFillColor(MTColor.BLACK);
         getCanvas().addChild(keyboard);
         keyboard.addTextInputListener(mt);

and then just type without a space

Original issue reported on code.google.com by [email protected] on 6 Jul 2011 at 9:28

setWidthLocal() and setHeightLocal() leak native memory

What steps will reproduce the problem?
1. Create an MTRectangle.
2. Call .setWidthLocal(), or .setHeightLocal() on the rectangle repeatedly.
3. Memory is leaked.

What is the expected output? What do you see instead?
I would expect the dimensions of the rectangle to reflect the value passed in 
without leaking.

What version of the product are you using? On what operating system?
Tested against SVN trunk, branches/new (r501), and the v09 and v095 tags.  
Ubuntu 11.04 amd64, Java 1.6 64-bit jvm.  Although I didn't run this test code 
on Windows, I believe it leaks there, too.

Please provide any additional information below.
Here's a quick scene that will reproduce it: http://pastebin.com/zHEHVdX2
If let run, it will eat up a few gigs pretty rapidly, so adjust the end 
condition of the for loop accordingly.  If you run a heap profiler along side 
it (I've been using jvisualvm), you can see the heap doesn't grow out of 
control, but the java process does.  Which means a native leak, I think.

Original issue reported on code.google.com by [email protected] on 2 Aug 2011 at 5:04

Problem with aniAnimation

What steps will reproduce the problem?
1. Create an AniAnimation with a delay in it
2. Run the animation, then you can see how the animationStart event is called 
immediately, instead of wait the animation delay

What is the expected output? What do you see instead?
The listener is fired with an animationStart event right after the animation 
start, then wait the delay and then continue with the animation

What version of the product are you using? On what operating system?
0.98 on windows 7 64b with a 32 JVM, compiling with JDK 7

Please provide any additional information below.
With the old animation object everything works as expected, but i really wanted 
the tools that Ani can give you like the easing and stuff, i don't know if 
there is a way to do so in a elegant way (I need to put a flag in the 
animationUpdated, which i don't think will be the best solution, any help or 
guide will be appreciated!
I already read the Ani documentation, but isn't very clear, almost in-existent

Original issue reported on code.google.com by [email protected] on 27 Apr 2012 at 12:40

full screen - black screen

What steps will reproduce the problem?
1. changing settings fullscreen= true
2. changing settings FullscreenExclusive=false (or true sometimes)
3.

What is the expected output? What do you see instead?
Displaying my program,
instead I get a black screen with one small box visible

What version of the product are you using? On what operating system?
MT4j v0.98
ubuntu 10.10

Please provide any additional information below.
when the fullscreenExclusive = false, the screen is black except for one little 
square in the top left corner, (I think of the size & place of first item I add 
to the screen). I can still move things in my application (in the dark) and 
when they are under the little square I can see them.
When the fullscreenExclusive = true the problem is solved but sometimes at 
random moments (about 1 in 10 times running) the problem does occur again, 
restarting it then just solsves it


Original issue reported on code.google.com by [email protected] on 8 Jun 2011 at 11:02

Pick in PreDrawAction results in concurrency problem

What steps will reproduce the problem?

I'm using the pick method within a PreDrawAction.

What is the expected output? What do you see instead?

The expected output is a normal pick recursion. What I get is an error of 
concurrent modification of the list used when picking. Then I moved the pick to 
a different method in the preDrawAction which is synchronized but the problem 
remains.

Exception in thread "Animation Thread" java.util.ConcurrentModificationException
    at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
    at java.util.AbstractList$Itr.next(AbstractList.java:343)
    at org.mt4j.components.MTComponent.pickRecursive(MTComponent.java:2645)
    at org.mt4j.components.MTComponent.pick(MTComponent.java:2530)
    at view.widgets.actions.HoverPreDrawAction.pick(HoverPreDrawAction.java:39)
    at view.widgets.actions.HoverPreDrawAction.processAction(HoverPreDrawAction.java:24)
    at org.mt4j.sceneManagement.AbstractScene.drawAndUpdate(AbstractScene.java:159)
    at org.mt4j.MTApplication.runApplication(MTApplication.java:780)
    at org.mt4j.MTApplication.draw(MTApplication.java:666)
    at processing.core.PApplet.handleDraw(Unknown Source)
    at processing.core.PApplet.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:680)

What version of the product are you using? On what operating system?

The latest HEAD of MT4j on Mac OS X 10.6.7

Original issue reported on code.google.com by [email protected] on 25 Apr 2011 at 11:10

Vector3D Limit() Method

It would be useful to have a direct Limit Method for a vector. At the
Moment i only aware of make the following: vectorA = vectorA.getLimited().
So there is a little overhead with creating a new Vector internally.

Original issue reported on code.google.com by [email protected] on 5 Apr 2010 at 4:29

Nexus One initialization Error with Android-Port

What steps will reproduce the problem?
1. Run the android port on a google nexus one phone.
2.
3.

What is the expected output? What do you see instead?
Instead of running the app we get this error:

07-27 11:44:40.186: ERROR/AndroidRuntime(17395): FATAL EXCEPTION: GLThread 10
07-27 11:44:40.186: ERROR/AndroidRuntime(17395): java.lang.RuntimeException: 
PFramebuffer: GL_FRAMEBUFFER_UNSUPPORTED_OES8cdd
07-27 11:44:40.186: ERROR/AndroidRuntime(17395):     at 
processing.core.PFramebuffer.validFbo(PFramebuffer.java:371)
07-27 11:44:40.186: ERROR/AndroidRuntime(17395):     at 
processing.core.PFramebuffer.setColorBuffers(PFramebuffer.java:142)
07-27 11:44:40.186: ERROR/AndroidRuntime(17395):     at 
processing.core.PFramebuffer.setColorBuffer(PFramebuffer.java:109)
07-27 11:44:40.186: ERROR/AndroidRuntime(17395):     at 
processing.core.PGraphicsAndroid3D.initPrimary(PGraphicsAndroid3D.java:6507)
07-27 11:44:40.186: ERROR/AndroidRuntime(17395):     at 
processing.core.PGraphicsAndroid3D.beginDraw(PGraphicsAndroid3D.java:887)
07-27 11:44:40.186: ERROR/AndroidRuntime(17395):     at 
processing.core.PApplet.handleDraw(PApplet.java:1771)
07-27 11:44:40.186: ERROR/AndroidRuntime(17395):     at 
processing.core.PGraphicsAndroid3D$A3DRenderer.onDrawFrame(PGraphicsAndroid3D.ja
va:7331)
07-27 11:44:40.186: ERROR/AndroidRuntime(17395):     at 
android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1363)
07-27 11:44:40.186: ERROR/AndroidRuntime(17395):     at 
android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1118)



We should not try to use the FBO extension on phones that dont support them!


Original issue reported on code.google.com by [email protected] on 3 Aug 2011 at 9:13

PImage/MTImage load from background thread broken in 0.98

What steps will reproduce the problem?
1. Run Flickr example in mt4j-desktop, 0.98

What is the expected output? What do you see instead?
Images fail to load, or show up all white.

What version of the product are you using? On what operating system?
MT4j v0.98 from branches/new - Windows 7

Please provide any additional information below.

calling setupGLTexture() in updateGLTexture() since texture wasnt initialized!
Exception in thread "Thread-5" javax.media.opengl.GLException: May not call 
this between glBegin and glEnd
    at com.sun.opengl.impl.GLImpl.checkBufferObject(GLImpl.java:30652)
    at com.sun.opengl.impl.GLImpl.checkUnpackPBODisabled(GLImpl.java:30674)
    at com.sun.opengl.impl.GLImpl.glTexSubImage2D(GLImpl.java:21387)
    at org.mt4j.util.opengl.JoglGL20Plus.glTexSubImage2D(JoglGL20Plus.java:615)
    at org.mt4j.util.opengl.GLTexture.updateGLTexture(GLTexture.java:835)
    at org.mt4j.util.opengl.GLTexture.updateGLTexture(GLTexture.java:733)
    at org.mt4j.util.opengl.GLTexture.updateGLTextureFromPImage(GLTexture.java:853)
    at org.mt4j.util.opengl.GLTexture.<init>(GLTexture.java:420)
    at org.mt4j.AbstractMTApplication.loadImage(AbstractMTApplication.java:1042)
    at advanced.flickrMT.FlickrMTFotoLoader.processFoto(FlickrMTFotoLoader.java:80)
    at advanced.flickrMT.FlickrLoader.run(FlickrLoader.java:221)

Original issue reported on code.google.com by [email protected] on 26 Apr 2011 at 6:40

Problem with a list in draw and update

What steps will reproduce the problem?
1. add a mousemotionlistener to a scene
2. a global input listener implements i.e. only mousemotionlistener interface
3.

What is the expected output? What do you see instead?
after a time, the animation thread dies. 

What version of the product are you using? On what operating system?
0.9 - Windows 7, x64

Please provide any additional information below.
Exception in thread "Animation Thread" java.lang.IndexOutOfBoundsException: 
Index: 6, Size: 13
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at org.mt4j.components.visibleComponents.widgets.MTTextArea.drawComponent(MTTextArea.java:344)
    at org.mt4j.components.MTCanvas.drawUpdateRecursive(MTCanvas.java:401)
    at org.mt4j.components.MTCanvas.drawUpdateRecursive(MTCanvas.java:375)
    at org.mt4j.components.MTCanvas.drawAndUpdateCanvas(MTCanvas.java:313)
    at org.mt4j.sceneManagement.AbstractScene.drawAndUpdate(AbstractScene.java:166)
    at org.mt4j.MTApplication.runApplication(MTApplication.java:622)
    at org.mt4j.MTApplication.draw(MTApplication.java:554)
    at processing.core.PApplet.handleDraw(Unknown Source)
    at processing.core.PApplet.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:619)


Original issue reported on code.google.com by [email protected] on 5 Jul 2010 at 8:39

MT4J error on 3D example (dinossaur)

What steps will reproduce the problem?
1. Open MT4J with examples in eclipse
2. run the menu example
3. run the 3D dinossaur example

What is the expected output? What do you see instead?
the app should run

What version of the product are you using? On what operating system?
windows 7

Please provide any additional information below.

Thread error...he other examples run ok!

Original issue reported on code.google.com by [email protected] on 25 Mar 2010 at 1:16

input re-targeting doesn't work when a MTSceneTexture is created elsewhere than (0, 0)

What steps will reproduce the problem?
1. create a MTSceneTexture with the x and y parameters different from 0

What is the expected output? What do you see instead?
An offset appears between where the input is redirected and where it should be.


What version of the product are you using? On what operating system?
repository version from about a week ago

Please provide any additional information below.
Could be solved by keeping the x and y parameters at construction, and then 
 change lines 247 and 248 by
    newX = interSP.x - this.x;
    newY = interSP.y - this.y;

Original issue reported on code.google.com by [email protected] on 18 Aug 2010 at 1:42

getCurrentTarget() for MTInputEvent

Besides getting the target component of an input event it would be useful to 
have something like 
getCurrentTarget() that would return the specific sub-component when dealing 
with composites. 

    public MTComponent getCurrentTarget() {
    AbstractCursorInputEvt inputEvent = (AbstractCursorInputEvt) e;
    MTComponent[] children = target.getChildren();
    for (MTComponent child : children) {
        if (!child.pick(getCursor().getCurrentEvtPosX(), getCursor().getCurrentEvtPosY()).isEmpty()) {
        return child;
        }
    }
    return null;
    }

Original issue reported on code.google.com by [email protected] on 20 Apr 2010 at 8:44

FillColor and Texture are cleared after a setSizeLocal().

What steps will reproduce the problem?
1. Create an MTRoundRectangle
2. Set it's fill color and/or texture.
3. Call .setSizeLocal() to change it's size.

What is the expected output? What do you see instead?
The fill color and/or texture should stay the same, but the object reverts to 
white.

What version of the product are you using? On what operating system?
Both v0.95 and svn trunk exhibit the problem.  Ubuntu 10.4 x86_64, 
JavaSE-1.6(java-6-openjdk).

Please provide any additional information below.
It looks like setSizeLocal() uses setVerticies() internally, and I find that 
anything that uses setVerticies() (including calling it directly) resets an 
objects fill color and texture.  Tracing the code into GeometryInfo, it looks 
like it tries to preserve the StyleInfo object, but I'm not sure where it 
fails.  I can produce a little example to demonstrate if needed.

Original issue reported on code.google.com by [email protected] on 16 Sep 2010 at 11:53

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.