INTEGRATION: CWS aw033 (1.5.2); FILE MERGED
2008/05/14 14:40:33 aw 1.5.2.6: RESYNC: (1.9-1.11); FILE MERGED 2006/11/28 16:13:34 aw 1.5.2.5: RESYNC: (1.8-1.9); FILE MERGED 2006/09/27 16:29:23 aw 1.5.2.4: #i39532# changes after resync to m185 2006/09/26 14:51:00 aw 1.5.2.3: RESYNC: (1.6-1.8); FILE MERGED 2006/05/12 11:36:07 aw 1.5.2.2: code changes for primitive support 2005/10/28 11:24:15 aw 1.5.2.1: #i39532#
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* OpenOffice.org - a multi-platform office productivity suite
|
||||
*
|
||||
* $RCSfile: b3dpolypolygon.cxx,v $
|
||||
* $Revision: 1.11 $
|
||||
* $Revision: 1.12 $
|
||||
*
|
||||
* This file is part of OpenOffice.org.
|
||||
*
|
||||
@@ -34,8 +34,8 @@
|
||||
#include <basegfx/polygon/b3dpolypolygon.hxx>
|
||||
#include <basegfx/polygon/b3dpolygon.hxx>
|
||||
#include <rtl/instance.hxx>
|
||||
#include <basegfx/matrix/b2dhommatrix.hxx>
|
||||
#include <basegfx/matrix/b3dhommatrix.hxx>
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
@@ -159,6 +159,46 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void clearBColors()
|
||||
{
|
||||
for(sal_uInt32 a(0L); a < maPolygons.size(); a++)
|
||||
{
|
||||
maPolygons[a].clearBColors();
|
||||
}
|
||||
}
|
||||
|
||||
void transformNormals(const ::basegfx::B3DHomMatrix& rMatrix)
|
||||
{
|
||||
for(sal_uInt32 a(0L); a < maPolygons.size(); a++)
|
||||
{
|
||||
maPolygons[a].transformNormals(rMatrix);
|
||||
}
|
||||
}
|
||||
|
||||
void clearNormals()
|
||||
{
|
||||
for(sal_uInt32 a(0L); a < maPolygons.size(); a++)
|
||||
{
|
||||
maPolygons[a].clearNormals();
|
||||
}
|
||||
}
|
||||
|
||||
void transformTextureCoordiantes(const ::basegfx::B2DHomMatrix& rMatrix)
|
||||
{
|
||||
for(sal_uInt32 a(0L); a < maPolygons.size(); a++)
|
||||
{
|
||||
maPolygons[a].transformTextureCoordiantes(rMatrix);
|
||||
}
|
||||
}
|
||||
|
||||
void clearTextureCoordinates()
|
||||
{
|
||||
for(sal_uInt32 a(0L); a < maPolygons.size(); a++)
|
||||
{
|
||||
maPolygons[a].clearTextureCoordinates();
|
||||
}
|
||||
}
|
||||
|
||||
void makeUnique()
|
||||
{
|
||||
std::for_each( maPolygons.begin(),
|
||||
@@ -238,6 +278,75 @@ namespace basegfx
|
||||
mpPolyPolygon->setB3DPolygon(nIndex, rPolygon);
|
||||
}
|
||||
|
||||
bool B3DPolyPolygon::areBColorsUsed() const
|
||||
{
|
||||
for(sal_uInt32 a(0L); a < mpPolyPolygon->count(); a++)
|
||||
{
|
||||
if((mpPolyPolygon->getB3DPolygon(a)).areBColorsUsed())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void B3DPolyPolygon::clearBColors()
|
||||
{
|
||||
if(areBColorsUsed())
|
||||
mpPolyPolygon->clearBColors();
|
||||
}
|
||||
|
||||
void B3DPolyPolygon::transformNormals(const B3DHomMatrix& rMatrix)
|
||||
{
|
||||
if(!rMatrix.isIdentity())
|
||||
mpPolyPolygon->transformNormals(rMatrix);
|
||||
}
|
||||
|
||||
bool B3DPolyPolygon::areNormalsUsed() const
|
||||
{
|
||||
for(sal_uInt32 a(0L); a < mpPolyPolygon->count(); a++)
|
||||
{
|
||||
if((mpPolyPolygon->getB3DPolygon(a)).areNormalsUsed())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void B3DPolyPolygon::clearNormals()
|
||||
{
|
||||
if(areNormalsUsed())
|
||||
mpPolyPolygon->clearNormals();
|
||||
}
|
||||
|
||||
void B3DPolyPolygon::transformTextureCoordiantes(const B2DHomMatrix& rMatrix)
|
||||
{
|
||||
if(!rMatrix.isIdentity())
|
||||
mpPolyPolygon->transformTextureCoordiantes(rMatrix);
|
||||
}
|
||||
|
||||
bool B3DPolyPolygon::areTextureCoordinatesUsed() const
|
||||
{
|
||||
for(sal_uInt32 a(0L); a < mpPolyPolygon->count(); a++)
|
||||
{
|
||||
if((mpPolyPolygon->getB3DPolygon(a)).areTextureCoordinatesUsed())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void B3DPolyPolygon::clearTextureCoordinates()
|
||||
{
|
||||
if(areTextureCoordinatesUsed())
|
||||
mpPolyPolygon->clearTextureCoordinates();
|
||||
}
|
||||
|
||||
void B3DPolyPolygon::insert(sal_uInt32 nIndex, const B3DPolygon& rPolygon, sal_uInt32 nCount)
|
||||
{
|
||||
OSL_ENSURE(nIndex <= mpPolyPolygon->count(), "B3DPolyPolygon Insert outside range (!)");
|
||||
@@ -328,7 +437,7 @@ namespace basegfx
|
||||
mpPolyPolygon->removeDoublePoints();
|
||||
}
|
||||
|
||||
void B3DPolyPolygon::transform(const ::basegfx::B3DHomMatrix& rMatrix)
|
||||
void B3DPolyPolygon::transform(const B3DHomMatrix& rMatrix)
|
||||
{
|
||||
if(mpPolyPolygon->count() && !rMatrix.isIdentity())
|
||||
{
|
||||
|
Reference in New Issue
Block a user