14f506f19SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
34f506f19SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
44f506f19SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
54f506f19SAndrew Rist  * distributed with this work for additional information
64f506f19SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
74f506f19SAndrew Rist  * to you under the Apache License, Version 2.0 (the
84f506f19SAndrew Rist  * "License"); you may not use this file except in compliance
94f506f19SAndrew Rist  * with the License.  You may obtain a copy of the License at
104f506f19SAndrew Rist  *
114f506f19SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
124f506f19SAndrew Rist  *
134f506f19SAndrew Rist  * Unless required by applicable law or agreed to in writing,
144f506f19SAndrew Rist  * software distributed under the License is distributed on an
154f506f19SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
164f506f19SAndrew Rist  * KIND, either express or implied.  See the License for the
174f506f19SAndrew Rist  * specific language governing permissions and limitations
184f506f19SAndrew Rist  * under the License.
194f506f19SAndrew Rist  *
204f506f19SAndrew Rist  *************************************************************/
214f506f19SAndrew Rist 
224f506f19SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDRSPHEREPRIMITIVE3D_HXX
25cdf0e10cSrcweir #define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDRSPHEREPRIMITIVE3D_HXX
26cdf0e10cSrcweir 
27090f0eb8SEike Rathke #include <drawinglayer/drawinglayerdllapi.h>
28cdf0e10cSrcweir #include <drawinglayer/primitive3d/sdrprimitive3d.hxx>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
31cdf0e10cSrcweir 
32cdf0e10cSrcweir namespace drawinglayer
33cdf0e10cSrcweir {
34cdf0e10cSrcweir 	namespace primitive3d
35cdf0e10cSrcweir 	{
36cdf0e10cSrcweir         /** SdrSpherePrimitive3D class
37cdf0e10cSrcweir 
38cdf0e10cSrcweir             This 3D primitive expands the SdrPrimitive3D to a 3D sphere definition.
39*c47da6eaSmseidel             The sphere is implicitly in unit coordinates and the given transformation
40*c47da6eaSmseidel             defines its geometry in space.
41cdf0e10cSrcweir          */
42090f0eb8SEike Rathke 		class DRAWINGLAYER_DLLPUBLIC SdrSpherePrimitive3D : public SdrPrimitive3D
43cdf0e10cSrcweir 		{
44cdf0e10cSrcweir 		private:
45cdf0e10cSrcweir             /// additional geometry definitions
46cdf0e10cSrcweir 			sal_uInt32									mnHorizontalSegments;
47cdf0e10cSrcweir 			sal_uInt32									mnVerticalSegments;
48cdf0e10cSrcweir 
49cdf0e10cSrcweir 		protected:
50cdf0e10cSrcweir 			/// local decomposition.
51cdf0e10cSrcweir 			virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
52cdf0e10cSrcweir 
53cdf0e10cSrcweir 		public:
54cdf0e10cSrcweir             /// constructor
55cdf0e10cSrcweir 			SdrSpherePrimitive3D(
56cdf0e10cSrcweir 				const basegfx::B3DHomMatrix& rTransform,
57cdf0e10cSrcweir 				const basegfx::B2DVector& rTextureSize,
58cdf0e10cSrcweir 				const attribute::SdrLineFillShadowAttribute3D& rSdrLFSAttribute,
59cdf0e10cSrcweir 				const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute,
60cdf0e10cSrcweir 				sal_uInt32 nHorizontalSegments,
61cdf0e10cSrcweir 				sal_uInt32 nVerticalSegments);
62cdf0e10cSrcweir 
63cdf0e10cSrcweir 			/// data read access
getHorizontalSegments() const64cdf0e10cSrcweir 			sal_uInt32 getHorizontalSegments() const { return mnHorizontalSegments; }
getVerticalSegments() const65cdf0e10cSrcweir 			sal_uInt32 getVerticalSegments() const { return mnVerticalSegments; }
66cdf0e10cSrcweir 
67cdf0e10cSrcweir 			/// compare operator
68cdf0e10cSrcweir 			virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
69cdf0e10cSrcweir 
70cdf0e10cSrcweir 			/// get range
71cdf0e10cSrcweir 			virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
72cdf0e10cSrcweir 
73cdf0e10cSrcweir 			/// provide unique ID
74cdf0e10cSrcweir 			DeclPrimitrive3DIDBlock()
75cdf0e10cSrcweir 		};
76cdf0e10cSrcweir 	} // end of namespace primitive3d
77cdf0e10cSrcweir } // end of namespace drawinglayer
78cdf0e10cSrcweir 
79cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
80cdf0e10cSrcweir 
81cdf0e10cSrcweir #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDRSPHEREPRIMITIVE3D_HXX
82cdf0e10cSrcweir 
83cdf0e10cSrcweir //////////////////////////////////////////////////////////////////////////////
84cdf0e10cSrcweir // eof
85