xref: /aoo42x/main/chart2/source/view/inc/Stripe.hxx (revision de7b3f82)
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 #ifndef _CHART_STRIPE_HXX
24 #define _CHART_STRIPE_HXX
25 
26 #include <com/sun/star/drawing/Position3D.hpp>
27 #include <com/sun/star/drawing/Direction3D.hpp>
28 #include <com/sun/star/uno/Any.h>
29 
30 //.............................................................................
31 namespace chart
32 {
33 //.............................................................................
34 
35 //-----------------------------------------------------------------------------
36 /** A Stripe represents a 2 dimensional foursquare plane in a 3 dimaensional room.
37 
38 @todo could: it is not necessary to have 4 point members here; it would be sufficient to have one point and 2 directions
39 */
40 
41 class Stripe
42 {
43 public:
44     Stripe( const ::com::sun::star::drawing::Position3D& rPoint1
45         , const ::com::sun::star::drawing::Direction3D& rDirectionToPoint2
46         , const ::com::sun::star::drawing::Direction3D& rDirectionToPoint4 );
47 
48     Stripe( const ::com::sun::star::drawing::Position3D& rPoint1
49         , const ::com::sun::star::drawing::Position3D& rPoint2
50         , double fDepth );
51 
52     Stripe( const ::com::sun::star::drawing::Position3D& rPoint1
53         , const ::com::sun::star::drawing::Position3D& rPoint2
54         , const ::com::sun::star::drawing::Position3D& rPoint3
55         , const ::com::sun::star::drawing::Position3D& rPoint4 );
56 
57     void SetManualNormal( const ::com::sun::star::drawing::Direction3D& rNormal );
58     ::com::sun::star::drawing::Direction3D getNormal() const;
59 
60     void InvertNormal( bool bInvertNormal );
61 
62     ::com::sun::star::uno::Any      getPolyPolygonShape3D() const;
63     ::com::sun::star::uno::Any      getNormalsPolygon() const;
64     ::com::sun::star::uno::Any      getTexturePolygon( short nRotatedTexture ) const; //0 to 7 are the different possibilities
65 
GetPosition1() const66     ::com::sun::star::drawing::Position3D GetPosition1() const { return m_aPoint1; }
GetPosition2() const67     ::com::sun::star::drawing::Position3D GetPosition2() const { return m_aPoint2; }
GetPosition3() const68     ::com::sun::star::drawing::Position3D GetPosition3() const { return m_aPoint3; }
GetPosition4() const69     ::com::sun::star::drawing::Position3D GetPosition4() const { return m_aPoint4; }
70 
71 private:
72     ::com::sun::star::drawing::Position3D m_aPoint1;
73     ::com::sun::star::drawing::Position3D m_aPoint2;
74     ::com::sun::star::drawing::Position3D m_aPoint3;
75     ::com::sun::star::drawing::Position3D m_aPoint4;
76 
77     bool m_bInvertNormal;
78     bool m_bManualNormalSet;
79     ::com::sun::star::drawing::Direction3D m_aManualNormal;
80 };
81 
82 //.............................................................................
83 } //namespace chart
84 //.............................................................................
85 #endif
86