1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFE3D_HXX
21 #define INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFE3D_HXX
23 #include <svx/obj3d.hxx>
24 #include <svx/sdr/contact/viewcontactofsdrobj.hxx>
25 #include <drawinglayer/primitive3d/baseprimitive3d.hxx>
27 namespace drawinglayer
{ namespace attribute
{
28 class SdrLineAttribute
;
36 namespace sdr
{ namespace contact
{
38 class ViewContactOfE3dScene
;
40 class ViewContactOfE3d
: public ViewContactOfSdrObj
43 // Create a Object-Specific ViewObjectContact, set ViewContact and
44 // ObjectContact. Always needs to return something.
45 virtual ViewObjectContact
& CreateObjectSpecificViewObjectContact(ObjectContact
& rObjectContact
) SAL_OVERRIDE
;
48 // basic constructor, used from E3dObject.
49 explicit ViewContactOfE3d(E3dObject
& rObj
);
50 virtual ~ViewContactOfE3d();
52 // access to E3dObject
53 const E3dObject
& GetE3dObject() const
55 return static_cast<const E3dObject
&>(GetSdrObject());
59 drawinglayer::primitive2d::Primitive2DSequence
impCreateWithGivenPrimitive3DSequence(
60 const drawinglayer::primitive3d::Primitive3DSequence
& rxContent3D
) const;
66 // Primitive3DSequence of the ViewContact. This contains all necessary information
67 // for the graphical visualisation and needs to be supported by all 3D VCs which
68 // can be visualized. It does NOT contain the object transformation to be able to
69 // buffer for all possible usages
70 drawinglayer::primitive3d::Primitive3DSequence mxViewIndependentPrimitive3DSequence
;
72 // This method is responsible for creating the graphical visualisation data which is
73 // stored in mxViewIndependentPrimitive3DSequence, but without object transformation
74 virtual drawinglayer::primitive3d::Primitive3DSequence
createViewIndependentPrimitive3DSequence() const = 0;
76 // This method is responsible for creating the graphical visualisation data derived ONLY from
77 // the model data. The default implementation will try to create a 3D to 2D embedding (will work
78 // when scene is known) which can then be used for 2D processing concerning ranges
79 virtual drawinglayer::primitive2d::Primitive2DSequence
createViewIndependentPrimitive2DSequence() const SAL_OVERRIDE
;
82 // access to the local primitive without the object's local 3D transform. This is e.g. needed
83 // to get the not-yet transformed BoundVolume for e.g. interactions
84 drawinglayer::primitive3d::Primitive3DSequence
getVIP3DSWithoutObjectTransform() const;
86 // access to the local primitive. This will ensure that the list is
87 // current in comparing the local list content with a fresh created incarnation. It will
88 // use getVIP3DSWithoutObjectTransform and embed to 3d transform primitive when object's
89 // local 3d transform is used
90 drawinglayer::primitive3d::Primitive3DSequence
getViewIndependentPrimitive3DSequence() const;
97 #endif // INCLUDED_SVX_SDR_CONTACT_VIEWCONTACTOFE3D_HXX
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */