Sunset Lake Software - Comments for "3-D rotation without a trackball" http://www.sunsetlakesoftware.com/2008/10/22/3-d-rotation-without-trackball Comments for "3-D rotation without a trackball" en Unfortunately, there is no http://www.sunsetlakesoftware.com/2008/10/22/3-d-rotation-without-trackball#comment-1166 <p>Unfortunately, there is no good way that anyone has found for capturing a 3-D transformation in Core Animation without using the private UIGetScreenImage(). It's a frequent question on Stack Overflow, and I've not seen a solution for it.</p> <p>File an enhancement request for this functionality and maybe Apple will add it in the next SDK version.</p> pubDate Fri, 27 Jan 2012 15:15:41 +0000 dc:creator Brad Larson guid false comment 1166 at http://www.sunsetlakesoftware.com One problem that after I few http://www.sunsetlakesoftware.com/2008/10/22/3-d-rotation-without-trackball#comment-1162 <p>One problem that after I few days I haven't been able to come up with a solution.</p> <p>When using this technique, I can find literally no way to properly capture the screen as a UIImage, the CATransform3D is not applied by renderInContext, so it's all flat. </p> <p>Any ideas? There must be a way besides rewriting my app in OpenGl, especially because using UIGetScreenImage() to take an image of CATransform3D works like a charm.</p> pubDate Thu, 26 Jan 2012 20:32:12 +0000 dc:creator Tj Fallon guid false comment 1162 at http://www.sunsetlakesoftware.com Hi , if i wanna make the http://www.sunsetlakesoftware.com/2008/10/22/3-d-rotation-without-trackball#comment-810 <p>Hi , if i wanna make the sides clickable and on tapping of the user i open a new view relative to the side he tapped on . what should i do ?</p> pubDate Wed, 06 Oct 2010 09:25:48 +0000 dc:creator belhaouary guid false comment 810 at http://www.sunsetlakesoftware.com Hi I was playing with the http://www.sunsetlakesoftware.com/2008/10/22/3-d-rotation-without-trackball#comment-460 <p>Hi</p> <p>I was playing with the pinch example and noticed a bug. If you pinch and bring them toward the center and then continue the motion the image will disappear. The problem is the calculated distance becomes negative. I made this change to line 129 or MyView.m to fix it. Basically I take the absolute value of the calculation and feed that to sqrt.</p> <p><div class="geshifilter"><pre class="geshifilter-cocoa"> return (sqrt(abs((point1.x - point2.x) * (point1.x - point2.x) + (point1.y - point2.y) * (point1.y - point2.y))));</pre></div></p> <p> Great example! Keep up the good work.</p> pubDate Wed, 09 Sep 2009 00:32:41 +0000 dc:creator Cooper Harris guid false comment 460 at http://www.sunsetlakesoftware.com Here is the version of http://www.sunsetlakesoftware.com/2008/10/22/3-d-rotation-without-trackball#comment-369 <p><a href="http://www.sunsetlakesoftware.com/sites/default/files/Molecules-07012009.zip" rel="nofollow">Here</a> is the version of Molecules that I've been porting to iPhone OS 3.0. It includes the CATransform3D logic in its rotation, scaling, and translation code. I'm sorry that I got a little sidetracked with other things and haven't updated the application yet.</p> pubDate Fri, 10 Jul 2009 18:09:25 +0000 dc:creator Brad Larson guid false comment 369 at http://www.sunsetlakesoftware.com the point is that usually http://www.sunsetlakesoftware.com/2008/10/22/3-d-rotation-without-trackball#comment-368 <p>the point is that usually translation and rotation is allways done from the original perspective as a starting point...(if I am not mistaken-&gt; still a beginner in OpenGL)<br /> now, when you replace the modelview matrix (by glLoadMatrixx(currentModelViewMatrix);) at each frame and do a incremental translate/rotate this implies that you lose your original orientation and hence do not know where to go with a translate once one rotation has been applied</p> <p>would be interesting how you solved that problem...the molecules code of dec08 does not use the CATransform3D mechanism as far as i can see.</p> pubDate Fri, 10 Jul 2009 09:11:22 +0000 dc:creator Anonymous guid false comment 368 at http://www.sunsetlakesoftware.com can you post the code snipped http://www.sunsetlakesoftware.com/2008/10/22/3-d-rotation-without-trackball#comment-367 <p>can you post the code snipped of the translation?<br /> i had a look at a molecules version (maybe older one?) that did not use the CATransform3D matrix for translation.</p> pubDate Fri, 10 Jul 2009 06:44:53 +0000 dc:creator Anonymous guid false comment 367 at http://www.sunsetlakesoftware.com Yes, it does, but that's the http://www.sunsetlakesoftware.com/2008/10/22/3-d-rotation-without-trackball#comment-365 <p>Yes, it does, but that's the behavior you'd expect. For Molecules, I use this same technique, and let people pan across the 3-D structure. If they go to pan it left, they'll want the model to be displaced left from their current perspective on the object, not the object's original orientation.</p> pubDate Thu, 09 Jul 2009 16:18:15 +0000 dc:creator Brad Larson guid false comment 365 at http://www.sunsetlakesoftware.com I see a problem with this http://www.sunsetlakesoftware.com/2008/10/22/3-d-rotation-without-trackball#comment-364 <p>I see a problem with this technique (Manipulation of a temporary copy of the modelview matrix and overwriting it with the original one @ rendering): Ever used translate and rotate function both with it?<br /> Say ... lets do a translate 180 degrees around the y axis and later on the user wants to move the model to the right. Its moving to the left instead (and vice versa)</p> pubDate Thu, 09 Jul 2009 15:31:41 +0000 dc:creator Anonymous guid false comment 364 at http://www.sunsetlakesoftware.com