<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>NaderElMasry's Feed - Programmer's Heaven</title>
    <link>http://www.programmersheaven.com/feed/User/406408/RSS.aspx</link>
    <description>Events at Programmer's Heaven related to the user NaderElMasry.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Tue, 18 Jun 2013 18:23:11 -0700</pubDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <item>
      <title>how to rotate a cube an efficent rotate ???!!!!!!</title>
      <link>http://www.programmersheaven.com/mb/openGL/414979/414979/ReadMessage.aspx#414979</link>
      <description>&lt;p&gt;Posted a '&lt;a href="http://www.programmersheaven.com/mb/openGL/414979/414979/ReadMessage.aspx#414979"&gt;new message&lt;/a&gt; on the &lt;a href="http://www.programmersheaven.com/mb/openGL/Board.aspx"&gt;OpenGL&lt;/a&gt; forum.&lt;/p&gt;i know that many people may see this topic bit strange,but of course the problem is not to rotate a cube actually.&lt;br /&gt;
&lt;br /&gt;
i made an application to rotate a cube and i know that it is very simple one but the problem that when i rotate the cube it rotate the (X,Y,Z) axis with it !!!!&lt;br /&gt;
u can see it when i rotate the cube with angle 90 around Y-axis then when i rotate around X-axis it rotate around Z-axis because i rotate the axis with the cube ?!!!&lt;br /&gt;
Sample of the Code :&lt;br /&gt;
Gl.glPushMatrix();&lt;br /&gt;
Gl.glScalef(45, 45, 45);&lt;br /&gt;
Gl.glRotatef(cubeAngley, 0, 1, 0);&lt;br /&gt;
Gl.glRotatef(cubeAnglex, 1, 0, 0);&lt;br /&gt;
DrawCube();&lt;br /&gt;
Gl.glPopMatrix();&lt;br /&gt;
&lt;br /&gt;
private void Oglctrl_KeyDown(object sender, KeyEventArgs e)&lt;br /&gt;
{&lt;br /&gt;
// rotating cube&lt;br /&gt;
if (e.KeyCode == Keys.W)&lt;br /&gt;
{&lt;br /&gt;
cubeAnglex -= 5;&lt;br /&gt;
}&lt;br /&gt;
else if (e.KeyCode == Keys.S)&lt;br /&gt;
{&lt;br /&gt;
cubeAnglex += 5;&lt;br /&gt;
}&lt;br /&gt;
else if (e.KeyCode == Keys.A)&lt;br /&gt;
{&lt;br /&gt;
cubeAngley -= 5;&lt;br /&gt;
}&lt;br /&gt;
else if (e.KeyCode == Keys.D)&lt;br /&gt;
{&lt;br /&gt;
cubeAngley += 5;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/openGL/414979/414979/ReadMessage.aspx#414979</guid>
      <pubDate>Sun, 28 Mar 2010 19:16:33 -0700</pubDate>
    </item>
  </channel>
</rss>