uifw/ganes/inc/HgVgConstants.h
changeset 47 2f0c06423c72
parent 46 0e1e0022bd03
child 53 3c67ea82fafc
equal deleted inserted replaced
46:0e1e0022bd03 47:2f0c06423c72
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:     
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HGVGCONSTANTS_H_
       
    19 #define HGVGCONSTANTS_H_
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 
       
    24 namespace HgVgConstants
       
    25     {
       
    26 
       
    27     // maximum velocity of the spring (max velocity of view movement)
       
    28     const TReal KMaxSpringVelocity(300.0f);
       
    29     
       
    30     //
       
    31     const TReal KSpringVelocityToAnimationFactor(20.0f);
       
    32 
       
    33 
       
    34     // maximum quads in coverflow
       
    35     const TInt KMaxCoversVisible(17);
       
    36     
       
    37     // selected item index
       
    38     const TInt KSelectedItemIndex(8);
       
    39 
       
    40     // 
       
    41     const TReal KMinFlickSpeed(0.5f);
       
    42 
       
    43     const TInt KViewScrollingUpdateInterval( 16000 ); // > ~60 fps
       
    44     
       
    45     // The amound of pixels one item (virtually) takes on the screen (if you think coverflow as uniform list)
       
    46     const TReal KRowHeight(1.0f);
       
    47     const TInt KRowHeightStep(10);
       
    48     
       
    49     // PI
       
    50     const TReal PI(3.1415926535897932f);
       
    51 
       
    52     // Spring constant
       
    53     const TReal KSpringK(35.0f);
       
    54     
       
    55     // Spring damping
       
    56     const TReal KSpringDamping(11.0f);
       
    57     
       
    58     // maximum distance from target to snap 
       
    59     const TReal KPositionSnap(0.02);
       
    60     
       
    61     // maximum speed where to snap to item
       
    62     const TReal KMinSpringVelocity(0.05);
       
    63     
       
    64     // how far user must have dragged an item before 
       
    65     // we move to next item when user has stopped dragging gesture.
       
    66     const TReal KDragForwardThreshold(0.2f);
       
    67     
       
    68     // how many albums it is threoretically possible to go forward/backward
       
    69     // if the distance of a drag is fullscreen in length
       
    70     const TReal KItemsToDragOnFullScreenDrag(5.0f);
       
    71     
       
    72     // Physics update timestep
       
    73     const TReal KTimeStep(0.01f); // we update physics 100 fps
       
    74     
       
    75     // Width of one quad in 3d space
       
    76     const TReal KWorldQuadWidth(1);
       
    77     
       
    78     // size of default icon in pixels
       
    79     const TInt KDefaultIconWidth(240);
       
    80     const TInt KDefaultIconHeight(240);
       
    81     
       
    82     // duration of album cover flip selection animation
       
    83     const TInt KSelectionAnimationDuration(400000); // 0.4 seconds
       
    84     
       
    85     // EGL surface bits
       
    86     const TInt KSurfaceRedBits(8);
       
    87     const TInt KSurfaceGreenBits(8);
       
    88     const TInt KSurfaceBlueBits(8);
       
    89     const TInt KSurfaceAlphaBits(8);
       
    90     
       
    91     // used for conversions
       
    92     const TInt KOneSecondInMicroSeconds(1000000);
       
    93     // how long a flick gesture can tage before it is interpreted as dragging only
       
    94     const TInt KMaxFlickDuration(200000); // 2 ms
       
    95     // how long it user must press to move one index further
       
    96     const TInt KKeyPressDuration(800000);
       
    97     // factor used for converting swipe speed to view movement
       
    98     const TReal KSwipeSpeedFactor(0.4f);
       
    99     
       
   100     // Camera rotation factor to use in animation
       
   101     // when swiping
       
   102     const TReal KCameraRotationFactor(PI/8.0f);
       
   103     
       
   104     // zooming factor to use in animation
       
   105     const TReal KCameraZoomFactor(0);
       
   106     
       
   107     const TInt KLetterPopupSizeX(128);
       
   108     const TInt KLetterPopupSizeY(128);
       
   109     const TInt KLetterPopupFontSize(100);
       
   110     const TReal KMaxLetterPopupOpacity(0.85);
       
   111         
       
   112     const TReal KZOffset(1.0f);
       
   113 
       
   114     const TInt KMediaWallKeyScrollingUpdateInterval( 50000 );
       
   115     
       
   116     
       
   117     const TInt KGridRowCount(3);
       
   118     
       
   119     const TReal KGridFlipAngle(PI * 2);
       
   120     
       
   121     const TReal KSpaceBetweenGridItems(0.02f);
       
   122     
       
   123     const TReal KDefaultBlurDeviation(4);
       
   124     }
       
   125 
       
   126 #endif /* HGVGCONSTANTS */