1 #include <dali-toolkit/dali-toolkit.h>
2 #include <dali/public-api/object/property-map.h>
3 #include <dali-toolkit/public-api/controls/slider/slider.h>
6 using namespace Dali::Toolkit;
11 const char* BUTTON_IMAGE_URL[] =
13 DEMO_IMAGE_DIR "sphere-button.png",
14 DEMO_IMAGE_DIR "cone-button.png",
15 DEMO_IMAGE_DIR "conical-frustrum-button.png",
16 DEMO_IMAGE_DIR "cylinder-button.png",
17 DEMO_IMAGE_DIR "cube-button.png",
18 DEMO_IMAGE_DIR "bevelled-cube-button.png",
19 DEMO_IMAGE_DIR "octahedron-button.png"
22 //Shape property defaults
23 const int DEFAULT_SLICES = 32;
24 const int DEFAULT_STACKS = 32;
25 const float DEFAULT_SCALE_HEIGHT = 16.0f;
26 const float DEFAULT_SCALE_BOTTOM_RADIUS = 8.0f;
27 const float DEFAULT_SCALE_TOP_RADIUS = 4.0f;
28 const float DEFAULT_SCALE_RADIUS = 8.0f;
29 const float DEFAULT_BEVEL_PERCENTAGE = 0.3f;
30 const float DEFAULT_BEVEL_SMOOTHNESS = 0.0f;
32 //Shape property limits
33 const int SLICES_LOWER_BOUND = 3;
34 const int SLICES_UPPER_BOUND = 16;
35 const int STACKS_LOWER_BOUND = 2;
36 const int STACKS_UPPER_BOUND = 16;
38 //Used to the control rate of rotation when panning an object.
39 const float X_ROTATION_DISPLACEMENT_FACTOR = 60.0f;
40 const float Y_ROTATION_DISPLACEMENT_FACTOR = 60.0f;
42 const int NUM_MODELS = 7; //Total number of possible base shapes.
43 const int MAX_PROPERTIES = 3; //Maximum number of properties a shape may require. (For displaying sliders.)
47 class PrimitiveShapesController : public ConnectionTracker
51 PrimitiveShapesController( Application& application )
52 : mApplication( application ),
53 mColor( Vector4( 0.3f, 0.7f, 1.0f, 1.0f ) ),
54 mRotation( Vector2::ZERO )
56 // Connect to the Application's Init signal
57 mApplication.InitSignal().Connect( this, &PrimitiveShapesController::Create );
60 ~PrimitiveShapesController()
64 // The Init signal is received once (only) during the Application lifetime
65 void Create( Application& application )
67 // Get a handle to the stage
68 Stage stage = Stage::GetCurrent();
69 stage.SetBackgroundColor( Color::WHITE );
71 //Set up layer to place UI on.
72 Layer layer = Layer::New();
73 layer.SetParentOrigin( ParentOrigin::CENTER );
74 layer.SetAnchorPoint( AnchorPoint::CENTER );
75 layer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
76 layer.SetBehavior( Layer::LAYER_2D ); //We use a 2D layer as this is closer to UI work than full 3D scene creation.
77 layer.SetDepthTestDisabled( false ); //Enable depth testing, as otherwise the 2D layer would not do so.
80 //Set up model selection buttons.
81 SetupButtons( layer );
83 //Set up model parameter sliders.
84 SetupSliders( layer );
89 //Allow for exiting of the application via key presses.
90 stage.KeyEventSignal().Connect( this, &PrimitiveShapesController::OnKeyEvent );
93 //Place buttons on the top of the screen, which allow for selection of the shape to be displayed.
94 //The buttons are laid out like so:
96 // ^ +--------------------------------+
98 // | | +----+ +----+ +----+ +----+ |
99 // | | | | | | | | | | |
100 // 30% | | +----+ +----+ +----+ +----+ |
102 // | | +----+ +----+ +----+ |
104 // v | +----+ +----+ +----+ |
124 // +--------------------------------+
126 void SetupButtons( Layer layer )
128 float containerPadding = 10.0f;
129 float buttonPadding = 5.0f;
131 //Create a variable-length container that can wrap buttons around as more are added.
132 FlexContainer buttonContainer = FlexContainer::New();
133 buttonContainer.SetParentOrigin( ParentOrigin::TOP_CENTER );
134 buttonContainer.SetAnchorPoint( AnchorPoint::TOP_CENTER );
135 buttonContainer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
136 buttonContainer.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::HEIGHT );
137 buttonContainer.SetSizeModeFactor( Vector3( 0.0, 0.3, 0.0 ) ); //30% of height.
138 buttonContainer.SetPadding( Padding( containerPadding, containerPadding, containerPadding, containerPadding ) );
139 buttonContainer.SetProperty( FlexContainer::Property::FLEX_DIRECTION, FlexContainer::ROW );
140 buttonContainer.SetProperty( FlexContainer::Property::FLEX_WRAP, FlexContainer::WRAP );
142 layer.Add( buttonContainer );
144 //Create buttons and place them in the container.
145 for( int modelNumber = 0; modelNumber < NUM_MODELS; modelNumber++ )
147 PushButton button = Toolkit::PushButton::New();
148 button.SetParentOrigin( ParentOrigin::CENTER );
149 button.SetAnchorPoint( AnchorPoint::CENTER );
150 button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
151 button.SetPadding( Padding( buttonPadding, buttonPadding, buttonPadding, buttonPadding ) );
152 button.SetProperty( Button::Property::UNSELECTED_STATE_IMAGE, Property::Value( BUTTON_IMAGE_URL[modelNumber] ) );
153 button.SetProperty( Button::Property::SELECTED_STATE_IMAGE, Property::Value( BUTTON_IMAGE_URL[modelNumber] ) );
154 button.RegisterProperty( "modelNumber", Property::Value( modelNumber ) );
155 button.ClickedSignal().Connect( this, &PrimitiveShapesController::OnChangeShapeClicked );
157 buttonContainer.Add( button );
161 //Add sliders to the bottom of the screen, which allow for control of shape properties such as radius.
162 //Each slider is placed next to a label that states the property it affects.
163 //The sliders are laid out like so:
165 // +--------------------------------+
185 // ^ | Label +----------O-----------+ |
188 // | | Label +--O-------------------+ |
191 // | | Label +----------------------O |
193 // v +--------------------------------+
195 void SetupSliders( Layer layer )
197 //Create table to hold sliders and their corresponding labels.
198 mSliderTable = Toolkit::TableView::New( MAX_PROPERTIES, 2 );
199 mSliderTable.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
200 mSliderTable.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
201 mSliderTable.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
202 mSliderTable.SetSizeModeFactor( Vector3( 0.9, 0.3, 0.0 ) ); //90% of width, 30% of height.
203 mSliderTable.SetFitWidth( 0 ); //Label column should fit to natural size of label.
204 mSliderTable.SetRelativeWidth( 1, 1.0f ); //Slider column should fill remaining space.
205 mSliderTable.SetCellPadding( Vector2( 10.0f, 0.0f ) ); //Leave a gap between the slider and its label.
206 layer.Add( mSliderTable );
208 //Set up sliders, and place labels next to them.
209 for( int i = 0; i < MAX_PROPERTIES; i++ )
212 Slider slider = Slider::New();
213 slider.SetParentOrigin( ParentOrigin::CENTER );
214 slider.SetAnchorPoint( AnchorPoint::CENTER );
215 slider.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
216 slider.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT );
217 slider.ValueChangedSignal().Connect( this, &PrimitiveShapesController::OnSliderValueChanged );
218 mSliders.push_back( slider );
220 //Setup slider cell properties
221 mSliderTable.AddChild( slider, TableView::CellPosition( i, 1 ) );
222 mSliderTable.SetCellAlignment( TableView::CellPosition( i, 1 ), HorizontalAlignment::CENTER, VerticalAlignment::CENTER );
224 //Create slider label
225 TextLabel sliderLabel = TextLabel::New();
226 sliderLabel.SetParentOrigin( ParentOrigin::CENTER );
227 sliderLabel.SetAnchorPoint( AnchorPoint::CENTER );
228 sliderLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
229 mSliderLabels.push_back( sliderLabel );
231 //Setup slider-label cell properties
232 mSliderTable.AddChild( sliderLabel, TableView::CellPosition( i, 0 ) );
233 mSliderTable.SetCellAlignment( TableView::CellPosition( i, 0 ), HorizontalAlignment::LEFT, VerticalAlignment::CENTER );
237 //Adds a control to the centre of the stage to display the 3D shapes.
238 //The model is placed in the center of the screen, like so:
240 // +--------------------------------+
268 // +--------------------------------+
270 void SetupModel( Layer layer )
272 //Create a container to house the visual-holding actor, to provide a constant hitbox.
273 Actor container = Actor::New();
274 container.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
275 container.SetSizeModeFactor( Vector3( 0.9, 0.3, 0.0 ) ); //90% of width, 30% of height.
276 container.SetParentOrigin( ParentOrigin::CENTER );
277 container.SetAnchorPoint( AnchorPoint::CENTER );
278 layer.Add( container );
280 //Create control to display the 3D primitive.
281 mModel = Control::New();
282 mModel.SetParentOrigin( ParentOrigin::CENTER );
283 mModel.SetAnchorPoint( AnchorPoint::CENTER);
284 mModel.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
285 container.Add( mModel );
287 //Load default shape.
290 //Make model spin to demonstrate 3D.
291 mRotationAnimation = Animation::New(15.0f);
292 mRotationAnimation.AnimateBy( Property( mModel, Actor::Property::ORIENTATION ),
293 Quaternion( Degree( 0.0f ), Degree( 360.0f ), Degree( 0.0f ) ) );
294 mRotationAnimation.SetLooping(true);
295 mRotationAnimation.Play();
297 //Attach gesture detector to pan models when rotated.
298 mPanGestureDetector = PanGestureDetector::New();
299 mPanGestureDetector.Attach( container );
300 mPanGestureDetector.DetectedSignal().Connect( this, &PrimitiveShapesController::OnPan );
303 //Clears all sliders and resets the primitive visual property map.
304 void InitialiseSlidersAndModel()
307 for( unsigned i = 0; i < mSliders.size(); i++ )
309 mSliders.at( i ).SetProperty( Slider::Property::MARKS, Property::Value( 0 ) ); //Remove marks
310 mSliders.at( i ).SetVisible( false );
311 mSliderLabels.at( i ).SetProperty( TextLabel::Property::TEXT, Property::Value( "Default" ) );
312 mSliderLabels.at( i ).SetVisible( false );
315 //Visual map for model
317 mVisualMap[ Visual::Property::TYPE ] = Visual::PRIMITIVE;
318 mVisualMap[ PrimitiveVisual::Property::COLOR ] = mColor;
321 //Sets the 3D model to a sphere and modifies the sliders appropriately.
324 InitialiseSlidersAndModel();
326 //Set up specific visual properties.
327 mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::SPHERE;
328 mVisualMap[ PrimitiveVisual::Property::SLICES ] = DEFAULT_SLICES;
329 mVisualMap[ PrimitiveVisual::Property::STACKS ] = DEFAULT_STACKS;
332 SetupSlider( 0, SLICES_LOWER_BOUND, SLICES_UPPER_BOUND, DEFAULT_STACKS, PrimitiveVisual::Property::SLICES, "slices" );
333 SetupMarks( mSliders.at( 0 ), SLICES_LOWER_BOUND, SLICES_UPPER_BOUND );
334 SetupSlider( 1, STACKS_LOWER_BOUND, STACKS_UPPER_BOUND, DEFAULT_STACKS, PrimitiveVisual::Property::STACKS, "stacks" );
335 SetupMarks( mSliders.at( 1 ), STACKS_LOWER_BOUND, STACKS_UPPER_BOUND );
337 //Set model in control.
338 mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
341 //Sets the 3D model to a cone and modifies the sliders appropriately.
344 InitialiseSlidersAndModel();
346 //Set up specific visual properties.
347 mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::CONE;
348 mVisualMap[ PrimitiveVisual::Property::SCALE_HEIGHT ] = DEFAULT_SCALE_HEIGHT;
349 mVisualMap[ PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS ] = DEFAULT_SCALE_BOTTOM_RADIUS;
350 mVisualMap[ PrimitiveVisual::Property::SLICES ] = DEFAULT_SLICES;
353 SetupSlider( 0, 1.0f, 32.0f, DEFAULT_SCALE_HEIGHT, PrimitiveVisual::Property::SCALE_HEIGHT, "scaleHeight" );
354 SetupSlider( 1, 1.0f, 32.0f, DEFAULT_SCALE_BOTTOM_RADIUS, PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS, "scaleBottomRadius" );
355 SetupSlider( 2, SLICES_LOWER_BOUND, SLICES_UPPER_BOUND, DEFAULT_STACKS, PrimitiveVisual::Property::SLICES, "slices" );
356 SetupMarks( mSliders.at( 2 ), SLICES_LOWER_BOUND, SLICES_UPPER_BOUND );
358 //Set model in control.
359 mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
362 //Sets the 3D model to a conical frustrum and modifies the sliders appropriately.
363 void LoadConicalFrustrum()
365 InitialiseSlidersAndModel();
367 //Set up specific visual properties.
368 mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::CONICAL_FRUSTRUM;
369 mVisualMap[ PrimitiveVisual::Property::SCALE_TOP_RADIUS ] = DEFAULT_SCALE_TOP_RADIUS;
370 mVisualMap[ PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS ] = DEFAULT_SCALE_BOTTOM_RADIUS;
371 mVisualMap[ PrimitiveVisual::Property::SCALE_HEIGHT ] = DEFAULT_SCALE_HEIGHT;
372 mVisualMap[ PrimitiveVisual::Property::SLICES ] = DEFAULT_SLICES;
374 //Set up used sliders.
375 SetupSlider( 0, 1.0f, 32.0f, DEFAULT_SCALE_HEIGHT, PrimitiveVisual::Property::SCALE_HEIGHT, "scaleHeight" );
376 SetupSlider( 1, 0.0f, 32.0f, DEFAULT_SCALE_BOTTOM_RADIUS, PrimitiveVisual::Property::SCALE_BOTTOM_RADIUS, "scaleBottomRadius" );
377 SetupSlider( 2, 0.0f, 32.0f, DEFAULT_SCALE_TOP_RADIUS, PrimitiveVisual::Property::SCALE_TOP_RADIUS, "scaleTopRadius" );
379 //Set model in control.
380 mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
383 //Sets the 3D model to a cylinder and modifies the sliders appropriately.
386 InitialiseSlidersAndModel();
388 //Set up specific visual properties.
389 mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::CYLINDER;
390 mVisualMap[ PrimitiveVisual::Property::SCALE_HEIGHT ] = DEFAULT_SCALE_HEIGHT;
391 mVisualMap[ PrimitiveVisual::Property::SCALE_RADIUS ] = DEFAULT_SCALE_RADIUS;
392 mVisualMap[ PrimitiveVisual::Property::SLICES ] = DEFAULT_SLICES;
394 //Set up used sliders.
395 SetupSlider( 0, 1.0f, 32.0f, DEFAULT_SCALE_HEIGHT, PrimitiveVisual::Property::SCALE_HEIGHT, "scaleHeight" );
396 SetupSlider( 1, 1.0f, 32.0f, DEFAULT_SCALE_RADIUS, PrimitiveVisual::Property::SCALE_RADIUS, "scaleRadius" );
397 SetupSlider( 2, SLICES_LOWER_BOUND, SLICES_UPPER_BOUND, DEFAULT_STACKS, PrimitiveVisual::Property::SLICES, "slices" );
398 SetupMarks( mSliders.at( 2 ), SLICES_LOWER_BOUND, SLICES_UPPER_BOUND );
400 //Set model in control.
401 mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
404 //Sets the 3D model to a cube and modifies the sliders appropriately.
407 InitialiseSlidersAndModel();
409 //Set up specific visual properties.
410 mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::CUBE;
412 //Set model in control.
413 mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
416 //Sets the 3D model to a bevelled cube and modifies the sliders appropriately.
417 void LoadBevelledCube()
419 InitialiseSlidersAndModel();
421 //Set up specific visual properties.
422 mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::BEVELLED_CUBE;
423 mVisualMap[ PrimitiveVisual::Property::BEVEL_PERCENTAGE ] = DEFAULT_BEVEL_PERCENTAGE;
424 mVisualMap[ PrimitiveVisual::Property::BEVEL_SMOOTHNESS ] = DEFAULT_BEVEL_SMOOTHNESS;
426 //Set up used sliders.
427 SetupSlider( 0, 0.0f, 1.0f, DEFAULT_BEVEL_PERCENTAGE, PrimitiveVisual::Property::BEVEL_PERCENTAGE, "bevelPercentage" );
428 SetupSlider( 1, 0.0f, 1.0f, DEFAULT_BEVEL_SMOOTHNESS, PrimitiveVisual::Property::BEVEL_SMOOTHNESS, "bevelSmoothness" );
430 //Set model in control.
431 mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
434 //Sets the 3D model to an octahedron and modifies the sliders appropriately.
435 void LoadOctahedron()
437 InitialiseSlidersAndModel();
439 //Set up specific visual properties.
440 mVisualMap[ PrimitiveVisual::Property::SHAPE ] = PrimitiveVisual::Shape::OCTAHEDRON;
442 //Set model in control.
443 mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
446 //Sets up the slider at the given index for the supplied property, and labels it appropriately.
447 // visualProperty is the property that will be set by this slider.
448 void SetupSlider( int sliderIndex, float lowerBound, float upperBound, float startPoint,
449 Property::Index visualProperty, std::string visualPropertyLabel )
451 //Set up the slider itself.
452 mSliders.at( sliderIndex ).RegisterProperty( "visualProperty", Property::Value( visualProperty ), Property::READ_WRITE );
453 mSliders.at( sliderIndex ).SetProperty( Slider::Property::LOWER_BOUND, Property::Value( lowerBound ) );
454 mSliders.at( sliderIndex ).SetProperty( Slider::Property::UPPER_BOUND, Property::Value( upperBound ) );
455 mSliders.at( sliderIndex ).SetProperty( Slider::Property::VALUE, Property::Value( startPoint ) );
456 mSliders.at( sliderIndex ).SetVisible( true );
458 //Label the slider with the property.
459 //We reset the TextLabel to force a relayout of the table.
460 mSliderTable.RemoveChildAt( TableView::CellPosition(sliderIndex, 0) );
462 TextLabel sliderLabel = TextLabel::New( visualPropertyLabel );
463 sliderLabel.SetParentOrigin( ParentOrigin::CENTER );
464 sliderLabel.SetAnchorPoint( AnchorPoint::CENTER );
465 sliderLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
467 mSliderTable.AddChild( sliderLabel, TableView::CellPosition( sliderIndex, 0 ) );
468 mSliderTable.SetCellAlignment( TableView::CellPosition( sliderIndex, 0 ), HorizontalAlignment::LEFT, VerticalAlignment::CENTER );
470 mSliderLabels.at( sliderIndex ).SetVisible( true );
471 mSliderLabels.at( sliderIndex) = sliderLabel;
474 //Setup snapping to integer values between the two given values.
475 void SetupMarks( Slider& slider, int lower, int upper )
477 Property::Array marks;
479 for( int mark = lower; mark <= upper; mark++ )
481 marks.PushBack( Property::Value( mark ) );
484 slider.SetProperty( Slider::Property::MARKS, Property::Value( marks ) );
485 slider.SetProperty( Slider::Property::SNAP_TO_MARKS, Property::Value( true ) );
488 //When a shape button is tapped, switch to the corresponding shape.
489 bool OnChangeShapeClicked( Button button )
491 //Get the model number from the button.
493 button.GetProperty( button.GetPropertyIndex( "modelNumber" ) ).Get( modelNumber );
495 //Switch to the shape that corresponds to the model number.
496 switch( modelNumber )
510 LoadConicalFrustrum();
538 //When the slider is adjusted, change the corresponding shape property accordingly.
539 bool OnSliderValueChanged( Slider slider, float value )
541 //Update property map to reflect the change to the specific visual property.
543 slider.GetProperty( slider.GetPropertyIndex( "visualProperty" ) ).Get( visualProperty );
544 mVisualMap[ visualProperty ] = value;
546 //Reload the model to display the change.
547 mModel.SetProperty( Control::Property::BACKGROUND, Property::Value( mVisualMap ) );
552 //Panning around the shape rotates it.
553 void OnPan( Actor actor, const PanGesture& gesture )
555 switch( gesture.state )
557 case Gesture::Started:
559 //Pause animation, as the gesture will be used to manually rotate the model
560 mRotationAnimation.Pause();
564 case Gesture::Continuing:
566 //Rotate based off the gesture.
567 mRotation.x -= gesture.displacement.y / X_ROTATION_DISPLACEMENT_FACTOR; // Y displacement rotates around X axis
568 mRotation.y += gesture.displacement.x / Y_ROTATION_DISPLACEMENT_FACTOR; // X displacement rotates around Y axis
569 Quaternion rotation = Quaternion( Radian( mRotation.x ), Vector3::XAXIS) *
570 Quaternion( Radian( mRotation.y ), Vector3::YAXIS);
572 mModel.SetOrientation( rotation );
576 case Gesture::Finished:
578 //Return to automatic animation
579 mRotationAnimation.Play();
583 case Gesture::Cancelled:
585 //Return to automatic animation
586 mRotationAnimation.Play();
597 //If escape or the back button is pressed, quit the application (and return to the launcher)
598 void OnKeyEvent( const KeyEvent& event )
600 if( event.state == KeyEvent::Down )
602 if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) )
610 Application& mApplication;
612 std::vector<Slider> mSliders; ///< Holds the sliders on screen that each shape accesses.
613 std::vector<TextLabel> mSliderLabels; ///< Holds the labels to each slider.
614 TableView mSliderTable; ///< A table to layout the sliders next to their labels.
616 Property::Map mVisualMap; ///< Property map to create a primitive visual.
617 Control mModel; ///< Control to house the primitive visual.
619 PanGestureDetector mPanGestureDetector; ///< Detects pan gestures for rotation of the model.
620 Animation mRotationAnimation; ///< Automatically rotates the model, unless it is being panned.
622 Vector4 mColor; ///< Color to set all shapes.
623 Vector2 mRotation; ///< Keeps track of model rotation.
626 void RunTest( Application& application )
628 PrimitiveShapesController test( application );
630 application.MainLoop();
633 // Entry point for Linux & Tizen applications
635 int main( int argc, char **argv )
637 Application application = Application::New( &argc, &argv );
639 RunTest( application );