summaryrefslogtreecommitdiff
path: root/drawinglayer/inc/drawinglayer/primitive3d
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2006-05-12 10:54:47 +0000
committerArmin Weiss <aw@openoffice.org>2006-05-12 10:54:47 +0000
commitc9ea78f03a45dac9b54a7afa33e069be8a290768 (patch)
tree633ef301cf53861c987cbcdcba61d499ef270bfc /drawinglayer/inc/drawinglayer/primitive3d
parentcb7695b1bf4239f9c24e63e52e98b8c5677e6341 (diff)
code changes for primitive support
Diffstat (limited to 'drawinglayer/inc/drawinglayer/primitive3d')
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx88
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx138
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx99
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx101
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx83
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx91
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx116
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx124
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx130
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx103
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx93
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx98
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx238
13 files changed, 1502 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx
new file mode 100644
index 000000000000..28fb22545e44
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: hatchtextureprimitive3d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2006-05-12 11:45:12 $
+ *
+ * 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_HATCHTEXTUREPRIMITIVE3D_HXX
+#define _DRAWINGLAYER_PRIMITIVE3D_HATCHTEXTUREPRIMITIVE3D_HXX
+
+#ifndef _DRAWINGLAYER_PRIMITIVE3D_TEXTUREPRIMITIVE3D_HXX
+#include <drawinglayer/primitive3d/textureprimitive3d.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class hatchTexturePrimitive3D : public texturePrimitive3D
+ {
+ protected:
+ fillHatchAttribute maHatch;
+
+ // create decomposition
+ virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation);
+
+ // helpers
+ void impCreateDecomposition(const primitiveList& rSource, primitiveList& rDest);
+
+ public:
+ hatchTexturePrimitive3D(
+ const fillHatchAttribute& rHatch,
+ const primitiveList& rPrimitiveList,
+ const ::basegfx::B2DVector& rTextureSize,
+ bool bModulate,
+ bool bFilter);
+ virtual ~hatchTexturePrimitive3D();
+
+ // get data
+ const fillHatchAttribute& getHatch() const { return maHatch; }
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+ };
+ } // end of namespace primitive
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // _DRAWINGLAYER_PRIMITIVE3D_HATCHTEXTUREPRIMITIVE3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx
new file mode 100644
index 000000000000..b4d44e28c6df
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx
@@ -0,0 +1,138 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: polygonprimitive3d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2006-05-12 11:45:13 $
+ *
+ * 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_POLYGONPRIMITIVE3D_HXX
+#define _DRAWINGLAYER_PRIMITIVE3D_POLYGONPRIMITIVE3D_HXX
+
+#ifndef _DRAWINGLAYER_PRIMITIVE_PRIMITIVE_HXX
+#include <drawinglayer/primitive/primitive.hxx>
+#endif
+
+#ifndef _BGFX_COLOR_BCOLOR_HXX
+#include <basegfx/color/bcolor.hxx>
+#endif
+
+#ifndef _BGFX_POLYGON_B3DPOLYGON_HXX
+#include <basegfx/polygon/b3dpolygon.hxx>
+#endif
+
+#ifndef _DRAWINGLAYER_PRIMITIVE_STROKEATTRIBUTE_HXX
+#include <drawinglayer/primitive/strokeattribute.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class polygonHairlinePrimitive3D : public basePrimitive
+ {
+ protected:
+ ::basegfx::B3DPolygon maPolygon;
+ ::basegfx::BColor maBColor;
+
+ public:
+ polygonHairlinePrimitive3D(const ::basegfx::B3DPolygon& rPolygon, const ::basegfx::BColor& rBColor);
+ virtual ~polygonHairlinePrimitive3D();
+
+ // get data
+ const ::basegfx::B3DPolygon& getB3DPolygon() const { return maPolygon; }
+ const ::basegfx::BColor& getBColor() const { return maBColor; }
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+
+ // get 3Drange of primitive. Default implementation uses decomposition
+ virtual ::basegfx::B3DRange get3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const;
+
+ // version for 3D geometries, analog to 2d version (see above)
+ virtual void transform(const ::basegfx::B3DHomMatrix& rMatrix);
+ };
+ } // end of namespace primitive
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class polygonStrokePrimitive3D : public basePrimitive
+ {
+ protected:
+ ::basegfx::B3DPolygon maPolygon;
+ strokeAttribute maStrokeAttribute;
+
+ // create decomposition
+ virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation);
+
+ public:
+ polygonStrokePrimitive3D(const ::basegfx::B3DPolygon& rPolygon, const strokeAttribute& rStrokeAttribute);
+ virtual ~polygonStrokePrimitive3D();
+
+ // get data
+ ::basegfx::B3DPolygon getB3DPolygon() const { return maPolygon; }
+ const strokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; }
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+
+ // version for 3D geometries, analog to 2d version (see above)
+ virtual void transform(const ::basegfx::B3DHomMatrix& rMatrix);
+ };
+ } // end of namespace primitive
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // _DRAWINGLAYER_PRIMITIVE_POLYGONPRIMITIVE_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx
new file mode 100644
index 000000000000..1116657a6c9d
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: polygontubeprimitive3d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2006-05-12 11:45:13 $
+ *
+ * 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_POLYGONTUBEPRIMITIVE3D_HXX
+#define _DRAWINGLAYER_PRIMITIVE3D_POLYGONTUBEPRIMITIVE3D_HXX
+
+#ifndef _DRAWINGLAYER_PRIMITIVE3D_POLYGONPRIMITIVE3D_HXX
+#include <drawinglayer/primitive3d/polygonprimitive3d.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace basegfx {
+ class B3DPolyPolygon;
+ class B3DHomMatrix;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class polygonTubePrimitive3D : public polygonHairlinePrimitive3D
+ {
+ protected:
+ double mfRadius;
+ double mfDegreeStepWidth;
+ double mfMiterMinimumAngle;
+ ::basegfx::tools::B2DLineJoin maLineJoin;
+
+ // create decomposition
+ virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation);
+
+ public:
+ polygonTubePrimitive3D(
+ const ::basegfx::B3DPolygon& rPolygon,
+ const ::basegfx::BColor& rBColor,
+ double fRadius, ::basegfx::tools::B2DLineJoin aLineJoin,
+ double fDegreeStepWidth = 10.0 * F_PI180,
+ double fMiterMinimumAngle = 15.0 * F_PI180);
+ virtual ~polygonTubePrimitive3D();
+
+ // get data
+ double getRadius() const { return mfRadius; }
+ double getDegreeStepWidth() const { return mfDegreeStepWidth; }
+ double getMiterMinimumAngle() const { return mfMiterMinimumAngle; }
+ ::basegfx::tools::B2DLineJoin getLineJoin() const { return maLineJoin; }
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+ };
+ } // end of namespace primitive
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // _DRAWINGLAYER_PRIMITIVE3D_POLYGONTUBEPRIMITIVE3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx
new file mode 100644
index 000000000000..6a0bdcf916ff
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx
@@ -0,0 +1,101 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: polypolygonprimitive3d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2006-05-12 11:45:13 $
+ *
+ * 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_POLYPOLYGONPRIMITIVE_HXX
+#define _DRAWINGLAYER_PRIMITIVE3D_POLYPOLYGONPRIMITIVE_HXX
+
+#ifndef _DRAWINGLAYER_PRIMITIVE_PRIMITIVE_HXX
+#include <drawinglayer/primitive/primitive.hxx>
+#endif
+
+#ifndef _DRAWINGLAYER_PRIMITIVE3D_MATERIALATTRIBUTE3D_HXX
+#include <drawinglayer/primitive3d/materialattribute3d.hxx>
+#endif
+
+#ifndef _BGFX_POLYGON_B3DPOLYPOLYGON_HXX
+#include <basegfx/polygon/b3dpolypolygon.hxx>
+#endif
+
+#ifndef _DRAWINGLAYER_PRIMITIVE_TEXTURE_HXX
+#include <drawinglayer/primitive/texture.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class polyPolygonMaterialPrimitive3D : public basePrimitive
+ {
+ protected:
+ ::basegfx::B3DPolyPolygon maPolyPolygon;
+ materialAttribute3D maMaterial;
+
+ // bitfield
+ unsigned mbDoubleSided : 1;
+
+ public:
+ polyPolygonMaterialPrimitive3D(const ::basegfx::B3DPolyPolygon& rPolyPolygon, const materialAttribute3D& rMaterial, bool bDoubleSided);
+ virtual ~polyPolygonMaterialPrimitive3D();
+
+ // get data
+ const ::basegfx::B3DPolyPolygon& getB3DPolyPolygon() const { return maPolyPolygon; }
+ const materialAttribute3D& getMaterial() const { return maMaterial; }
+ bool getDoubleSided() const { return mbDoubleSided; }
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+
+ // get 3Drange of primitive. Default implementation uses decomposition
+ virtual ::basegfx::B3DRange get3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const;
+
+ // version for 3D geometries, analog to 2d version (see above)
+ virtual void transform(const ::basegfx::B3DHomMatrix& rMatrix);
+ };
+ } // end of namespace primitive
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_DRAWINGLAYER_PRIMITIVE3D_POLYPOLYGONPRIMITIVE_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx
new file mode 100644
index 000000000000..96234e6ecb62
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx
@@ -0,0 +1,83 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrcubeprimitive3d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2006-05-12 11:45:13 $
+ *
+ * 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_SDRCUBEPRIMITIVE3D_HXX
+#define _DRAWINGLAYER_PRIMITIVE3D_SDRCUBEPRIMITIVE3D_HXX
+
+#ifndef _DRAWINGLAYER_PRIMITIVE3D_SDRPRIMITIVE3D_HXX
+#include <drawinglayer/primitive3d/sdrprimitive3d.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class sdrCubePrimitive3D : public sdrPrimitive3D
+ {
+ protected:
+ // create decomposition
+ virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation);
+
+ public:
+ sdrCubePrimitive3D(
+ const ::basegfx::B3DHomMatrix& rTransform,
+ const ::basegfx::B2DVector& rTextureSize,
+ const sdrLineFillShadowAttribute& rSdrLFSAttribute,
+ const sdr3DObjectAttribute& rSdr3DObjectAttribute);
+ virtual ~sdrCubePrimitive3D();
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+
+ // get 3D range of primitive.
+ virtual ::basegfx::B3DRange get3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const;
+ };
+ } // end of namespace overlay
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_DRAWINGLAYER_PRIMITIVE3D_SDRCUBEPRIMITIVE3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx
new file mode 100644
index 000000000000..ccc3486d7c4e
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrdecompositiontools3d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2006-05-12 11:45:14 $
+ *
+ * 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_SDRDECOMPOSITIONTOOLS3D_HXX
+#define _DRAWINGLAYER_PRIMITIVE3D_SDRDECOMPOSITIONTOOLS3D_HXX
+
+#include <vector>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+namespace basegfx {
+ class B3DPolygon;
+ class B3DPolyPolygon;
+ class B3DHomMatrix;
+ class B2DVector;
+}
+
+namespace drawinglayer { namespace primitive {
+ class primitiveList;
+ class sdrLineAttribute;
+ class sdrFillAttribute;
+ class sdr3DObjectAttribute;
+ class fillGradientAttribute;
+ class sdrShadowAttribute;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ void add3DPolyPolygonLinePrimitive(
+ const ::basegfx::B3DPolyPolygon& rUnitPolyPolygon,
+ const ::basegfx::B3DHomMatrix& rObjectTransform,
+ primitiveList& rTarget,
+ const sdrLineAttribute& rLine);
+
+ void add3DPolyPolygonFillPrimitive(
+ const ::std::vector< ::basegfx::B3DPolyPolygon >& r3DPolyPolygonVector,
+ const ::basegfx::B3DHomMatrix& rObjectTransform,
+ const ::basegfx::B2DVector& rTextureSize,
+ primitiveList& rTarget,
+ const sdr3DObjectAttribute& aSdr3DObjectAttribute,
+ const sdrFillAttribute& rFill,
+ const fillGradientAttribute* pFillGradient = 0L);
+
+ void addShadowPrimitive3D(
+ primitiveList& rTarget,
+ const sdrShadowAttribute& rShadow,
+ bool bShadow3D);
+ } // end of namespace overlay
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_DRAWINGLAYER_PRIMITIVE3D_SDRDECOMPOSITIONTOOLS3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx
new file mode 100644
index 000000000000..8d5ddd02dd45
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrextrudelathetools3d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2006-05-12 11:45:14 $
+ *
+ * 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_SDREXTRUDELATHETOOLS3D_HXX
+#define _DRAWINGLAYER_PRIMITIVE3D_SDREXTRUDELATHETOOLS3D_HXX
+
+#include <vector>
+
+#ifndef _BGFX_POLYGON_B3DPOLYPOLYGON_HXX
+#include <basegfx/polygon/b3dpolypolygon.hxx>
+#endif
+
+#ifndef _BGFX_POLYPOLYGON_B2DPOLYGONTOOLS_HXX
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ // slice types
+ enum sliceType
+ {
+ SLICETYPE_REGULAR, // normal geoemtry slice
+ SLICETYPE_FRONTCAP, // front cap
+ SLICETYPE_BACKCAP // back cap
+ };
+
+ // class to hold one 3D slice
+ class slice
+ {
+ protected:
+ ::basegfx::B3DPolyPolygon maPolyPolygon;
+ sliceType maSliceType;
+
+ public:
+ slice(const ::basegfx::B2DPolyPolygon& rPolyPolygon, const ::basegfx::B3DHomMatrix& aTransform, sliceType aSliceType = SLICETYPE_REGULAR)
+ : maPolyPolygon(::basegfx::tools::createB3DPolyPolygonFromB2DPolyPolygon(rPolyPolygon)),
+ maSliceType(aSliceType)
+ {
+ maPolyPolygon.transform(aTransform);
+ }
+
+ slice(const ::basegfx::B3DPolyPolygon& rPolyPolygon, sliceType aSliceType = SLICETYPE_REGULAR)
+ : maPolyPolygon(rPolyPolygon),
+ maSliceType(aSliceType)
+ {
+ }
+
+ // data access
+ const ::basegfx::B3DPolyPolygon& getB3DPolyPolygon() const { return maPolyPolygon; }
+ sliceType getSliceType() const { return maSliceType; }
+ };
+
+ // typedef for a group of slices
+ typedef ::std::vector< slice > sliceVector;
+
+ // helpers for creation
+ bool createLatheSlices(sliceVector& rSliceVector, const ::basegfx::B2DPolyPolygon& rSource,
+ double fBackScale, double fDiagonal, double fRotation, sal_uInt32 nSteps,
+ bool bCharacterMode, bool bCloseFront, bool bCloseBack);
+ void createExtrudeSlices(sliceVector& rSliceVector, const ::basegfx::B2DPolyPolygon& rSource,
+ double fBackScale, double fDiagonal, double fDepth,
+ bool bCharacterMode, bool bCloseFront, bool bCloseBack);
+
+ // helpers for geometry extraction
+ void extractLinesFromSlice(::basegfx::B3DPolyPolygon& rLine, const sliceVector& rSliceVector, bool bClosed);
+ void extractPlanesFromSlice(::std::vector< ::basegfx::B3DPolyPolygon >& rFill, const sliceVector& rSliceVector,
+ bool bCreateNormals, bool bSmoothHorizontalNormals, bool bSmoothNormals, bool bSmoothLids, bool bClosed,
+ double fSmoothNormalsMix, double fSmoothLidsMix, bool bCreateTextureCoordinates, const ::basegfx::B2DHomMatrix& rTexTransform);
+
+ } // end of namespace overlay
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_DRAWINGLAYER_PRIMITIVE3D_SDREXTRUDELATHETOOLS3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
new file mode 100644
index 000000000000..7c86df80ec5b
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
@@ -0,0 +1,124 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrextrudeprimitive3d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2006-05-12 11:45:14 $
+ *
+ * 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_SDREXTRUDEPRIMITIVE3D_HXX
+#define _DRAWINGLAYER_PRIMITIVE3D_SDREXTRUDEPRIMITIVE3D_HXX
+
+#ifndef _DRAWINGLAYER_PRIMITIVE3D_SDRPRIMITIVE3D_HXX
+#include <drawinglayer/primitive3d/sdrprimitive3d.hxx>
+#endif
+
+#ifndef _BGFX_POLYGON_B2DPOLYPOLYGON_HXX
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class sdrExtrudePrimitive3D : public sdrPrimitive3D
+ {
+ protected:
+ ::basegfx::B2DPolyPolygon maPolyPolygon;
+ double mfDepth;
+ double mfDiagonal;
+ double mfBackScale;
+
+ // bitfield
+ unsigned mbSmoothNormals : 1; // Plane self
+ unsigned mbSmoothHorizontalNormals : 1; // always
+ unsigned mbSmoothLids : 1; // Front/back
+ unsigned mbCharacterMode : 1;
+ unsigned mbCloseFront : 1;
+ unsigned mbCloseBack : 1;
+
+ // create decomposition
+ virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation);
+
+ public:
+ sdrExtrudePrimitive3D(
+ const ::basegfx::B3DHomMatrix& rTransform,
+ const ::basegfx::B2DVector& rTextureSize,
+ const sdrLineFillShadowAttribute& rSdrLFSAttribute,
+ const sdr3DObjectAttribute& rSdr3DObjectAttribute,
+ const ::basegfx::B2DPolyPolygon& rPolyPolygon,
+ double fDepth,
+ double fDiagonal,
+ double fBackScale,
+ bool bSmoothNormals,
+ bool bSmoothHorizontalNormals,
+ bool bSmoothLids,
+ bool bCharacterMode,
+ bool bCloseFront,
+ bool bCloseBack);
+ virtual ~sdrExtrudePrimitive3D();
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+
+ // get 3D range of primitive.
+ virtual ::basegfx::B3DRange get3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const;
+
+ // data access
+ const ::basegfx::B2DPolyPolygon& getPolyPolygon() const { return maPolyPolygon; }
+ double getDepth() const { return mfDepth; }
+ double getDiagonal() const { return mfDiagonal; }
+ double getBackScale() const { return mfBackScale; }
+ bool getSmoothNormals() const { return mbSmoothNormals; }
+ bool getSmoothHorizontalNormals() const { return mbSmoothHorizontalNormals; }
+ bool getSmoothLids() const { return mbSmoothLids; }
+ bool getCharacterMode() const { return mbCharacterMode; }
+ bool getCloseFront() const { return mbCloseFront; }
+ bool getCloseBack() const { return mbCloseBack; }
+ };
+ } // end of namespace overlay
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_DRAWINGLAYER_PRIMITIVE3D_SDREXTRUDEPRIMITIVE3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
new file mode 100644
index 000000000000..0847550c95bb
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
@@ -0,0 +1,130 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrlatheprimitive3d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2006-05-12 11:45:14 $
+ *
+ * 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_SDRLATHEPRIMITIVE3D_HXX
+#define _DRAWINGLAYER_PRIMITIVE3D_SDRLATHEPRIMITIVE3D_HXX
+
+#ifndef _DRAWINGLAYER_PRIMITIVE3D_SDRPRIMITIVE3D_HXX
+#include <drawinglayer/primitive3d/sdrprimitive3d.hxx>
+#endif
+
+#ifndef _BGFX_POLYGON_B2DPOLYPOLYGON_HXX
+#include <basegfx/polygon/b2dpolypolygon.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class sdrLathePrimitive3D : public sdrPrimitive3D
+ {
+ protected:
+ ::basegfx::B2DPolyPolygon maPolyPolygon;
+ sal_uInt32 mnHorizontalSegments;
+ sal_uInt32 mnVerticalSegments;
+ double mfDiagonal;
+ double mfBackScale;
+ double mfRotation;
+
+ // bitfield
+ unsigned mbSmoothNormals : 1; // Plane self
+ unsigned mbSmoothHorizontalNormals : 1; // always
+ unsigned mbSmoothLids : 1; // Front/back
+ unsigned mbCharacterMode : 1;
+ unsigned mbCloseFront : 1;
+ unsigned mbCloseBack : 1;
+
+ // create decomposition
+ virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation);
+
+ public:
+ sdrLathePrimitive3D(
+ const ::basegfx::B3DHomMatrix& rTransform,
+ const ::basegfx::B2DVector& rTextureSize,
+ const sdrLineFillShadowAttribute& rSdrLFSAttribute,
+ const sdr3DObjectAttribute& rSdr3DObjectAttribute,
+ const ::basegfx::B2DPolyPolygon& rPolyPolygon,
+ sal_uInt32 nHorizontalSegments,
+ sal_uInt32 nVerticalSegments,
+ double fDiagonal,
+ double fBackScale,
+ double fRotation,
+ bool bSmoothNormals,
+ bool bSmoothHorizontalNormals,
+ bool bSmoothLids,
+ bool bCharacterMode,
+ bool bCloseFront,
+ bool bCloseBack);
+ virtual ~sdrLathePrimitive3D();
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+
+ // get 3D range of primitive.
+ virtual ::basegfx::B3DRange get3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const;
+
+ // data access
+ const ::basegfx::B2DPolyPolygon& getPolyPolygon() const { return maPolyPolygon; }
+ sal_uInt32 getHorizontalSegments() const { return mnHorizontalSegments; }
+ sal_uInt32 getVerticalSegments() const { return mnVerticalSegments ; }
+ double getDiagonal() const { return mfDiagonal; }
+ double getBackScale() const { return mfBackScale; }
+ double getRotation() const { return mfRotation; }
+ bool getSmoothNormals() const { return mbSmoothNormals; }
+ bool getSmoothHorizontalNormals() const { return mbSmoothHorizontalNormals; }
+ bool getSmoothLids() const { return mbSmoothLids; }
+ bool getCharacterMode() const { return mbCharacterMode; }
+ bool getCloseFront() const { return mbCloseFront; }
+ bool getCloseBack() const { return mbCloseBack; }
+ };
+ } // end of namespace overlay
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_DRAWINGLAYER_PRIMITIVE3D_SDRLATHEPRIMITIVE3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx
new file mode 100644
index 000000000000..6ca56b460bcf
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrprimitive3d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2006-05-12 11:45:14 $
+ *
+ * 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_SDRPRIMITIVE3D_HXX
+#define _DRAWINGLAYER_PRIMITIVE3D_SDRPRIMITIVE3D_HXX
+
+#ifndef _DRAWINGLAYER_PRIMITIVE_PRIMITIVE_HXX
+#include <drawinglayer/primitive/primitive.hxx>
+#endif
+
+#ifndef _BGFX_MATRIX_B3DHOMMATRIX_HXX
+#include <basegfx/matrix/b3dhommatrix.hxx>
+#endif
+
+#ifndef _DRAWINGLAYER_PRIMITIVE3D_SDRALLATTRIBUTE3D_HXX
+#include <drawinglayer/primitive3d/sdrallattribute3d.hxx>
+#endif
+
+#ifndef _DRAWINGLAYER_PRIMITIVE3D_SDRATTRIBUTE3D_HXX
+#include <drawinglayer/primitive3d/sdrattribute3d.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class sdrPrimitive3D : public basePrimitive
+ {
+ protected:
+ ::basegfx::B3DHomMatrix maTransform;
+ ::basegfx::B2DVector maTextureSize;
+ sdrLineFillShadowAttribute maSdrLFSAttribute;
+ sdr3DObjectAttribute maSdr3DObjectAttribute;
+
+ // Standard implementation for primitive3D which
+ // will use maTransform as range and expand by evtl. line width / 2
+ ::basegfx::B3DRange getStandard3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const;
+
+ public:
+ sdrPrimitive3D(
+ const ::basegfx::B3DHomMatrix& rTransform,
+ const ::basegfx::B2DVector& rTextureSize,
+ const sdrLineFillShadowAttribute& rSdrLFSAttribute,
+ const sdr3DObjectAttribute& rSdr3DObjectAttribute);
+ virtual ~sdrPrimitive3D();
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // data access
+ const ::basegfx::B3DHomMatrix& getTransform() const { return maTransform; }
+ const ::basegfx::B2DVector& getTextureSize() const { return maTextureSize; }
+ const sdrLineFillShadowAttribute& getSdrLFSAttribute() const { return maSdrLFSAttribute; }
+ const sdr3DObjectAttribute getSdr3DObjectAttribute() const { return maSdr3DObjectAttribute; }
+
+ // version for 3D geometries, analog to 2d version (see above)
+ virtual void transform(const ::basegfx::B3DHomMatrix& rMatrix);
+ };
+ } // end of namespace overlay
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_DRAWINGLAYER_PRIMITIVE3D_SDRCUBEPRIMITIVE3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx
new file mode 100644
index 000000000000..6917b49139b7
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrsphereprimitive3d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2006-05-12 11:45:14 $
+ *
+ * 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_SDRSPHEREPRIMITIVE3D_HXX
+#define _DRAWINGLAYER_PRIMITIVE3D_SDRSPHEREPRIMITIVE3D_HXX
+
+#ifndef _DRAWINGLAYER_PRIMITIVE3D_SDRPRIMITIVE3D_HXX
+#include <drawinglayer/primitive3d/sdrprimitive3d.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class sdrSpherePrimitive3D : public sdrPrimitive3D
+ {
+ protected:
+ sal_uInt32 mnHorizontalSegments;
+ sal_uInt32 mnVerticalSegments;
+
+ // create decomposition
+ virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation);
+
+ public:
+ sdrSpherePrimitive3D(
+ const ::basegfx::B3DHomMatrix& rTransform,
+ const ::basegfx::B2DVector& rTextureSize,
+ const sdrLineFillShadowAttribute& rSdrLFSAttribute,
+ const sdr3DObjectAttribute& rSdr3DObjectAttribute,
+ sal_uInt32 nHorizontalSegments, sal_uInt32 nVerticalSegments);
+ virtual ~sdrSpherePrimitive3D();
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+
+ // get 3D range of primitive.
+ virtual ::basegfx::B3DRange get3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const;
+
+ // data access
+ sal_uInt32 getHorizontalSegments() const { return mnHorizontalSegments; }
+ sal_uInt32 getVerticalSegments() const { return mnVerticalSegments ; }
+ };
+ } // end of namespace overlay
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //_DRAWINGLAYER_PRIMITIVE3D_SDRSPHEREPRIMITIVE3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx
new file mode 100644
index 000000000000..e663518c3b65
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx
@@ -0,0 +1,98 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: shadowprimitive3d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2006-05-12 11:45:15 $
+ *
+ * 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_SHADOWPRIMITIVE3D_HXX
+#define _DRAWINGLAYER_PRIMITIVE3D_SHADOWPRIMITIVE3D_HXX
+
+#ifndef _DRAWINGLAYER_PRIMITIVE_LISTPRIMITIVE_HXX
+#include <drawinglayer/primitive/listprimitive.hxx>
+#endif
+
+#ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#endif
+
+#ifndef _BGFX_COLOR_BCOLOR_HXX
+#include <basegfx/color/bcolor.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class shadowPrimitive3D : public listPrimitive
+ {
+ protected:
+ ::basegfx::B2DHomMatrix maShadowTransform;
+ ::basegfx::BColor maShadowColor;
+ double mfShadowTransparence;
+
+ // bitfield
+ unsigned mbShadow3D : 1;
+
+ public:
+ shadowPrimitive3D(
+ const ::basegfx::B2DHomMatrix& rShadowTransform, const ::basegfx::BColor& rShadowColor,
+ double fShadowTransparence, bool bShadow3D, const primitiveList& rPrimitiveList);
+ virtual ~shadowPrimitive3D();
+
+ // get data
+ const ::basegfx::B2DHomMatrix& getShadowTransform() const { return maShadowTransform; }
+ const ::basegfx::BColor& getShadowColor() const { return maShadowColor; }
+ double getShadowTransparence() const { return mfShadowTransparence; }
+ bool getShadow3D() const { return mbShadow3D; }
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+
+ // transformations for different aspects
+ virtual void transform(const ::basegfx::B2DHomMatrix& rMatrix);
+ };
+ } // end of namespace primitive
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // _DRAWINGLAYER_PRIMITIVE3D_SHADOWPRIMITIVE3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx
new file mode 100644
index 000000000000..25cd863958ff
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx
@@ -0,0 +1,238 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: textureprimitive3d.hxx,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: aw $ $Date: 2006-05-12 11:45:15 $
+ *
+ * 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_TEXTUREPRIMITIVE3D_HXX
+#define _DRAWINGLAYER_PRIMITIVE3D_TEXTUREPRIMITIVE3D_HXX
+
+#ifndef _DRAWINGLAYER_PRIMITIVE_LISTPRIMITIVE_HXX
+#include <drawinglayer/primitive/listprimitive.hxx>
+#endif
+
+#ifndef _DRAWINGLAYER_PRIMITIVE_FILLATTRIBUTE_HXX
+#include <drawinglayer/primitive/fillattribute.hxx>
+#endif
+
+#ifndef _DRAWINGLAYER_PRIMITIVE_FILLBITMAPATTRIBUTE_HXX
+#include <drawinglayer/primitive/fillbitmapattribute.hxx>
+#endif
+
+#ifndef _DRAWINGLAYER_PRIMITIVE_PRIMITIVELIST_HXX
+#include <drawinglayer/primitive/primitivelist.hxx>
+#endif
+
+#ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX
+#include <basegfx/matrix/b2dhommatrix.hxx>
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class texturePrimitive3D : public listPrimitive
+ {
+ protected:
+ ::basegfx::B2DVector maTextureSize;
+
+ // bitfield
+ // flag if texture shall be modulated with white interpolated color
+ unsigned mbModulate : 1;
+
+ // flag if texture shall be filtered
+ unsigned mbFilter : 1;
+
+ public:
+ texturePrimitive3D(
+ const primitiveList& rPrimitiveList,
+ const ::basegfx::B2DVector& rTextureSize,
+ bool bModulate,
+ bool bFilter);
+ virtual ~texturePrimitive3D();
+
+ // get data
+ const ::basegfx::B2DVector& getTextureSize() const { return maTextureSize; }
+ bool getModulate() const { return mbModulate; }
+ bool getFilter() const { return mbFilter; }
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+ };
+ } // end of namespace primitive
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class simpleTransparenceTexturePrimitive3D : public texturePrimitive3D
+ {
+ protected:
+ double mfTransparence;
+
+ // create decomposition
+ virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation);
+
+ public:
+ simpleTransparenceTexturePrimitive3D(
+ double fTransparence,
+ const primitiveList& rPrimitiveList);
+ virtual ~simpleTransparenceTexturePrimitive3D();
+
+ // get data
+ double getTransparence() const { return mfTransparence; }
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+ };
+ } // end of namespace primitive
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class gradientTexturePrimitive3D : public texturePrimitive3D
+ {
+ protected:
+ fillGradientAttribute maGradient;
+
+ // create decomposition
+ virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation);
+
+ public:
+ gradientTexturePrimitive3D(
+ const fillGradientAttribute& rGradient,
+ const primitiveList& rPrimitiveList,
+ const ::basegfx::B2DVector& rTextureSize,
+ bool bModulate,
+ bool bFilter);
+ virtual ~gradientTexturePrimitive3D();
+
+ // get data
+ const fillGradientAttribute& getGradient() const { return maGradient; }
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+ };
+ } // end of namespace primitive
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class bitmapTexturePrimitive3D : public texturePrimitive3D
+ {
+ protected:
+ fillBitmapAttribute maBitmap;
+
+ // create decomposition
+ virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation);
+
+ public:
+ bitmapTexturePrimitive3D(
+ const fillBitmapAttribute& rBitmap,
+ const primitiveList& rPrimitiveList,
+ const ::basegfx::B2DVector& rTextureSize,
+ bool bModulate,
+ bool bFilter);
+ virtual ~bitmapTexturePrimitive3D();
+
+ // get data
+ const fillBitmapAttribute& getBitmap() const { return maBitmap; }
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+ };
+ } // end of namespace primitive
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive
+ {
+ class transparenceTexturePrimitive3D : public gradientTexturePrimitive3D
+ {
+ public:
+ transparenceTexturePrimitive3D(
+ const fillGradientAttribute& rGradient,
+ const primitiveList& rPrimitiveList,
+ const ::basegfx::B2DVector& rTextureSize);
+ virtual ~transparenceTexturePrimitive3D();
+
+ // compare operator
+ virtual bool operator==(const basePrimitive& rPrimitive) const;
+
+ // clone operator
+ virtual basePrimitive* createNewClone() const;
+
+ // id generator
+ virtual PrimitiveID getID() const;
+ };
+ } // end of namespace primitive
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif // _DRAWINGLAYER_PRIMITIVE3D_TEXTUREPRIMITIVE3D_HXX
+
+// eof