Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.30 (FreeBSD)
File Line Function
/global.php 94 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 550 - File: global.php PHP 8.1.30 (FreeBSD)
File Line Function
/global.php 550 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.1.30 (FreeBSD)
File Line Function
/global.php 811 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.1.30 (FreeBSD)
File Line Function
/global.php 811 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined variable $awaitingusers - Line: 26 - File: global.php(872) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/global.php(872) : eval()'d code 26 errorHandler->error
/global.php 872 eval
/showthread.php 28 require_once
Warning [2] Undefined array key 1 - Line: 1449 - File: inc/functions.php PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions.php 1449 errorHandler->error
/inc/functions.php 1414 fetch_forum_permissions
/inc/functions.php 2953 forum_permissions
/showthread.php 657 build_forum_jump
Warning [2] Undefined array key "mybb" - Line: 1997 - File: inc/functions.php PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions.php 1997 errorHandler->error
/inc/functions_indicators.php 41 my_set_array_cookie
/showthread.php 665 mark_thread_read
Warning [2] Undefined variable $postsdone - Line: 901 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 901 errorHandler->error
Warning [2] Undefined array key 401 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 402 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 403 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 404 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 405 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 407 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 409 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 410 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 411 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 412 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 413 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 417 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 418 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 421 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 423 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 424 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 428 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 429 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 430 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 431 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 404 - Line: 1630 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 1630 errorHandler->error
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 919 buildtree
Warning [2] Undefined array key 409 - Line: 1630 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 1630 errorHandler->error
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 919 buildtree
Warning [2] Undefined array key 412 - Line: 1630 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 1630 errorHandler->error
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 919 buildtree
Warning [2] Undefined array key 431 - Line: 1630 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 1630 errorHandler->error
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 919 buildtree
Warning [2] Undefined array key "additionalgroups" - Line: 7360 - File: inc/functions.php PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions.php 7360 errorHandler->error
/inc/functions_user.php 813 is_member
/inc/functions_post.php 416 purgespammer_show
/showthread.php 920 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(484) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions_post.php(484) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 484 eval
/showthread.php 920 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 672 - File: inc/functions_post.php PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions_post.php 672 errorHandler->error
/showthread.php 920 build_postbit
Warning [2] Undefined array key "showimages" - Line: 757 - File: inc/functions_post.php PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions_post.php 757 errorHandler->error
/showthread.php 920 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 762 - File: inc/functions_post.php PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions_post.php 762 errorHandler->error
/showthread.php 920 build_postbit
Warning [2] Undefined variable $threadnotesbox - Line: 33 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 33 errorHandler->error
/showthread.php 1587 eval
Warning [2] Undefined variable $multipage - Line: 36 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 36 errorHandler->error
/showthread.php 1587 eval
Warning [2] Undefined variable $ratethread - Line: 41 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 41 errorHandler->error
/showthread.php 1587 eval
Warning [2] Undefined variable $multipage - Line: 68 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 68 errorHandler->error
/showthread.php 1587 eval
Warning [2] Undefined variable $addremovesubscription - Line: 82 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 82 errorHandler->error
/showthread.php 1587 eval
Warning [2] Undefined variable $usersbrowsing - Line: 92 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 92 errorHandler->error
/showthread.php 1587 eval
Warning [2] Undefined variable $thread_deleted - Line: 107 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 107 errorHandler->error
/showthread.php 1587 eval

Rotating the cube by euler engles, carries the other axes together.
The following warnings occurred:
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.30 (FreeBSD)
File Line Function
/global.php 94 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined array key "lockoutexpiry" - Line: 550 - File: global.php PHP 8.1.30 (FreeBSD)
File Line Function
/global.php 550 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.1.30 (FreeBSD)
File Line Function
/global.php 811 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined array key "avatartype" - Line: 811 - File: global.php PHP 8.1.30 (FreeBSD)
File Line Function
/global.php 811 errorHandler->error
/showthread.php 28 require_once
Warning [2] Undefined variable $awaitingusers - Line: 26 - File: global.php(872) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/global.php(872) : eval()'d code 26 errorHandler->error
/global.php 872 eval
/showthread.php 28 require_once
Warning [2] Undefined array key 1 - Line: 1449 - File: inc/functions.php PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions.php 1449 errorHandler->error
/inc/functions.php 1414 fetch_forum_permissions
/inc/functions.php 2953 forum_permissions
/showthread.php 657 build_forum_jump
Warning [2] Undefined array key "mybb" - Line: 1997 - File: inc/functions.php PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions.php 1997 errorHandler->error
/inc/functions_indicators.php 41 my_set_array_cookie
/showthread.php 665 mark_thread_read
Warning [2] Undefined variable $postsdone - Line: 901 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 901 errorHandler->error
Warning [2] Undefined array key 401 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 402 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 403 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 404 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 405 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 407 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 409 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 410 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 411 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 412 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 413 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 417 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 418 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 421 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 423 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 424 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 428 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 429 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 430 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 431 - Line: 907 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 907 errorHandler->error
Warning [2] Undefined array key 404 - Line: 1630 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 1630 errorHandler->error
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 919 buildtree
Warning [2] Undefined array key 409 - Line: 1630 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 1630 errorHandler->error
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 919 buildtree
Warning [2] Undefined array key 412 - Line: 1630 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 1630 errorHandler->error
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 919 buildtree
Warning [2] Undefined array key 431 - Line: 1630 - File: showthread.php PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php 1630 errorHandler->error
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 1632 buildtree
/showthread.php 919 buildtree
Warning [2] Undefined array key "additionalgroups" - Line: 7360 - File: inc/functions.php PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions.php 7360 errorHandler->error
/inc/functions_user.php 813 is_member
/inc/functions_post.php 416 purgespammer_show
/showthread.php 920 build_postbit
Warning [2] Undefined array key "profilefield" - Line: 6 - File: inc/functions_post.php(484) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions_post.php(484) : eval()'d code 6 errorHandler->error
/inc/functions_post.php 484 eval
/showthread.php 920 build_postbit
Warning [2] Undefined array key "canonlyreplyownthreads" - Line: 672 - File: inc/functions_post.php PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions_post.php 672 errorHandler->error
/showthread.php 920 build_postbit
Warning [2] Undefined array key "showimages" - Line: 757 - File: inc/functions_post.php PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions_post.php 757 errorHandler->error
/showthread.php 920 build_postbit
Warning [2] Undefined array key "showvideos" - Line: 762 - File: inc/functions_post.php PHP 8.1.30 (FreeBSD)
File Line Function
/inc/functions_post.php 762 errorHandler->error
/showthread.php 920 build_postbit
Warning [2] Undefined variable $threadnotesbox - Line: 33 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 33 errorHandler->error
/showthread.php 1587 eval
Warning [2] Undefined variable $multipage - Line: 36 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 36 errorHandler->error
/showthread.php 1587 eval
Warning [2] Undefined variable $ratethread - Line: 41 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 41 errorHandler->error
/showthread.php 1587 eval
Warning [2] Undefined variable $multipage - Line: 68 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 68 errorHandler->error
/showthread.php 1587 eval
Warning [2] Undefined variable $addremovesubscription - Line: 82 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 82 errorHandler->error
/showthread.php 1587 eval
Warning [2] Undefined variable $usersbrowsing - Line: 92 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 92 errorHandler->error
/showthread.php 1587 eval
Warning [2] Undefined variable $thread_deleted - Line: 107 - File: showthread.php(1587) : eval()'d code PHP 8.1.30 (FreeBSD)
File Line Function
/showthread.php(1587) : eval()'d code 107 errorHandler->error
/showthread.php 1587 eval






Rotating the cube by euler engles, carries the other axes together.
#19
Apost 
Hi Flávio,

It looks like you would carry the axis but in fact it is the order of transformations that is the important factor. Keep in mind that the order of transformations is not associative. Let me explain it with a simple example using the example code you have provided.

I’m pressing 8 times the UP ARROW key to rotate the cube by 90° around the X axis (in world space).

Next I am pressing 8 times the RIGHT ARROW key to rotate the cube by 90° around the Y axis (in world space).

Now I’m again pressing two times the UP ARROW key.

What you probably want is that the cube now should again rotate around the X axis (in world space) but what actually happens, is that the cube is rotating around the Z axis (in world space). It looks like the cube has carried its X axis and is rotating around its local model space X axis which is the same direction as world space Z axis.

Now why does this happen? Let’s take a look at your code. You are using two transformation matrices and apply Mx first and My second. Mx rotates the cube around the X axis first and My rotates the cube around the y axis second. If you press the UP ARROW key you just increase the first x axis rotation.

What you want is:
  • ROTATE X 90°
  • ROTATE Y 90°
  • ROTATE X 22.5°

What you do is:
  • ROTATE X 112.5°
  • ROTATE Y 90°

No method can guess that you want to rotate 90x, 90y, 22.5x if you just give two angles 112.5x and 90y. The rotation method you are expecting cannot exist.

To solve the problem you have to apply the delta rotation and not the absolute angle. Here is the needed code change:

void App::ColorCubeLogic::TransformCube(const Logic::IState* state)
{
Graph::Matrix& cubeTransform = mCubeTransform->GetTransform();
//cubeTransform.SetIdentity();

mAngleX = Math::Fmod(mAngleX, Math::TWO_PI);
mAngleY = Math::Fmod(mAngleY, Math::TWO_PI);

Graph::Matrix Mx(Matrix::IDENTITY);
Mx.SetRotationComponentX(mAngleX);
cubeTransform = Mx * cubeTransform;

Graph::Matrix My(Matrix::IDENTITY);
My.SetRotationComponentY(mAngleY);
cubeTransform = My * cubeTransform;

debugMsg += Util::DoubleToString(mAngleX) + " / " +
Util::DoubleToString(mAngleY);
state->SetUserDebugMessage(debugMsg);
}

void App::ColorCubeLogic::OnProcessTick(const Logic::IState* state)
{ 

Logic::IDeviceHandler* deviceHandler = state->GetDeviceHandler();
   mAngleX = 0;
   mAngleY = 0;
if (deviceHandler->WasRawKeyPressed(RAWKEY_UP_ARROW)) {
debugMsg = "Angle X +" + Util::DoubleToString(mSpinSpeed) + "-> ";
mAngleX += mSpinSpeed;
TransformCube(state);
}
else if (deviceHandler->WasRawKeyPressed(RAWKEY_DOWN_ARROW)) {
debugMsg = "Angle X -" + Util::DoubleToString(mSpinSpeed) + "-> ";
mAngleX -= mSpinSpeed;
TransformCube(state);
}
else if (deviceHandler->WasRawKeyPressed(RAWKEY_LEFT_ARROW)) {
debugMsg = "Angle Y -" + Util::DoubleToString(mSpinSpeed) + "-> ";
mAngleY -= mSpinSpeed;
TransformCube(state);
}
else if (deviceHandler->WasRawKeyPressed(RAWKEY_RIGHT_ARROW)) {
debugMsg = "Angle Y +" + Util::DoubleToString(mSpinSpeed) + "-> ";
mAngleY += mSpinSpeed;
TransformCube(state);
}
}


I hope that addresses your problem.
Best regard, Ketschak
Reply


Messages In This Thread
RE: Rotating the cube axis and not changing the cube angle - by Ketschak - 30 Nov 2015, 12:09

Forum Jump:


Copyright © 2011-2024 Spraylight GmbH.