uiacceltk/hitchcock/Client/inc/alftransformationsubsession.h
changeset 0 15bf7259bb7c
equal deleted inserted replaced
-1:000000000000 0:15bf7259bb7c
       
     1 /*
       
     2 * Copyright (c) 2006 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:   Sub-session for transformation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef R_ALFTRANSFORMATIONSUBSESSION_H
       
    21 #define R_ALFTRANSFORMATIONSUBSESSION_H
       
    22 
       
    23 #include <e32std.h>
       
    24 #include "alfclient.h"
       
    25 #include "alf/alftransformation.h"
       
    26 
       
    27 /**
       
    28  *  Sub-session for transformation
       
    29  *
       
    30  *  @lib alfclient.lib
       
    31  *  @since S60 v3.2
       
    32  */
       
    33 NONSHARABLE_CLASS( RAlfTransformationSubSession ): public RSubSessionBase 
       
    34     {
       
    35 
       
    36 public:
       
    37 
       
    38     /**
       
    39      * Open subsession for given session.
       
    40      *
       
    41      * @param aSession Used session.
       
    42      * @return Error code.
       
    43      */
       
    44     TInt Open( RAlfClient& aSession );
       
    45     
       
    46     /**
       
    47      *  Closes the subsession.
       
    48      */
       
    49     void Close();
       
    50 
       
    51     /**
       
    52      * Loads transformation identity matrix i.e. reset.
       
    53      */
       
    54     void LoadIdentity();
       
    55     
       
    56     /**
       
    57      * 2D translation.
       
    58      *
       
    59      * @param aX X coordinate.
       
    60      * @param aY Y coordinate.
       
    61      */
       
    62     void Translate( TReal32 aX, TReal32 aY );
       
    63     
       
    64     /**
       
    65      * 2D rotation.
       
    66      *
       
    67      * @param aAngle Rotation angle.
       
    68      */
       
    69     void Rotate( const TAlfTimedValue& aAngle );
       
    70 
       
    71     /**
       
    72      * Returns the number of transform steps in the transformation.
       
    73      */
       
    74     TInt Count() const;
       
    75     
       
    76     /**
       
    77      * Returns the number of non-identity transform steps in the transformation.
       
    78      * Non-identity steps will result in the transformation having an effect
       
    79      * on geometry.
       
    80      */
       
    81     TInt NonIdentityCount() const;
       
    82 
       
    83     /**
       
    84      * Returns a one of the transformation steps so that it 
       
    85      * can be modified and set with SetStep method.
       
    86      *
       
    87      * @param aIndex  Index of the transformation step.
       
    88      *
       
    89      * @return  Transformation step. 
       
    90      */
       
    91     CAlfTransformation::TTransform Step(TInt aIndex);
       
    92 
       
    93     /**
       
    94      * Modifies a one of the transformation steps by replacing
       
    95      * the existing step with a given step.
       
    96      *
       
    97      * @param aIndex  Index of the transformation step to be replaced
       
    98      *
       
    99      * @return  Transformation step. 
       
   100      */
       
   101     void ReplaceStep(TInt aIndex, CAlfTransformation::TTransform aTransformationStep);
       
   102 
       
   103     /**
       
   104      * 3D rotation with timed values.
       
   105      */
       
   106     void Rotate(const TAlfTimedValue& aAngle, 
       
   107                          TReal32 aAxisX, TReal32 aAxisY, TReal32 aAxisZ);
       
   108     
       
   109     /**
       
   110      * 2D translation with timed values.
       
   111      */
       
   112     void Translate(const TAlfTimedValue& aX, const TAlfTimedValue& aY);
       
   113 
       
   114     /**
       
   115      * 3D scaling with timed values.
       
   116      */
       
   117     void Scale(const TAlfTimedValue& aX, const TAlfTimedValue& aY,
       
   118                         const TAlfTimedValue& aZ);
       
   119     };
       
   120 
       
   121 
       
   122 #endif // R_ALFTRANSFORMATIONSUBSESSION_H