1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SDR_CONTACT_VIEWOBJECTCONTACTOFE3D_HXX
25 #define _SDR_CONTACT_VIEWOBJECTCONTACTOFE3D_HXX
26 
27 #include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
28 #include <drawinglayer/primitive3d/baseprimitive3d.hxx>
29 
30 //////////////////////////////////////////////////////////////////////////////
31 // predeclarations
32 
33 namespace sdr { namespace contact {
34 	class ViewObjectContactOfE3dScene;
35 }}
36 
37 //////////////////////////////////////////////////////////////////////////////
38 
39 namespace sdr
40 {
41 	namespace contact
42 	{
43 		class ViewObjectContactOfE3d : public ViewObjectContactOfSdrObj
44 		{
45 		protected:
46 			// Primitive3D sequence of the ViewContact. This contains all necessary information
47 			// for the graphical visualisation and needs to be supported by all VCs which
48 			// can be visualized.
49 			drawinglayer::primitive3d::Primitive3DSequence			mxPrimitive3DSequence;
50 
51 			// This method is responsible for creating the graphical visualisation data which is
52 			// stored/cached in the local primitive. Default gets view-independent Primitive3D
53 			// from the ViewContact using ViewContact::getViewIndependentPrimitive3DSequence(), takes care of
54 			// visibility and ghosted.
55 			// This method will not handle included hierarchies and not check geometric visibility.
56 			drawinglayer::primitive3d::Primitive3DSequence createPrimitive3DSequence(const DisplayInfo& rDisplayInfo) const;
57 
58 			// also overload the 2d method to deliver a 2d object with embedd3d 3d and the 3d transformation which is able to
59 			// answer the get2DRange question accordingly
60 			virtual drawinglayer::primitive2d::Primitive2DSequence createPrimitive2DSequence(const DisplayInfo& rDisplayInfo) const;
61 
62 		public:
63 			ViewObjectContactOfE3d(ObjectContact& rObjectContact, ViewContact& rViewContact);
64 			virtual ~ViewObjectContactOfE3d();
65 
66 			// access to the local primitive sequence. This will ensure that the list is
67 			// current in comparing the local list content with a fresh created incarnation
68 			// This method will not handle included hierarchies or visibility.
69 			drawinglayer::primitive3d::Primitive3DSequence getPrimitive3DSequence(const DisplayInfo& rDisplayInfo) const;
70 		};
71 	} // end of namespace contact
72 } // end of namespace sdr
73 
74 //////////////////////////////////////////////////////////////////////////////
75 
76 #endif //_SDR_CONTACT_VIEWOBJECTCONTACTOFE3D_HXX
77 
78 // eof
79