Commit 28039ec65a1a8eb7517efb43f4ad870bb191fde6

Authored by David Steele
1 parent d95db4f5

Removed model loading from example code

Change-Id: Ie3cd0acb8a80f1768d7334fc6965e8fb007d54f4
Signed-off-by: David Steele <david.steele@partner.samsung.com>
examples/new-window/new-window-example.cpp
... ... @@ -26,7 +26,6 @@ class NewWindowController;
26 26  
27 27 namespace
28 28 {
29   -const char * gModelFile = DALI_MODEL_DIR "AlbumCute.dali-bin";
30 29 const char * const BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-2.jpg" );
31 30 const char * const TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" );
32 31 const char * const LOSE_CONTEXT_IMAGE( DALI_IMAGE_DIR "icon-cluster-wobble.png" );
... ... @@ -70,8 +69,6 @@ public:
70 69 void CreateBubbles(Vector2 stageSize);
71 70 void CreateBlending();
72 71 void CreateText();
73   - void CreateModel();
74   - void OnModelLoaded(Model model);
75 72 bool OnTrackTimerTick();
76 73 bool OnExplodeTimerTick();
77 74 void SetUpAnimation( Vector2 emitPosition, Vector2 direction );
... ... @@ -82,18 +79,14 @@ public:
82 79  
83 80 private:
84 81 Application mApplication;
85   - Animation mModelAnimation;
86   - Actor mModelActor;
87 82 Actor mCastingLight;
88 83 TextActor mTextActor;
89 84 ImageActor mImageActor;
90 85 ImageActor mBlendActor;
91 86 Image mEffectImage;
92 87 Image mBaseImage;
93   - LightActor mKeyLightActor;
94 88 MeshActor mMeshActor;
95 89 MeshActor mAnimatedMeshActor;
96   - Model mModel;
97 90  
98 91 Toolkit::View mView; ///< The View instance.
99 92 Toolkit::ToolBar mToolBar; ///< The View's Toolbar.
... ... @@ -176,7 +169,6 @@ void NewWindowController::Create( Application&amp; app )
176 169 CreateMeshActor();
177 170 CreateBlending();
178 171 CreateText();
179   - CreateModel();
180 172  
181 173 stage.ContextLostSignal().Connect(this, &NewWindowController::OnContextLost);
182 174 stage.ContextRegainedSignal().Connect(this, &NewWindowController::OnContextRegained);
... ... @@ -423,58 +415,6 @@ Mesh NewWindowController::CreateMesh(bool hasColor, Material material)
423 415 return mesh;
424 416 }
425 417  
426   -void NewWindowController::CreateModel()
427   -{
428   - mModel = Model::New(gModelFile);
429   - mModel.LoadingFinishedSignal().Connect(this, &NewWindowController::OnModelLoaded);
430   -
431   - //Create a Key light
432   - Light keylight = Light::New("KeyLight");
433   - keylight.SetFallOff(Vector2(10000.0f, 10000.0f));
434   -
435   - mCastingLight = Actor::New();
436   - mCastingLight.SetParentOrigin(ParentOrigin::CENTER);
437   - mCastingLight.SetAnchorPoint(AnchorPoint::CENTER);
438   - mCastingLight.SetPosition( Vector3( 0.0f, 0.0f, 800.0f ) );
439   - mContentLayer.Add( mCastingLight );
440   -
441   - mKeyLightActor = LightActor::New();
442   - mKeyLightActor.SetParentOrigin(ParentOrigin::CENTER);
443   - mKeyLightActor.SetName(keylight.GetName());
444   -
445   - //Add all the actors to the stage
446   - mCastingLight.Add(mKeyLightActor);
447   - mKeyLightActor.SetLight(keylight);
448   -}
449   -
450   -void NewWindowController::OnModelLoaded( Model model )
451   -{
452   - if( model.GetLoadingState() == ResourceLoadingSucceeded )
453   - {
454   - std::cout << "Succeeded loading model" << std::endl;
455   - mModelActor = ModelActorFactory::BuildActorTree(mModel, ""); // Gets root actor
456   - mModelActor.SetSize(250.0f, 250.0f);
457   - mModelActor.SetPosition(0.0f, 200.0f, 70.0f);
458   - mModelActor.SetScale(0.5f);
459   - mModelActor.SetRotation(Radian(Math::PI*0.25f), Vector3(1.0, 0.7, 0.0));
460   -
461   - mContentLayer.Add( mModelActor );
462   -
463   - if (mModel.NumberOfAnimations())
464   - {
465   - mModelAnimation = ModelActorFactory::BuildAnimation(mModel, mModelActor, 0);
466   - mModelAnimation.SetDuration(4.0f);
467   - mModelAnimation.SetLooping(true);
468   - mModelAnimation.Play();
469   - }
470   - }
471   - else
472   - {
473   - std::cout << "Failed loading model" << std::endl;
474   - mApplication.Quit();
475   - }
476   -}
477   -
478 418 void NewWindowController::NewWindow(void)
479 419 {
480 420 PositionSize posSize(0, 0, 720, 1280);
... ...