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 #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE3D_HIDDENGEOMETRYPRIMITIVE3D_HXX 23 #define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_HIDDENGEOMETRYPRIMITIVE3D_HXX 24 25 #include <drawinglayer/drawinglayerdllapi.h> 26 #include <drawinglayer/primitive3d/groupprimitive3d.hxx> 27 28 ////////////////////////////////////////////////////////////////////////////// 29 30 namespace drawinglayer 31 { 32 namespace primitive3d 33 { 34 // This primitive is used to represent geometry for non-visible objects, 35 // e.g. a 3D cube without fill attributes. To still be able to use 36 // primitives for HitTest functionality, the 3d decompositions produce 37 // an as much as possible simplified fill geometry encapsulated in this 38 // primtive when there is no fill geometry. Currently, the 3d hit test 39 // uses only areas, so maybe in a further enchanced version this will change 40 // to 'if neither filled nor lines' creation criteria. The whole primitive 41 // decomposes to nothing, so no one not knowing it will be influenced. Only 42 // helper processors for hit test (and maybe BoundRect extractors) will 43 // use it and it's children subcontent. 44 class DRAWINGLAYER_DLLPUBLIC HiddenGeometryPrimitive3D : public GroupPrimitive3D 45 { 46 public: 47 HiddenGeometryPrimitive3D(const Primitive3DSequence& rChildren); 48 49 // despite returning an empty decomposition since it's no visualisation data, 50 // range calculation is intended to use hidden geometry, so 51 // the local implementation will return the children's range 52 virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; 53 54 /// The default implementation returns an empty sequence 55 virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; 56 57 // provide unique ID 58 DeclPrimitrive3DIDBlock() 59 }; 60 } // end of namespace primitive3d 61 } // end of namespace drawinglayer 62 63 ////////////////////////////////////////////////////////////////////////////// 64 65 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_HIDDENGEOMETRYPRIMITIVE3D_HXX 66 67 ////////////////////////////////////////////////////////////////////////////// 68 // eof 69