diff options
author | Armin Weiss <aw@openoffice.org> | 2006-05-19 08:34:56 +0000 |
---|---|---|
committer | Armin Weiss <aw@openoffice.org> | 2006-05-19 08:34:56 +0000 |
commit | ae23ab2090b1f6899e291c98fd6c1dfd47278bdc (patch) | |
tree | e11134ffeb85632817cbfbd6d63c5667a2f7d25d /drawinglayer/source/primitive3d/sdrprimitive3d.cxx | |
parent | bffc7386ec5082308da11079f15e2fd6ce842fd8 (diff) |
#i39532# smooting of 3d
Diffstat (limited to 'drawinglayer/source/primitive3d/sdrprimitive3d.cxx')
-rw-r--r-- | drawinglayer/source/primitive3d/sdrprimitive3d.cxx | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx index f4326340b3a6..9d3ece4288c1 100644 --- a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrprimitive3d.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:49:08 $ + * last change: $Author: aw $ $Date: 2006-05-19 09:34:56 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -41,6 +41,10 @@ #include <drawinglayer/primitive/sdrattribute.hxx> #endif +#ifndef _BGFX_POLYPOLYGON_B3DPOLYGONTOOLS_HXX +#include <basegfx/polygon/b3dpolypolygontools.hxx> +#endif + ////////////////////////////////////////////////////////////////////////////// namespace drawinglayer @@ -66,6 +70,34 @@ namespace drawinglayer return aUnitRange; } + ::basegfx::B3DRange sdrPrimitive3D::get3DRangeFromSlices(const sliceVector& rSlices, const ::drawinglayer::geometry::viewInformation& rViewInformation) const + { + ::basegfx::B3DRange aRetval; + + if(rSlices.size()) + { + for(sal_uInt32 a(0L); a < rSlices.size(); a++) + { + aRetval.expand(::basegfx::tools::getRange(rSlices[a].getB3DPolyPolygon())); + } + + aRetval.transform(getTransform()); + + if(maSdrLFSAttribute.getLine()) + { + const sdrLineAttribute& rLine = *maSdrLFSAttribute.getLine(); + + if(rLine.isVisible() && !::basegfx::fTools::equalZero(rLine.getWidth())) + { + // expand by hald LineWidth as tube radius + aRetval.grow(rLine.getWidth() / 2.0); + } + } + } + + return aRetval; + } + sdrPrimitive3D::sdrPrimitive3D( const ::basegfx::B3DHomMatrix& rTransform, const ::basegfx::B2DVector& rTextureSize, |