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 _SDR_CONTACT_VIEWCONTACTOFE3D_HXX
30 : : #define _SDR_CONTACT_VIEWCONTACTOFE3D_HXX
31 : :
32 : : #include <svx/sdr/contact/viewcontactofsdrobj.hxx>
33 : : #include <drawinglayer/primitive3d/baseprimitive3d.hxx>
34 : :
35 : : //////////////////////////////////////////////////////////////////////////////
36 : : // predeclarations
37 : :
38 : : namespace sdr { namespace contact {
39 : : class ViewContactOfE3dScene;
40 : : }}
41 : :
42 : : namespace drawinglayer { namespace attribute {
43 : : class SdrLineAttribute;
44 : : }}
45 : :
46 : : namespace basegfx {
47 : : class BColor;
48 : : class B3DHomMatrix;
49 : : }
50 : :
51 : : class E3dObject;
52 : :
53 : : //////////////////////////////////////////////////////////////////////////////
54 : :
55 : : namespace sdr
56 : : {
57 : : namespace contact
58 : : {
59 : : class ViewContactOfE3d : public ViewContactOfSdrObj
60 : : {
61 : : protected:
62 : : // Create a Object-Specific ViewObjectContact, set ViewContact and
63 : : // ObjectContact. Always needs to return something.
64 : : virtual ViewObjectContact& CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact);
65 : :
66 : : public:
67 : : // basic constructor, used from E3dObject.
68 : : explicit ViewContactOfE3d(E3dObject& rObj);
69 : : virtual ~ViewContactOfE3d();
70 : :
71 : : // access to E3dObject
72 : 97168 : E3dObject& GetE3dObject() const
73 : : {
74 : 97168 : return (E3dObject&)GetSdrObject();
75 : : }
76 : :
77 : : // public helpers
78 : : drawinglayer::primitive2d::Primitive2DSequence impCreateWithGivenPrimitive3DSequence(
79 : : const drawinglayer::primitive3d::Primitive3DSequence& rxContent3D) const;
80 : :
81 : : //////////////////////////////////////////////////////////////////////////////
82 : : // primitive stuff
83 : :
84 : : protected:
85 : : // Primitive3DSequence of the ViewContact. This contains all necessary information
86 : : // for the graphical visualisation and needs to be supported by all 3D VCs which
87 : : // can be visualized. It does NOT contain the object transformation to be able to
88 : : // buffer for all possible usages
89 : : drawinglayer::primitive3d::Primitive3DSequence mxViewIndependentPrimitive3DSequence;
90 : :
91 : : // This method is responsible for creating the graphical visualisation data which is
92 : : // stored in mxViewIndependentPrimitive3DSequence, but without object transformation
93 : : virtual drawinglayer::primitive3d::Primitive3DSequence createViewIndependentPrimitive3DSequence() const = 0;
94 : :
95 : : // This method is responsible for creating the graphical visualisation data derived ONLY from
96 : : // the model data. The default implementation will try to create a 3D to 2D embedding (will work
97 : : // when scene is known) which can then be used for 2D processing concerning ranges
98 : : virtual drawinglayer::primitive2d::Primitive2DSequence createViewIndependentPrimitive2DSequence() const;
99 : :
100 : : public:
101 : : // access to the local primitive without the object's local 3D transform. This is e.g. needed
102 : : // to get the not-yet transformed BoundVolume for e.g. interactions
103 : : drawinglayer::primitive3d::Primitive3DSequence getVIP3DSWithoutObjectTransform() const;
104 : :
105 : : // access to the local primitive. This will ensure that the list is
106 : : // current in comparing the local list content with a fresh created incarnation. It will
107 : : // use getVIP3DSWithoutObjectTransform and embed to 3d transform primitive when object's
108 : : // local 3d transform is used
109 : : drawinglayer::primitive3d::Primitive3DSequence getViewIndependentPrimitive3DSequence() const;
110 : : };
111 : : } // end of namespace contact
112 : : } // end of namespace sdr
113 : :
114 : : //////////////////////////////////////////////////////////////////////////////
115 : :
116 : : #endif //_SDR_CONTACT_VIEWCONTACTOFE3D_HXX
117 : :
118 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|