fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / svx / sdr / contact / viewcontactofe3dscene.hxx
blobbd5879fc0b9d3cbb4b178b223e63a1d88af9f237
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef _SDR_CONTACT_VIEWCONTACTOFE3DSCENE_HXX
21 #define _SDR_CONTACT_VIEWCONTACTOFE3DSCENE_HXX
23 #include <svx/sdr/contact/viewcontactofsdrobj.hxx>
24 #include <drawinglayer/primitive3d/baseprimitive3d.hxx>
25 #include <drawinglayer/attribute/sdrsceneattribute3d.hxx>
26 #include <drawinglayer/attribute/sdrlightingattribute3d.hxx>
27 #include <drawinglayer/geometry/viewinformation3d.hxx>
28 #include <basegfx/matrix/b2dhommatrix.hxx>
30 //////////////////////////////////////////////////////////////////////////////
31 // predeclarations
33 class E3dScene;
35 namespace basegfx {
36 class B3DRange;
39 //////////////////////////////////////////////////////////////////////////////
41 namespace sdr
43 namespace contact
45 class SVX_DLLPUBLIC ViewContactOfE3dScene : public ViewContactOfSdrObj
47 protected:
48 // Create a Object-Specific ViewObjectContact, set ViewContact and
49 // ObjectContact. Always needs to return something. Default is to create
50 // a standard ViewObjectContact containing the given ObjectContact and *this
51 virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
53 public:
54 // basic constructor, used from SdrObject.
55 explicit ViewContactOfE3dScene(E3dScene& rScene);
57 // access to SdrObject
58 E3dScene& GetE3dScene() const
60 return (E3dScene&)GetSdrObject();
63 // React on changes of the object of this ViewContact
64 virtual void ActionChanged();
66 // access to ViewInformation3D and ObjectTransformation
67 const drawinglayer::geometry::ViewInformation3D& getViewInformation3D(const ::basegfx::B3DRange& rContentRange) const;
68 const drawinglayer::geometry::ViewInformation3D& getViewInformation3D() const;
69 const basegfx::B2DHomMatrix& getObjectTransformation() const;
71 // attribute providers
72 const drawinglayer::attribute::SdrSceneAttribute& getSdrSceneAttribute() const;
73 const drawinglayer::attribute::SdrLightingAttribute& getSdrLightingAttribute() const;
75 // scene primitive creators. If pLayerVisibility is given, a visibility test with the LayerID and the
76 // given SetOfByte is done.
77 drawinglayer::primitive2d::Primitive2DSequence createScenePrimitive2DSequence(const SetOfByte* pLayerVisibility) const;
79 // helpers to get the sequence of all contained 3D primitives and it's range,
80 // regardless of layer or visibility constraints and using a neutral ViewInformation3D
81 drawinglayer::primitive3d::Primitive3DSequence getAllPrimitive3DSequence() const;
82 basegfx::B3DRange getAllContentRange3D() const;
84 protected:
85 // the 3d transformation stack
86 drawinglayer::geometry::ViewInformation3D maViewInformation3D;
88 // the object transformation
89 basegfx::B2DHomMatrix maObjectTransformation;
91 // attributes
92 drawinglayer::attribute::SdrSceneAttribute maSdrSceneAttribute;
93 drawinglayer::attribute::SdrLightingAttribute maSdrLightingAttribute;
95 // create methods for ViewInformation3D and ObjectTransformation
96 void createViewInformation3D(const ::basegfx::B3DRange& rContentRange);
97 void createObjectTransformation();
99 // attribute creators
100 void createSdrSceneAttribute();
101 void createSdrLightingAttribute();
103 // This method is responsible for creating the graphical visualisation data
104 // ONLY based on model data
105 virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
107 } // end of namespace contact
108 } // end of namespace sdr
110 //////////////////////////////////////////////////////////////////////////////
112 #endif //_SDR_CONTACT_VIEWCONTACTOFE3DSCENE_HXX
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */