summaryrefslogtreecommitdiff
path: root/svx/source/engine3d/extrud3d.cxx
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-04-02 13:06:29 +0000
committerRüdiger Timm <rt@openoffice.org>2004-04-02 13:06:29 +0000
commit8f68c7665c3f72b5d7b6a70933651cb45442d610 (patch)
tree84cd81ee1b9953a92c720eede95ce03363abab20 /svx/source/engine3d/extrud3d.cxx
parentb30cb7a7c62ffd69d0f933ad2e904228e9d925a8 (diff)
INTEGRATION: CWS sj05 (1.13.6); FILE MERGED
2004/03/04 10:35:39 sj 1.13.6.1: solved flipping problem
Diffstat (limited to 'svx/source/engine3d/extrud3d.cxx')
-rw-r--r--svx/source/engine3d/extrud3d.cxx27
1 files changed, 23 insertions, 4 deletions
diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx
index 9508d0b5732e..fabd0ffc320a 100644
--- a/svx/source/engine3d/extrud3d.cxx
+++ b/svx/source/engine3d/extrud3d.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: extrud3d.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: rt $ $Date: 2003-11-24 16:35:59 $
+ * last change: $Author: rt $ $Date: 2004-04-02 14:06:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -206,10 +206,29 @@ PolyPolygon3D E3dExtrudeObj::GetFrontSide()
// Start- und Endpunkte verhindern
aPolyPoly3D.RemoveDoublePoints();
+ // THB: Temporary fix for SJ's flipping problem
+ // TODO: Clarify with AW
+ // Check whether matrix mirrors (then, polygon flipping must happen the other way around)
+ Matrix4D aTrans;
+ GetFullTransform( aTrans );
+ const sal_Bool bMirror( aTrans.Determinant() < 0.0 );
+
// Normale holen
Vector3D aNormal = aPolyPoly3D.GetNormal();
- if((aNormal.Z() > 0.0) != (GetExtrudeDepth() != 0))
- aPolyPoly3D.FlipDirections();
+
+ // THB: Temporary fix for SJ's flipping problem
+ // TODO: Clarify with AW
+ if( bMirror )
+ {
+ // for mirroring transforms, the condition for polygon flip is inverted
+ if( (aNormal.Z() > 0.0) == (GetExtrudeDepth() != 0) )
+ aPolyPoly3D.FlipDirections();
+ }
+ else
+ {
+ if( (aNormal.Z() > 0.0) != (GetExtrudeDepth() != 0) )
+ aPolyPoly3D.FlipDirections();
+ }
// Orientierung evtl. vorhandener Loecher in einen definierten
// Ausgangszustand bringen