From 7415d3383d9b7e764d248af23869d980a396c766 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Tue, 22 May 2007 18:25:56 +0000 Subject: [PATCH] INTEGRATION: CWS chart2mst3 (1.2.10); FILE MERGED 2006/11/22 17:27:00 iha 1.2.10.3: RESYNC: (1.3-1.4); FILE MERGED 2006/10/18 17:24:22 bm 1.2.10.2: RESYNC: (1.2-1.3); FILE MERGED 2006/09/23 07:47:19 iha 1.2.10.1: apply texture correctly to floor, bottom and 3D lines --- chart2/source/view/main/Stripe.cxx | 57 ++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/chart2/source/view/main/Stripe.cxx b/chart2/source/view/main/Stripe.cxx index 9734280a5204..f60daca04609 100644 --- a/chart2/source/view/main/Stripe.cxx +++ b/chart2/source/view/main/Stripe.cxx @@ -4,9 +4,9 @@ * * $RCSfile: Stripe.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: ihi $ $Date: 2006-11-14 15:36:32 $ + * last change: $Author: vg $ $Date: 2007-05-22 19:25:56 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -74,6 +74,18 @@ Stripe::Stripe( const drawing::Position3D& rPoint1 } +Stripe::Stripe( const drawing::Position3D& rPoint1 + , const drawing::Position3D& rPoint2 + , double fDepth ) + : m_aPoint1(rPoint1) + , m_aPoint2(rPoint2) + , m_aPoint3(rPoint2) + , m_aPoint4(rPoint1) +{ + m_aPoint3.PositionZ += fDepth; + m_aPoint4.PositionZ += fDepth; +} + drawing::Direction3D Stripe::GetDirectionTo4() const { return m_aPoint4-m_aPoint1; @@ -142,7 +154,7 @@ drawing::Direction3D Stripe::getNormal() const return B3DVectorToDirection3D(aNormal); } -uno::Any Stripe::getNormalsPolyPolygonShape3D() const +uno::Any Stripe::getNormalsPolygon() const { drawing::PolyPolygonShape3D aPP; @@ -173,6 +185,45 @@ uno::Any Stripe::getNormalsPolyPolygonShape3D() const return uno::Any( &aPP, ::getCppuType((const drawing::PolyPolygonShape3D*)0) ); } +uno::Any Stripe::getTexturePolygon() const +{ + drawing::PolyPolygonShape3D aPP; + + aPP.SequenceX.realloc(1); + aPP.SequenceY.realloc(1); + aPP.SequenceZ.realloc(1); + + drawing::DoubleSequence* pOuterSequenceX = aPP.SequenceX.getArray(); + drawing::DoubleSequence* pOuterSequenceY = aPP.SequenceY.getArray(); + drawing::DoubleSequence* pOuterSequenceZ = aPP.SequenceZ.getArray(); + + pOuterSequenceX->realloc(4); + pOuterSequenceY->realloc(4); + pOuterSequenceZ->realloc(4); + + double* pInnerSequenceX = pOuterSequenceX->getArray(); + double* pInnerSequenceY = pOuterSequenceY->getArray(); + double* pInnerSequenceZ = pOuterSequenceZ->getArray(); + + *pInnerSequenceX++ = 0.0; + *pInnerSequenceY++ = 0.0; + *pInnerSequenceZ++ = 0.0; + + *pInnerSequenceX++ = 1.0; + *pInnerSequenceY++ = 0.0; + *pInnerSequenceZ++ = 0.0; + + *pInnerSequenceX++ = 1.0; + *pInnerSequenceY++ = 1.0; + *pInnerSequenceZ++ = 0.0; + + *pInnerSequenceX++ = 0.0; + *pInnerSequenceY++ = 1.0; + *pInnerSequenceZ++ = 0.0; + + return uno::Any( &aPP, ::getCppuType((const drawing::PolyPolygonShape3D*)0) ); +} + //............................................................................. } //namespace chart //.............................................................................