LCOV - code coverage report
Current view: top level - svx/inc/svx - camera3d.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 5 5 100.0 %
Date: 2012-08-25 Functions: 6 6 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef _CAMERA3D_HXX
      30                 :            : #define _CAMERA3D_HXX
      31                 :            : 
      32                 :            : #include <svx/viewpt3d.hxx>
      33                 :            : #include "svx/svxdllapi.h"
      34                 :            : 
      35                 :            : /*************************************************************************
      36                 :            : |*
      37                 :            : |* Camera derivative
      38                 :            : |*
      39                 :            : \************************************************************************/
      40                 :            : 
      41                 :       7391 : class SVX_DLLPUBLIC Camera3D : public Viewport3D
      42                 :            : {
      43                 :            :  protected:
      44                 :            :     basegfx::B3DPoint   aResetPos;
      45                 :            :     basegfx::B3DPoint   aResetLookAt;
      46                 :            :     double      fResetFocalLength;
      47                 :            :     double      fResetBankAngle;
      48                 :            : 
      49                 :            :     basegfx::B3DPoint   aPosition;
      50                 :            :     basegfx::B3DPoint   aLookAt;
      51                 :            :     double      fFocalLength;
      52                 :            :     double      fBankAngle;
      53                 :            : 
      54                 :            :     bool bAutoAdjustProjection;
      55                 :            : 
      56                 :            :  public:
      57                 :            :     Camera3D(const basegfx::B3DPoint& rPos, const basegfx::B3DPoint& rLookAt,
      58                 :            :              double fFocalLen = 35.0, double fBankAng = 0);
      59                 :            :     Camera3D();
      60                 :            : 
      61                 :            :     void SetDefaults(const basegfx::B3DPoint& rPos, const basegfx::B3DPoint& rLookAt,
      62                 :            :                      double fFocalLen = 35.0, double fBankAng = 0);
      63                 :            : 
      64                 :            :     void SetViewWindow(double fX, double fY, double fW, double fH);
      65                 :            : 
      66                 :            :     void SetPosition(const basegfx::B3DPoint& rNewPos);
      67                 :       2947 :     const basegfx::B3DPoint& GetPosition() const { return aPosition; }
      68                 :            :     void SetLookAt(const basegfx::B3DPoint& rNewLookAt);
      69                 :            :     const basegfx::B3DPoint& GetLookAt() const { return aLookAt; }
      70                 :            :     void SetPosAndLookAt(const basegfx::B3DPoint& rNewPos, const basegfx::B3DPoint& rNewLookAt);
      71                 :            : 
      72                 :            :     // Focal length in mm
      73                 :            :     void    SetFocalLength(double fLen);
      74                 :       2211 :     double  GetFocalLength() const { return fFocalLength; }
      75                 :            : 
      76                 :            :     // Bank angle links/rechts
      77                 :            :     void    SetBankAngle(double fAngle);
      78                 :            :     double  GetBankAngle() const { return fBankAngle; }
      79                 :            : 
      80                 :        736 :     void SetAutoAdjustProjection(bool bAdjust = true)
      81                 :        736 :         { bAutoAdjustProjection = bAdjust; }
      82                 :            :     bool IsAutoAdjustProjection() const { return bAutoAdjustProjection; }
      83                 :            : };
      84                 :            : 
      85                 :            : #endif      // _CAMERA3D_HXX
      86                 :            : 
      87                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10