1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _CHART_STRIPE_HXX 28 #define _CHART_STRIPE_HXX 29 30 #include <com/sun/star/drawing/Position3D.hpp> 31 #include <com/sun/star/drawing/Direction3D.hpp> 32 #include <com/sun/star/uno/Any.h> 33 34 //............................................................................. 35 namespace chart 36 { 37 //............................................................................. 38 39 //----------------------------------------------------------------------------- 40 /** A Stripe represents a 2 dimensional foursquare plane in a 3 dimaensional room. 41 42 @todo could: it is not necessary to have 4 point members here; it would be sufficient to have one point and 2 directions 43 */ 44 45 class Stripe 46 { 47 public: 48 Stripe( const ::com::sun::star::drawing::Position3D& rPoint1 49 , const ::com::sun::star::drawing::Direction3D& rDirectionToPoint2 50 , const ::com::sun::star::drawing::Direction3D& rDirectionToPoint4 ); 51 52 Stripe( const ::com::sun::star::drawing::Position3D& rPoint1 53 , const ::com::sun::star::drawing::Position3D& rPoint2 54 , double fDepth ); 55 56 Stripe( const ::com::sun::star::drawing::Position3D& rPoint1 57 , const ::com::sun::star::drawing::Position3D& rPoint2 58 , const ::com::sun::star::drawing::Position3D& rPoint3 59 , const ::com::sun::star::drawing::Position3D& rPoint4 ); 60 61 void SetManualNormal( const ::com::sun::star::drawing::Direction3D& rNormal ); 62 ::com::sun::star::drawing::Direction3D getNormal() const; 63 64 void InvertNormal( bool bInvertNormal ); 65 66 ::com::sun::star::uno::Any getPolyPolygonShape3D() const; 67 ::com::sun::star::uno::Any getNormalsPolygon() const; 68 ::com::sun::star::uno::Any getTexturePolygon( short nRotatedTexture ) const; //0 to 7 are the different possibilities 69 70 ::com::sun::star::drawing::Position3D GetPosition1() const { return m_aPoint1; } 71 ::com::sun::star::drawing::Position3D GetPosition2() const { return m_aPoint2; } 72 ::com::sun::star::drawing::Position3D GetPosition3() const { return m_aPoint3; } 73 ::com::sun::star::drawing::Position3D GetPosition4() const { return m_aPoint4; } 74 75 private: 76 ::com::sun::star::drawing::Position3D m_aPoint1; 77 ::com::sun::star::drawing::Position3D m_aPoint2; 78 ::com::sun::star::drawing::Position3D m_aPoint3; 79 ::com::sun::star::drawing::Position3D m_aPoint4; 80 81 bool m_bInvertNormal; 82 bool m_bManualNormalSet; 83 ::com::sun::star::drawing::Direction3D m_aManualNormal; 84 }; 85 86 //............................................................................. 87 } //namespace chart 88 //............................................................................. 89 #endif 90