Advertisement
Ember

appp

Dec 14th, 2015
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. Void Testbed::Create()
  2. {
  3.     Resource::Manager* resourceManager = Resource::Manager::Singleton;
  4.     Scene::Manager* sceneManager = Scene::Manager::Singleton;
  5.  
  6.     mModel = resourceManager->GetModel("Primitives/Cube");
  7.     // Create a node and attach the model to it
  8.     mNode = sceneManager->CreateNode();
  9.     mNode->Attachment = mModel.Handle;
  10.  
  11.     // Reset our timer
  12.     mTimer.Reset();
  13. }
  14.  
  15. Void Testbed::Update()
  16. {
  17.     Float time = mTimer.Elapsed(Timer::Seconds);
  18.     // Generate the transforms and constant buffer data
  19.     //Aligned Float4x4 world = Identity(); //To4x4(RotationZ(time * (1 + key->Held('D')))); //To4x4(RotationZ(fmod(ttime * 1.0f, 1.0f) * Pi * 2.0f));
  20.     mNode->Position.xy = Float2(1.0f * cosf(time), 1.0f * sinf(time));
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement