summaryrefslogtreecommitdiff
path: root/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2006-08-09 15:51:16 +0000
committerArmin Weiss <aw@openoffice.org>2006-08-09 15:51:16 +0000
commit4d0a693b85b6191d351f7a6bb0e5c30b2e47eca8 (patch)
treece070c550ee0fb8884592d0be883a48de224ad19 /drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
parent73679d08d7072f98065007b7014df46e45e2862e (diff)
#i39532#
Diffstat (limited to 'drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx')
-rw-r--r--drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx228
1 files changed, 119 insertions, 109 deletions
diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
index ffb059cde583..6f470c5870b2 100644
--- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: polygontubeprimitive3d.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: aw $ $Date: 2006-06-02 13:58:02 $
+ * last change: $Author: aw $ $Date: 2006-08-09 16:51:15 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -45,8 +45,8 @@
#include <basegfx/matrix/b3dhommatrix.hxx>
#endif
-#ifndef _DRAWINGLAYER_PRIMITIVE3D_MATERIALATTRIBUTE3D_HXX
-#include <drawinglayer/primitive3d/materialattribute3d.hxx>
+#ifndef _DRAWINGLAYER_ATTRIBUTE_MATERIALATTRIBUTE3D_HXX
+#include <drawinglayer/attribute/materialattribute3d.hxx>
#endif
#ifndef _DRAWINGLAYER_PRIMITIVE3D_POLYPOLYGONPRIMITIVE_HXX
@@ -69,16 +69,18 @@
namespace drawinglayer
{
- namespace primitive
+ namespace primitive3d
{
namespace // anonymous namespace
{
- const primitiveVector& getLineTubeSegments(sal_uInt32 nSegments, const materialAttribute3D& rMaterial)
+ const primitiveVector3D& getLineTubeSegments(
+ sal_uInt32 nSegments,
+ const attribute::materialAttribute3D& rMaterial)
{
// static data for buffered tube primitives
- static primitiveVector aLineTubeList;
+ static primitiveVector3D aLineTubeList;
static sal_uInt32 nLineTubeSegments(0L);
- static materialAttribute3D aLineMaterial;
+ static attribute::materialAttribute3D aLineMaterial;
// may exclusively change static data, use mutex
::osl::Mutex m_mutex;
@@ -92,36 +94,36 @@ namespace drawinglayer
if(0L == aLineTubeList.size() && 0L != nLineTubeSegments)
{
- const ::basegfx::B3DPoint aLeft(0.0, 0.0, 0.0);
- const ::basegfx::B3DPoint aRight(1.0, 0.0, 0.0);
- ::basegfx::B3DPoint aLastLeft(0.0, 1.0, 0.0);
- ::basegfx::B3DPoint aLastRight(1.0, 1.0, 0.0);
- ::basegfx::B3DHomMatrix aRot;
+ const basegfx::B3DPoint aLeft(0.0, 0.0, 0.0);
+ const basegfx::B3DPoint aRight(1.0, 0.0, 0.0);
+ basegfx::B3DPoint aLastLeft(0.0, 1.0, 0.0);
+ basegfx::B3DPoint aLastRight(1.0, 1.0, 0.0);
+ basegfx::B3DHomMatrix aRot;
aRot.rotate(F_2PI / (double)nLineTubeSegments, 0.0, 0.0);
for(sal_uInt32 a(0L); a < nLineTubeSegments; a++)
{
- const ::basegfx::B3DPoint aNextLeft(aRot * aLastLeft);
- const ::basegfx::B3DPoint aNextRight(aRot * aLastRight);
- ::basegfx::B3DPolygon aNewPolygon;
+ const basegfx::B3DPoint aNextLeft(aRot * aLastLeft);
+ const basegfx::B3DPoint aNextRight(aRot * aLastRight);
+ basegfx::B3DPolygon aNewPolygon;
aNewPolygon.append(aNextLeft);
- aNewPolygon.setNormal(0L, ::basegfx::B3DVector(aNextLeft - aLeft));
+ aNewPolygon.setNormal(0L, basegfx::B3DVector(aNextLeft - aLeft));
aNewPolygon.append(aLastLeft);
- aNewPolygon.setNormal(1L, ::basegfx::B3DVector(aLastLeft - aLeft));
+ aNewPolygon.setNormal(1L, basegfx::B3DVector(aLastLeft - aLeft));
aNewPolygon.append(aLastRight);
- aNewPolygon.setNormal(2L, ::basegfx::B3DVector(aLastRight - aRight));
+ aNewPolygon.setNormal(2L, basegfx::B3DVector(aLastRight - aRight));
aNewPolygon.append(aNextRight);
- aNewPolygon.setNormal(3L, ::basegfx::B3DVector(aNextRight - aRight));
+ aNewPolygon.setNormal(3L, basegfx::B3DVector(aNextRight - aRight));
aNewPolygon.setClosed(true);
- const ::basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon);
- basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(aNewPolyPolygon, aLineMaterial, false);
- aLineTubeList.push_back(referencedPrimitive(*pNew));
+ const basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon);
+ basePrimitive3D* pNew = new polyPolygonMaterialPrimitive3D(aNewPolyPolygon, aLineMaterial, false);
+ aLineTubeList.push_back(referencedPrimitive3D(*pNew));
aLastLeft = aNextLeft;
aLastRight = aNextRight;
@@ -131,12 +133,14 @@ namespace drawinglayer
return aLineTubeList;
}
- const primitiveVector& getLineCapSegments(sal_uInt32 nSegments, const materialAttribute3D& rMaterial)
+ const primitiveVector3D& getLineCapSegments(
+ sal_uInt32 nSegments,
+ const attribute::materialAttribute3D& rMaterial)
{
// static data for buffered tube primitives
- static primitiveVector aLineCapList;
+ static primitiveVector3D aLineCapList;
static sal_uInt32 nLineCapSegments(0L);
- static materialAttribute3D aLineMaterial;
+ static attribute::materialAttribute3D aLineMaterial;
// may exclusively change static data, use mutex
::osl::Mutex m_mutex;
@@ -150,30 +154,30 @@ namespace drawinglayer
if(0L == aLineCapList.size() && 0L != nLineCapSegments)
{
- const ::basegfx::B3DPoint aNull(0.0, 0.0, 0.0);
- ::basegfx::B3DPoint aLast(0.0, 1.0, 0.0);
- ::basegfx::B3DHomMatrix aRot;
+ const basegfx::B3DPoint aNull(0.0, 0.0, 0.0);
+ basegfx::B3DPoint aLast(0.0, 1.0, 0.0);
+ basegfx::B3DHomMatrix aRot;
aRot.rotate(F_2PI / (double)nLineCapSegments, 0.0, 0.0);
for(sal_uInt32 a(0L); a < nLineCapSegments; a++)
{
- const ::basegfx::B3DPoint aNext(aRot * aLast);
- ::basegfx::B3DPolygon aNewPolygon;
+ const basegfx::B3DPoint aNext(aRot * aLast);
+ basegfx::B3DPolygon aNewPolygon;
aNewPolygon.append(aLast);
- aNewPolygon.setNormal(0L, ::basegfx::B3DVector(aLast - aNull));
+ aNewPolygon.setNormal(0L, basegfx::B3DVector(aLast - aNull));
aNewPolygon.append(aNext);
- aNewPolygon.setNormal(1L, ::basegfx::B3DVector(aNext - aNull));
+ aNewPolygon.setNormal(1L, basegfx::B3DVector(aNext - aNull));
aNewPolygon.append(aNull);
- aNewPolygon.setNormal(2L, ::basegfx::B3DVector(-1.0, 0.0, 0.0));
+ aNewPolygon.setNormal(2L, basegfx::B3DVector(-1.0, 0.0, 0.0));
aNewPolygon.setClosed(true);
- const ::basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon);
- basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(aNewPolyPolygon, aLineMaterial, false);
- aLineCapList.push_back(referencedPrimitive(*pNew));
+ const basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon);
+ basePrimitive3D* pNew = new polyPolygonMaterialPrimitive3D(aNewPolyPolygon, aLineMaterial, false);
+ aLineCapList.push_back(referencedPrimitive3D(*pNew));
aLast = aNext;
}
@@ -182,15 +186,21 @@ namespace drawinglayer
return aLineCapList;
}
- void getLineJoinSegments(primitiveVector& rDest, sal_uInt32 nSegments, const materialAttribute3D& rMaterial, double fAngle,
- double fDegreeStepWidth, double fMiterMinimumAngle, ::basegfx::tools::B2DLineJoin aLineJoin)
+ void getLineJoinSegments(
+ primitiveVector3D& rDest,
+ sal_uInt32 nSegments,
+ const attribute::materialAttribute3D& rMaterial,
+ double fAngle,
+ double fDegreeStepWidth,
+ double fMiterMinimumAngle,
+ basegfx::tools::B2DLineJoin aLineJoin)
{
// nSegments is for whole circle, adapt to half circle
const sal_uInt32 nVerSeg(nSegments >> 1L);
if(nVerSeg)
{
- if(::basegfx::tools::B2DLINEJOIN_ROUND == aLineJoin)
+ if(basegfx::tools::B2DLINEJOIN_ROUND == aLineJoin)
{
// calculate new horizontal segments
const sal_uInt32 nHorSeg((sal_uInt32)((fAngle / F_2PI) * (double)nSegments));
@@ -198,48 +208,48 @@ namespace drawinglayer
if(nHorSeg)
{
// create half-sphere
- const ::basegfx::B3DPolyPolygon aSphere(::basegfx::tools::createUnitSphereFillPolyPolygon(nHorSeg, nVerSeg, true, F_PI2, -F_PI2, 0.0, fAngle));
+ const basegfx::B3DPolyPolygon aSphere(basegfx::tools::createUnitSphereFillPolyPolygon(nHorSeg, nVerSeg, true, F_PI2, -F_PI2, 0.0, fAngle));
for(sal_uInt32 a(0L); a < aSphere.count(); a++)
{
- const ::basegfx::B3DPolygon aPartPolygon(aSphere.getB3DPolygon(a));
- const ::basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon);
- basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(aPartPolyPolygon, rMaterial, false);
- rDest.push_back(referencedPrimitive(*pNew));
+ const basegfx::B3DPolygon aPartPolygon(aSphere.getB3DPolygon(a));
+ const basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon);
+ basePrimitive3D* pNew = new polyPolygonMaterialPrimitive3D(aPartPolyPolygon, rMaterial, false);
+ rDest.push_back(referencedPrimitive3D(*pNew));
}
}
else
{
// fallback to bevel when there is not at least one segment hor and ver
- aLineJoin = ::basegfx::tools::B2DLINEJOIN_BEVEL;
+ aLineJoin = basegfx::tools::B2DLINEJOIN_BEVEL;
}
}
- if(::basegfx::tools::B2DLINEJOIN_MIDDLE == aLineJoin
- || ::basegfx::tools::B2DLINEJOIN_BEVEL == aLineJoin
- || ::basegfx::tools::B2DLINEJOIN_MITER == aLineJoin)
+ if(basegfx::tools::B2DLINEJOIN_MIDDLE == aLineJoin
+ || basegfx::tools::B2DLINEJOIN_BEVEL == aLineJoin
+ || basegfx::tools::B2DLINEJOIN_MITER == aLineJoin)
{
- if(::basegfx::tools::B2DLINEJOIN_MITER == aLineJoin)
+ if(basegfx::tools::B2DLINEJOIN_MITER == aLineJoin)
{
const double fMiterAngle(fAngle/2.0);
if(fMiterAngle < fMiterMinimumAngle)
{
// fallback to bevel when miter's angle is too small
- aLineJoin = ::basegfx::tools::B2DLINEJOIN_BEVEL;
+ aLineJoin = basegfx::tools::B2DLINEJOIN_BEVEL;
}
}
const double fInc(F_PI / (double)nVerSeg);
const double fSin(sin(-fAngle));
const double fCos(cos(-fAngle));
- const bool bMiter(::basegfx::tools::B2DLINEJOIN_MITER == aLineJoin);
+ const bool bMiter(basegfx::tools::B2DLINEJOIN_MITER == aLineJoin);
const double fMiterSin(bMiter ? sin(-(fAngle/2.0)) : 0.0);
const double fMiterCos(bMiter ? cos(-(fAngle/2.0)) : 0.0);
double fPos(-F_PI2);
- ::basegfx::B3DPoint aPointOnXY, aPointRotY, aNextPointOnXY, aNextPointRotY;
- ::basegfx::B3DPoint aCurrMiter, aNextMiter;
- ::basegfx::B3DPolygon aNewPolygon, aMiterPolygon;
+ basegfx::B3DPoint aPointOnXY, aPointRotY, aNextPointOnXY, aNextPointRotY;
+ basegfx::B3DPoint aCurrMiter, aNextMiter;
+ basegfx::B3DPolygon aNewPolygon, aMiterPolygon;
// close polygon
aNewPolygon.setClosed(true);
@@ -254,19 +264,19 @@ namespace drawinglayer
{
fPos += fInc;
- aNextPointOnXY = ::basegfx::B3DPoint(
+ aNextPointOnXY = basegfx::B3DPoint(
cos(fPos),
sin(fPos),
0.0);
- aNextPointRotY = ::basegfx::B3DPoint(
+ aNextPointRotY = basegfx::B3DPoint(
aNextPointOnXY.getX() * fCos,
aNextPointOnXY.getY(),
aNextPointOnXY.getX() * fSin);
if(bMiter)
{
- aNextMiter = ::basegfx::B3DPoint(
+ aNextMiter = basegfx::B3DPoint(
aNextPointOnXY.getX(),
aNextPointOnXY.getY(),
fMiterSin * (aNextPointOnXY.getX() / fMiterCos));
@@ -279,18 +289,18 @@ namespace drawinglayer
if(bMiter)
{
- aNewPolygon.append(::basegfx::B3DPoint(0.0, -1.0, 0.0));
+ aNewPolygon.append(basegfx::B3DPoint(0.0, -1.0, 0.0));
aNewPolygon.append(aNextPointOnXY);
aNewPolygon.append(aNextMiter);
aMiterPolygon.clear();
- aMiterPolygon.append(::basegfx::B3DPoint(0.0, -1.0, 0.0));
+ aMiterPolygon.append(basegfx::B3DPoint(0.0, -1.0, 0.0));
aMiterPolygon.append(aNextMiter);
aMiterPolygon.append(aNextPointRotY);
}
else
{
- aNewPolygon.append(::basegfx::B3DPoint(0.0, -1.0, 0.0));
+ aNewPolygon.append(basegfx::B3DPoint(0.0, -1.0, 0.0));
aNewPolygon.append(aNextPointOnXY);
aNewPolygon.append(aNextPointRotY);
}
@@ -301,18 +311,18 @@ namespace drawinglayer
if(bMiter)
{
- aNewPolygon.append(::basegfx::B3DPoint(0.0, 1.0, 0.0));
+ aNewPolygon.append(basegfx::B3DPoint(0.0, 1.0, 0.0));
aNewPolygon.append(aCurrMiter);
aNewPolygon.append(aPointOnXY);
aMiterPolygon.clear();
- aMiterPolygon.append(::basegfx::B3DPoint(0.0, 1.0, 0.0));
+ aMiterPolygon.append(basegfx::B3DPoint(0.0, 1.0, 0.0));
aMiterPolygon.append(aPointRotY);
aMiterPolygon.append(aCurrMiter);
}
else
{
- aNewPolygon.append(::basegfx::B3DPoint(0.0, 1.0, 0.0));
+ aNewPolygon.append(basegfx::B3DPoint(0.0, 1.0, 0.0));
aNewPolygon.append(aPointRotY);
aNewPolygon.append(aPointOnXY);
}
@@ -346,15 +356,15 @@ namespace drawinglayer
// set normals
for(sal_uInt32 b(0L); b < aNewPolygon.count(); b++)
{
- aNewPolygon.setNormal(b, ::basegfx::B3DVector(aNewPolygon.getB3DPoint(b)));
+ aNewPolygon.setNormal(b, basegfx::B3DVector(aNewPolygon.getB3DPoint(b)));
}
// create primitive
if(aNewPolygon.count())
{
- const ::basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon);
- basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(aNewPolyPolygon, rMaterial, false);
- rDest.push_back(referencedPrimitive(*pNew));
+ const basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon);
+ basePrimitive3D* pNew = new polyPolygonMaterialPrimitive3D(aNewPolyPolygon, rMaterial, false);
+ rDest.push_back(referencedPrimitive3D(*pNew));
}
if(bMiter && aMiterPolygon.count())
@@ -362,13 +372,13 @@ namespace drawinglayer
// set normals
for(sal_uInt32 c(0L); c < aMiterPolygon.count(); c++)
{
- aMiterPolygon.setNormal(c, ::basegfx::B3DVector(aMiterPolygon.getB3DPoint(c)));
+ aMiterPolygon.setNormal(c, basegfx::B3DVector(aMiterPolygon.getB3DPoint(c)));
}
// create primitive
- const ::basegfx::B3DPolyPolygon aMiterPolyPolygon(aMiterPolygon);
- basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(aMiterPolyPolygon, rMaterial, false);
- rDest.push_back(referencedPrimitive(*pNew));
+ const basegfx::B3DPolyPolygon aMiterPolyPolygon(aMiterPolygon);
+ basePrimitive3D* pNew = new polyPolygonMaterialPrimitive3D(aMiterPolyPolygon, rMaterial, false);
+ rDest.push_back(referencedPrimitive3D(*pNew));
}
// prepare next step
@@ -387,10 +397,10 @@ namespace drawinglayer
}
}
- ::basegfx::B3DHomMatrix getRotationFromVector(const ::basegfx::B3DVector& rVector)
+ basegfx::B3DHomMatrix getRotationFromVector(const basegfx::B3DVector& rVector)
{
// build transformation from unit vector to vector
- ::basegfx::B3DHomMatrix aRetval;
+ basegfx::B3DHomMatrix aRetval;
// get applied rotations from angles in XY and in XZ (cartesian)
const double fRotInXY(atan2(rVector.getY(), rVector.getXZLength()));
@@ -403,105 +413,105 @@ namespace drawinglayer
return aRetval;
}
} // end of anonymous namespace
- } // end of namespace primitive
+ } // end of namespace primitive3d
} // end of namespace drawinglayer
//////////////////////////////////////////////////////////////////////////////
namespace drawinglayer
{
- namespace primitive
+ namespace primitive3d
{
- void polygonTubePrimitive3D::decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation)
+ void polygonTubePrimitive3D::decompose(primitiveVector3D& rTarget)
{
const sal_uInt32 nPointCount(maPolygon.count());
if(0L != nPointCount)
{
- if(::basegfx::fTools::more(mfRadius, 0.0))
+ if(basegfx::fTools::more(mfRadius, 0.0))
{
- const materialAttribute3D aMaterial(maBColor);
+ const attribute::materialAttribute3D aMaterial(maBColor);
static sal_uInt32 nSegments(8L); // default for 3d line segments, for more quality just raise this value (in even steps)
const bool bClosed(maPolygon.isClosed());
- const bool bNoLineJoin(::basegfx::tools::B2DLINEJOIN_NONE == maLineJoin);
+ const bool bNoLineJoin(basegfx::tools::B2DLINEJOIN_NONE == maLineJoin);
const sal_uInt32 nLoopCount(bClosed ? nPointCount : nPointCount - 1L);
- ::basegfx::B3DPoint aLast(maPolygon.getB3DPoint(nPointCount - 1L));
- ::basegfx::B3DPoint aCurr(maPolygon.getB3DPoint(0L));
+ basegfx::B3DPoint aLast(maPolygon.getB3DPoint(nPointCount - 1L));
+ basegfx::B3DPoint aCurr(maPolygon.getB3DPoint(0L));
for(sal_uInt32 a(0L); a < nLoopCount; a++)
{
// get next data
- const ::basegfx::B3DPoint aNext(maPolygon.getB3DPoint((a + 1L) % nPointCount));
- const ::basegfx::B3DVector aForw(aNext - aCurr);
+ const basegfx::B3DPoint aNext(maPolygon.getB3DPoint((a + 1L) % nPointCount));
+ const basegfx::B3DVector aForw(aNext - aCurr);
const double fForwLen(aForw.getLength());
- if(::basegfx::fTools::more(fForwLen, 0.0))
+ if(basegfx::fTools::more(fForwLen, 0.0))
{
// get rotation from vector, this describes rotation from (1, 0, 0) to aForw
- ::basegfx::B3DHomMatrix aRotVector(getRotationFromVector(aForw));
+ basegfx::B3DHomMatrix aRotVector(getRotationFromVector(aForw));
// create default transformation with scale and rotate
- ::basegfx::B3DHomMatrix aVectorTrans;
+ basegfx::B3DHomMatrix aVectorTrans;
aVectorTrans.scale(fForwLen, mfRadius, mfRadius);
aVectorTrans *= aRotVector;
aVectorTrans.translate(aCurr.getX(), aCurr.getY(), aCurr.getZ());
if(bNoLineJoin || (!bClosed && !a))
{
- // line start edge, build transformed primitiveVector
+ // line start edge, build transformed primitiveVector3D
transformPrimitive3D* pNewTransformedA = new transformPrimitive3D(aVectorTrans, getLineCapSegments(nSegments, aMaterial));
- rTarget.push_back(referencedPrimitive(*pNewTransformedA));
+ rTarget.push_back(referencedPrimitive3D(*pNewTransformedA));
}
else
{
- const ::basegfx::B3DVector aBack(aCurr - aLast);
- const double fCross(::basegfx::cross(aBack, aForw).getLength());
+ const basegfx::B3DVector aBack(aCurr - aLast);
+ const double fCross(basegfx::cross(aBack, aForw).getLength());
- if(!::basegfx::fTools::equalZero(fCross))
+ if(!basegfx::fTools::equalZero(fCross))
{
// line connect non-parallel, aBack, aForw, use maLineJoin
- primitiveVector aNewList;
+ primitiveVector3D aNewList;
const double fAngle(acos(aBack.scalar(aForw) / (fForwLen * aBack.getLength()))); // 0.0 .. F_PI2
getLineJoinSegments(aNewList, nSegments, aMaterial, fAngle, mfDegreeStepWidth, mfMiterMinimumAngle, maLineJoin);
// calculate transformation. First, get angle in YZ between nForw projected on (1, 0, 0) and nBack
- ::basegfx::B3DHomMatrix aInvRotVector(aRotVector);
+ basegfx::B3DHomMatrix aInvRotVector(aRotVector);
aInvRotVector.invert();
- ::basegfx::B3DVector aTransBack(aInvRotVector * aBack);
+ basegfx::B3DVector aTransBack(aInvRotVector * aBack);
const double fRotInYZ(atan2(aTransBack.getY(), aTransBack.getZ()));
// create trans by rotating unit sphere with angle 90 degrees around Y, then 180-fRot in X.
// Also apply usual scaling and translation
- ::basegfx::B3DHomMatrix aSphereTrans;
+ basegfx::B3DHomMatrix aSphereTrans;
aSphereTrans.rotate(0.0, F_PI2, 0.0);
aSphereTrans.rotate(F_PI - fRotInYZ, 0.0, 0.0);
aSphereTrans *= aRotVector;
aSphereTrans.scale(mfRadius, mfRadius, mfRadius);
aSphereTrans.translate(aCurr.getX(), aCurr.getY(), aCurr.getZ());
- // line start edge, build transformed primitiveVector
+ // line start edge, build transformed primitiveVector3D
transformPrimitive3D* pNewTransformedB = new transformPrimitive3D(aSphereTrans, aNewList);
- rTarget.push_back(referencedPrimitive(*pNewTransformedB));
+ rTarget.push_back(referencedPrimitive3D(*pNewTransformedB));
}
}
- // create line segments, build transformed primitiveVector
+ // create line segments, build transformed primitiveVector3D
transformPrimitive3D* pNewTransformedC = new transformPrimitive3D(aVectorTrans, getLineTubeSegments(nSegments, aMaterial));
- rTarget.push_back(referencedPrimitive(*pNewTransformedC));
+ rTarget.push_back(referencedPrimitive3D(*pNewTransformedC));
if(bNoLineJoin || (!bClosed && ((a + 1L) == nLoopCount)))
{
// line end edge, first rotate (mirror) and translate, then use use aRotVector
- ::basegfx::B3DHomMatrix aBackTrans;
+ basegfx::B3DHomMatrix aBackTrans;
aBackTrans.rotate(0.0, F_PI, 0.0);
aBackTrans.translate(1.0, 0.0, 0.0);
aBackTrans.scale(fForwLen, mfRadius, mfRadius);
aBackTrans *= aRotVector;
aBackTrans.translate(aCurr.getX(), aCurr.getY(), aCurr.getZ());
- // line end edge, build transformed primitiveVector
+ // line end edge, build transformed primitiveVector3D
transformPrimitive3D* pNewTransformedD = new transformPrimitive3D(aBackTrans, getLineCapSegments(nSegments, aMaterial));
- rTarget.push_back(referencedPrimitive(*pNewTransformedD));
+ rTarget.push_back(referencedPrimitive3D(*pNewTransformedD));
}
}
@@ -514,15 +524,15 @@ namespace drawinglayer
{
// create hairline
polygonHairlinePrimitive3D* pNew = new polygonHairlinePrimitive3D(maPolygon, maBColor);
- rTarget.push_back(referencedPrimitive(*pNew));
+ rTarget.push_back(referencedPrimitive3D(*pNew));
}
}
}
polygonTubePrimitive3D::polygonTubePrimitive3D(
- const ::basegfx::B3DPolygon& rPolygon,
- const ::basegfx::BColor& rBColor,
- double fRadius, ::basegfx::tools::B2DLineJoin aLineJoin,
+ const basegfx::B3DPolygon& rPolygon,
+ const basegfx::BColor& rBColor,
+ double fRadius, basegfx::tools::B2DLineJoin aLineJoin,
double fDegreeStepWidth,
double fMiterMinimumAngle)
: polygonHairlinePrimitive3D(rPolygon, rBColor),
@@ -537,7 +547,7 @@ namespace drawinglayer
{
}
- bool polygonTubePrimitive3D::operator==(const basePrimitive& rPrimitive) const
+ bool polygonTubePrimitive3D::operator==(const basePrimitive3D& rPrimitive) const
{
if(polygonHairlinePrimitive3D::operator==(rPrimitive))
{
@@ -556,7 +566,7 @@ namespace drawinglayer
{
return CreatePrimitiveID('T', 'U', 'B', '3');
}
- } // end of namespace primitive
+ } // end of namespace primitive3d
} // end of namespace drawinglayer
//////////////////////////////////////////////////////////////////////////////