3 of 4
3
Touchlib rotate scale bug
Posted: 18 July 2008 04:46 PM   [ Ignore ]   [ # 31 ]
New Member
Rank
Total Posts:  21
Joined  2007-11-27
Vlado - 20 June 2008 12:54 PM

Really funny is that MS’s Surface has the same problem with rotation and zooming out smile) , you can see it in the Live Labs demo video (the Seadragon one with Shadowbox at the end)
When the guy uses the picture app rotating and zooming out , he has the same bug smile) , really funny.

Hrmm… This shouldn’t be the case.  It definitely isn’t the case for our Concierge (mapping) app or anything using our WPF ScatterView control.  Seadragon is using one of our lower level APIs though and I suppose there is a chance that they made a mistake in applying it’s calculations to their UI.  Could you give me a timestamp of where you see this in the video?  I’m not finding it…

Thanks!

-Robert
Program Manager, Surface APIs and Controls

Profile
 
 
Posted: 18 July 2008 05:20 PM   [ Ignore ]   [ # 32 ]
Sr. Member
Avatar
RankRankRank
Total Posts:  265
Joined  2007-09-22

In the Seadragon app when the guy from Live Labs showcases deep zoom , a few times not much but I was specificaly looking for erros.
I’ve seen it in MS videos about 4-5 months ago , haven’t seen it since.Thanks your your time and contributions to this forum robert.

Profile
 
 
Posted: 18 July 2008 08:19 PM   [ Ignore ]   [ # 33 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  1349
Joined  2007-04-08

yamtu: I will be documenting the AS3 classes etc as part of my GSoC. I’d really recommend trying to use the AS3 library from the svn as lux and future frameworks will be built off the current AS3 development (but of course with documentation). Only one or two of the FLAs on the svn don’t work. If going through the examples it should help give you an idea of how to use everything until we can get more documentation.

If this “bug” isn’t added to the rotateablesclable class within the next week or two, I’ll be adding it in so it’ll be with the release of lux and on current svn. I’ll probably use the technique nuiman posted since it seems to be cleaner.

Also whitenoise added a physical.as class a while back (which is currently used for the photoapp). I’m not sure, but this one may not have that ‘bug.’

 Signature 

My Multitouch Blog
My Youtube
Multitouch FAQ - Need Help? Click here!

Profile
 
 
Posted: 18 July 2008 10:45 PM   [ Ignore ]   [ # 34 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  509
Joined  2008-02-22

Also whitenoise added a physical.as class a while back (which is currently used for the photoapp). I’m not sure, but this one may not have that ‘bug.’

Thanks I’m going to check that out.

 Signature 

http://www.justinriggio.com cool mad
http://www.niceminds.com My blog

Profile
 
 
Posted: 19 July 2008 02:01 AM   [ Ignore ]   [ # 35 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  509
Joined  2008-02-22

I tested the physical.as and no luck.

 Signature 

http://www.justinriggio.com cool mad
http://www.niceminds.com My blog

Profile
 
 
Posted: 21 July 2008 02:19 AM   [ Ignore ]   [ # 36 ]
New Member
Rank
Total Posts:  8
Joined  2008-05-24
justin - 18 July 2008 10:23 AM

Do you have a class for marks libary?

i do have some classes, but will add more code over the comming weeks

cerupcat: the code i used to “fix” the rotation is the same nuiman posted about:

var width:Number = (blob1.stageX blob2.stageX)/2;
 var 
height:Number = (blob1.stageY blob2.stageY)/2;

 var 
affineTransform:Matrix component.transform.matrix;
            
affineTransform.translate(-width, -height);
            
affineTransform.rotate(angle - (component.rotation*Math.PI/180));
            
affineTransform.translate(widthheight);
            
component.transform.matrix affineTransform;

Profile
 
 
Posted: 21 July 2008 02:25 AM   [ Ignore ]   [ # 37 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  1349
Joined  2007-04-08

Ok, i’ll add that in to the touchlib/lux AS3 stuff soon.

 Signature 

My Multitouch Blog
My Youtube
Multitouch FAQ - Need Help? Click here!

Profile
 
 
Posted: 21 July 2008 02:27 AM   [ Ignore ]   [ # 38 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  509
Joined  2008-02-22

were would this go?

 Signature 

http://www.justinriggio.com cool mad
http://www.niceminds.com My blog

Profile
 
 
Posted: 21 July 2008 02:44 AM   [ Ignore ]   [ # 39 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  1349
Joined  2007-04-08

Justin basically you need to get the ‘orgin’ so you know where to rotate and scale from. The orgin is the x/y position of the position between the 2 fingers.

So if you have a first finger at (100, 200) and a second finger at (300, 400); Then you do (100 + 300)/2 = x orgin and (200 + 400)/2 = y orgin. So the ‘orgin’ or point between the two fingers is (200, 300)

Once you know those points, you just plug them in to that translate function (affineTransform.translate(x orgin, y orgin))

So basically you need to find in the current code, where we are scaling and rotating. And do the above stuff in place of how we’re currently doing it. It’s a little confusing at first.

 Signature 

My Multitouch Blog
My Youtube
Multitouch FAQ - Need Help? Click here!

Profile
 
 
Posted: 21 July 2008 07:37 AM   [ Ignore ]   [ # 40 ]
New Member
Rank
Total Posts:  87
Joined  2007-10-23

Hey guys sorry I haven’t been in touch for ages my laptop gave up on me, but I’m just about back up and running now. In terms of the transformation matrix method, I agree that is a lot cleaner than the method I initially proposed, however despite this, both have disadvantages. The method I proposed seams to be buggy in Flex, as camilosw pointed out, however I believe a fix was found… The matrix method, in my experience does render some of the properties of the Sprite/Movieclip classes useless; the scaleY property in my experience, which does make programming really frustrating. Anyway it’s not really up to me, cerupcat are you moving more towards the matrix method? If so have you had the problem I mentioned?

Profile
 
 
Posted: 21 July 2008 12:40 PM   [ Ignore ]   [ # 41 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  1349
Joined  2007-04-08

weyforth,

I haven’t tried any of these methods since I haven’t had time. I’m for whatever works best. Since my time is limited right now, it’d be great if someone else can just add it to the rotateablsclable classes. If it’s not done within the next week then i’ll make an effort to do it.

 Signature 

My Multitouch Blog
My Youtube
Multitouch FAQ - Need Help? Click here!

Profile
 
 
Posted: 21 July 2008 12:47 PM   [ Ignore ]   [ # 42 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  509
Joined  2008-02-22

I’ll try my best to get this working. Anyone here that whats to do it should. It might take me two weeks to get it. LOL I’m just learning so this is a little hard. Anyway I’m going to make an effort.
@cerupcat: Thanks for the tip on placement.

 Signature 

http://www.justinriggio.com cool mad
http://www.niceminds.com My blog

Profile
 
 
Posted: 21 July 2008 02:37 PM   [ Ignore ]   [ # 43 ]
New Member
Rank
Total Posts:  87
Joined  2007-10-23

I could try and get this implemented into the rotatescale class in the next few hours… but I don’t want to intrude if anyone else is already working on it. Justin?

Profile
 
 
Posted: 21 July 2008 02:38 PM   [ Ignore ]   [ # 44 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  509
Joined  2008-02-22

please do!!!
It would help me a ton.

 Signature 

http://www.justinriggio.com cool mad
http://www.niceminds.com My blog

Profile
 
 
Posted: 21 July 2008 02:44 PM   [ Ignore ]   [ # 45 ]
New Member
Rank
Total Posts:  87
Joined  2007-10-23

OK I shall do, but could I ask a favour Justin? I switched to mac in the last week so I will need someone to test the new class, could you test it for me?

Profile
 
 
   
3 of 4
3