javauis/amms_qt/mmacontrol/inc/cammslocationcontrol.h
branchRCL_3
changeset 24 0fd27995241b
equal deleted inserted replaced
20:f9bb0fca356a 24:0fd27995241b
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Manipulates the virtual location of an object.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CAMMSLOCATIONCONTROL_H
       
    20 #define CAMMSLOCATIONCONTROL_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <LocationBase.h>
       
    24 #include "cammscontrol.h"
       
    25 
       
    26 // CLASS DECLARATION
       
    27 
       
    28 /**
       
    29 *
       
    30 *  Controls for the Location Control effect.
       
    31 *  This class delegates Location Control effect method calls to
       
    32 *  CSourceLocation or CListenerLocation.
       
    33 *
       
    34 *
       
    35 *  @since 3.0
       
    36 */
       
    37 NONSHARABLE_CLASS(CAMMSLocationControl): public CAMMSControl
       
    38 {
       
    39 public:  // Constructors and destructor
       
    40     /**
       
    41     * Destructor.
       
    42     */
       
    43     ~CAMMSLocationControl();
       
    44 
       
    45 public: // New functions
       
    46     /**
       
    47     * Moves the object to the new location.
       
    48     *
       
    49     * Sets the location using cartesian right-handed coordinates that are
       
    50     * relative to the origin. The measures are defined in units specified
       
    51     * by GlobalManager.getUnitsPerMeter().
       
    52     *
       
    53     * @param aX The x-coordinate of the new location.
       
    54     * @param aY The y-coordinate of the new location.
       
    55     * @param aZ The z-coordinate of the new location.
       
    56     *
       
    57     * @par Leaving:
       
    58     * @li \c KErrArgument - coordinates are not correct.
       
    59     */
       
    60     virtual void SetLocationCartesianL(TInt& aX, TInt& aY, TInt& aZ);
       
    61 
       
    62     /**
       
    63     * Gets the coordinates of the current location. The measures are
       
    64     * defined in units specified by GlobalManager.getUnitsPerMeter(). .
       
    65     *
       
    66     * @param aX The x-coordinate of the location.
       
    67     * @param aY The y-coordinate of the location.
       
    68     * @param aZ The z-coordinate of the location.
       
    69     */
       
    70     virtual void LocationCartesian(TInt& aX, TInt& aY, TInt& aZ);
       
    71 
       
    72     /**
       
    73     * Moves the object to the new location.
       
    74     *
       
    75     * Sets the new location using spherical coordinates. The negative
       
    76     * z-axis is the reference. That is, a location where both azimuth and
       
    77     * elevation are zero, is on the negative z-axis. Radius is defined in
       
    78     * units specified by GlobalManager.getUnitsPerMeter().
       
    79     *
       
    80     * @param aAzimuth The azimuth angle of the new location in degrees. The
       
    81     * azimuth is measured from the negative z-axis in the direction of the
       
    82     * x-axis.
       
    83     * @param aElevation The elevation angle of the new location in degrees.
       
    84     * The elevation is measured from the x-z-plane in the direction of the
       
    85     * y-axis.
       
    86     * @param aRadius The radius of the new location from the origin.
       
    87     *
       
    88     * @par Leaving:
       
    89     * @li \c KErrArgument - \a aRadius < 0.
       
    90     */
       
    91     virtual void SetLocationSphericalL(TInt& aAzimuth, TInt& aElevation,
       
    92                                        TInt& aRadius);
       
    93 
       
    94 protected:
       
    95     /**
       
    96     * C++ default constructor, protected to allow access from derived class
       
    97     * @param aPlayer Player that has this control.
       
    98     */
       
    99     CAMMSLocationControl(CMMAPlayer* aPlayer);
       
   100 
       
   101 protected:  // Data
       
   102 
       
   103     /* Native location effect, set from derived classes */
       
   104     CLocation* iLocationEffect;
       
   105 };
       
   106 
       
   107 #endif // CAMMSLOCATIONCONTROL_H
       
   108 
       
   109