LCOV - code coverage report
Current view: top level - include/svx/sdr/contact - viewcontactofe3d.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 2 2 100.0 %
Date: 2014-11-03 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFE3D_HXX
      21             : #define INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFE3D_HXX
      22             : 
      23             : #include <svx/obj3d.hxx>
      24             : #include <svx/sdr/contact/viewcontactofsdrobj.hxx>
      25             : #include <drawinglayer/primitive3d/baseprimitive3d.hxx>
      26             : 
      27             : 
      28             : // predeclarations
      29             : 
      30             : namespace sdr { namespace contact {
      31             :     class ViewContactOfE3dScene;
      32             : }}
      33             : 
      34             : namespace drawinglayer { namespace attribute {
      35             :     class SdrLineAttribute;
      36             : }}
      37             : 
      38             : namespace basegfx {
      39             :     class BColor;
      40             :     class B3DHomMatrix;
      41             : }
      42             : 
      43             : 
      44             : 
      45             : namespace sdr
      46             : {
      47             :     namespace contact
      48             :     {
      49             :         class ViewContactOfE3d : public ViewContactOfSdrObj
      50             :         {
      51             :         protected:
      52             :             // Create a Object-Specific ViewObjectContact, set ViewContact and
      53             :             // ObjectContact. Always needs to return something.
      54             :             virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) SAL_OVERRIDE;
      55             : 
      56             :         public:
      57             :             // basic constructor, used from E3dObject.
      58             :             explicit ViewContactOfE3d(E3dObject& rObj);
      59             :             virtual ~ViewContactOfE3d();
      60             : 
      61             :             // access to E3dObject
      62       65230 :             const E3dObject& GetE3dObject() const
      63             :             {
      64       65230 :                 return static_cast<const E3dObject&>(GetSdrObject());
      65             :             }
      66             : 
      67             :             // public helpers
      68             :             drawinglayer::primitive2d::Primitive2DSequence impCreateWithGivenPrimitive3DSequence(
      69             :                 const drawinglayer::primitive3d::Primitive3DSequence& rxContent3D) const;
      70             : 
      71             : 
      72             :             // primitive stuff
      73             : 
      74             :         protected:
      75             :             // Primitive3DSequence of the ViewContact. This contains all necessary information
      76             :             // for the graphical visualisation and needs to be supported by all 3D VCs which
      77             :             // can be visualized. It does NOT contain the object transformation to be able to
      78             :             // buffer for all possible usages
      79             :             drawinglayer::primitive3d::Primitive3DSequence              mxViewIndependentPrimitive3DSequence;
      80             : 
      81             :             // This method is responsible for creating the graphical visualisation data which is
      82             :             // stored in mxViewIndependentPrimitive3DSequence, but without object transformation
      83             :             virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const = 0;
      84             : 
      85             :             // This method is responsible for creating the graphical visualisation data derived ONLY from
      86             :             // the model data. The default implementation will try to create a 3D to 2D embedding (will work
      87             :             // when scene is known) which can then be used for 2D processing concerning ranges
      88             :             virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE;
      89             : 
      90             :         public:
      91             :             // access to the local primitive without the object's local 3D transform. This is e.g. needed
      92             :             // to get the not-yet transformed BoundVolume for e.g. interactions
      93             :             drawinglayer::primitive3d::Primitive3DSequence getVIP3DSWithoutObjectTransform() const;
      94             : 
      95             :             // access to the local primitive. This will ensure that the list is
      96             :             // current in comparing the local list content with a fresh created incarnation. It will
      97             :             // use getVIP3DSWithoutObjectTransform and embed to 3d transform primitive when object's
      98             :             // local 3d transform is used
      99             :             drawinglayer::primitive3d::Primitive3DSequence getViewIndependentPrimitive3DSequence() const;
     100             :         };
     101             :     } // end of namespace contact
     102             : } // end of namespace sdr
     103             : 
     104             : 
     105             : 
     106             : #endif // INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFE3D_HXX
     107             : 
     108             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10