diff options
author | Armin Weiss <aw@openoffice.org> | 2006-06-02 13:12:39 +0000 |
---|---|---|
committer | Armin Weiss <aw@openoffice.org> | 2006-06-02 13:12:39 +0000 |
commit | fd28570ff1f54d3bb9879f0650fb0c308b933c44 (patch) | |
tree | f0001d0507a502c2ab5dcc1bc085d4337bd9eeb0 /drawinglayer/source/primitive3d/transformprimitive3d.cxx | |
parent | d20e799551390411b32c4d398ea0c473af986a63 (diff) |
#i39523# added vector- and transformPrimitive
Diffstat (limited to 'drawinglayer/source/primitive3d/transformprimitive3d.cxx')
-rw-r--r-- | drawinglayer/source/primitive3d/transformprimitive3d.cxx | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/drawinglayer/source/primitive3d/transformprimitive3d.cxx b/drawinglayer/source/primitive3d/transformprimitive3d.cxx new file mode 100644 index 000000000000..7464ea0187fc --- /dev/null +++ b/drawinglayer/source/primitive3d/transformprimitive3d.cxx @@ -0,0 +1,82 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: transformprimitive3d.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: aw $ $Date: 2006-06-02 14:12:39 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef _DRAWINGLAYER_PRIMITIVE3D_TRANSFORMPRIMITIVE3D_HXX +#include <drawinglayer/primitive3d/transformprimitive3d.hxx> +#endif + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace primitive + { + transformPrimitive3D::transformPrimitive3D(const ::basegfx::B3DHomMatrix& rTransformation, const primitiveVector& rPrimitiveVector) + : vectorPrimitive(rPrimitiveVector), + maTransformation(rTransformation) + { + } + + transformPrimitive3D::~transformPrimitive3D() + { + } + + bool transformPrimitive3D::operator==(const basePrimitive& rPrimitive) const + { + if(vectorPrimitive::operator==(rPrimitive)) + { + const transformPrimitive3D& rCompare = static_cast< const transformPrimitive3D& >(rPrimitive); + return (maTransformation == rCompare.maTransformation); + } + + return false; + } + + PrimitiveID transformPrimitive3D::getID() const + { + return CreatePrimitiveID('T', 'R', 'N', '3'); + } + + ::basegfx::B3DRange transformPrimitive3D::get3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const + { + ::basegfx::B3DRange aRetval(::drawinglayer::primitive::get3DRangeFromVector(maPrimitiveVector, rViewInformation)); + aRetval.transform(maTransformation); + return aRetval; + } + } // end of namespace primitive +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// eof |