summaryrefslogtreecommitdiff
path: root/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2011-02-27 17:44:25 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-16 13:04:50 +0200
commit602edcf19750e3d64300a994779bf7eab2794fae (patch)
tree49ca181f0e375622d93dc0286e3757c9c9342b47 /basegfx/inc/basegfx/polygon/b3dpolygontools.hxx
parent4265f28d829e056582255b47488a3415483181a6 (diff)
CWS gnumake4: convert basegfx to new build system [hg:e8f9d107b59a]
Diffstat (limited to 'basegfx/inc/basegfx/polygon/b3dpolygontools.hxx')
-rw-r--r--basegfx/inc/basegfx/polygon/b3dpolygontools.hxx63
1 files changed, 32 insertions, 31 deletions
diff --git a/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx b/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx
index 7945fc1bde00..6af99ef18a4a 100644
--- a/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx
+++ b/basegfx/inc/basegfx/polygon/b3dpolygontools.hxx
@@ -33,6 +33,7 @@
#include <basegfx/polygon/b3dpolypolygon.hxx>
#include <basegfx/vector/b2enums.hxx>
#include <vector>
+#include <basegfx/basegfxdllapi.h>
//////////////////////////////////////////////////////////////////////////////
@@ -53,58 +54,58 @@ namespace basegfx
method corrects this (removes double start/end points)
and sets the Closed()-state of the polygon correctly.
*/
- void checkClosed(B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC void checkClosed(B3DPolygon& rCandidate);
// Get successor and predecessor indices. Returning the same index means there
// is none. Same for successor.
- sal_uInt32 getIndexOfPredecessor(sal_uInt32 nIndex, const B3DPolygon& rCandidate);
- sal_uInt32 getIndexOfSuccessor(sal_uInt32 nIndex, const B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC sal_uInt32 getIndexOfPredecessor(sal_uInt32 nIndex, const B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC sal_uInt32 getIndexOfSuccessor(sal_uInt32 nIndex, const B3DPolygon& rCandidate);
// Get orientation of Polygon
- B2VectorOrientation getOrientation(const B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC B2VectorOrientation getOrientation(const B3DPolygon& rCandidate);
// get size of polygon. Control vectors are included in that ranges.
- B3DRange getRange(const B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC B3DRange getRange(const B3DPolygon& rCandidate);
// get normal vector of polygon
- B3DVector getNormal(const B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC B3DVector getNormal(const B3DPolygon& rCandidate);
// get normal vector of positive oriented polygon
- B3DVector getPositiveOrientedNormal(const B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC B3DVector getPositiveOrientedNormal(const B3DPolygon& rCandidate);
// get signed area of polygon
- double getSignedArea(const B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC double getSignedArea(const B3DPolygon& rCandidate);
// get area of polygon
- double getArea(const B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC double getArea(const B3DPolygon& rCandidate);
// get signed area of polygon
- double getSignedArea(const B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC double getSignedArea(const B3DPolygon& rCandidate);
// get area of polygon
- double getArea(const ::basegfx::B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC double getArea(const ::basegfx::B3DPolygon& rCandidate);
// get length of polygon edge from point nIndex to nIndex + 1
- double getEdgeLength(const B3DPolygon& rCandidate, sal_uInt32 nIndex);
+ BASEGFX_DLLPUBLIC double getEdgeLength(const B3DPolygon& rCandidate, sal_uInt32 nIndex);
// get length of polygon
- double getLength(const B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC double getLength(const B3DPolygon& rCandidate);
// get position on polygon for absolute given distance. If
// length is given, it is assumed the correct polygon length, if 0.0 it is calculated
// using getLength(...)
- B3DPoint getPositionAbsolute(const B3DPolygon& rCandidate, double fDistance, double fLength = 0.0);
+ BASEGFX_DLLPUBLIC B3DPoint getPositionAbsolute(const B3DPolygon& rCandidate, double fDistance, double fLength = 0.0);
// get position on polygon for relative given distance in range [0.0 .. 1.0]. If
// length is given, it is assumed the correct polygon length, if 0.0 it is calculated
// using getLength(...)
- B3DPoint getPositionRelative(const B3DPolygon& rCandidate, double fDistance, double fLength = 0.0);
+ BASEGFX_DLLPUBLIC B3DPoint getPositionRelative(const B3DPolygon& rCandidate, double fDistance, double fLength = 0.0);
/** Apply given LineDashing to given polygon
For a description see applyLineDashing in b2dpolygontoos.hxx
*/
- void applyLineDashing(
+ BASEGFX_DLLPUBLIC void applyLineDashing(
const B3DPolygon& rCandidate,
const ::std::vector<double>& rDotDashArray,
B3DPolyPolygon* pLineTarget,
@@ -115,61 +116,61 @@ namespace basegfx
rCandidate: the 3d geometry to change
rCenter: the center of the 3d geometry
*/
- B3DPolygon applyDefaultNormalsSphere( const B3DPolygon& rCandidate, const B3DPoint& rCenter);
+ BASEGFX_DLLPUBLIC B3DPolygon applyDefaultNormalsSphere( const B3DPolygon& rCandidate, const B3DPoint& rCenter);
/** invert normals for given 3d geometry.
*/
- B3DPolygon invertNormals( const B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC B3DPolygon invertNormals( const B3DPolygon& rCandidate);
/** Create/replace texture coordinates for given 3d geometry with parallel projected one
rRange: the full range of the 3d geometry
If bChangeX, x texture coordinate will be recalculated.
If bChangeY, y texture coordinate will be recalculated.
*/
- B3DPolygon applyDefaultTextureCoordinatesParallel( const B3DPolygon& rCandidate, const B3DRange& rRange, bool bChangeX = true, bool bChangeY = true);
+ BASEGFX_DLLPUBLIC B3DPolygon applyDefaultTextureCoordinatesParallel( const B3DPolygon& rCandidate, const B3DRange& rRange, bool bChangeX = true, bool bChangeY = true);
/** Create/replace texture coordinates for given 3d geometry with spherical one
rCenter: the centre of the used 3d geometry
If bChangeX, x texture coordinate will be recalculated.
If bChangeY, y texture coordinate will be recalculated.
*/
- B3DPolygon applyDefaultTextureCoordinatesSphere( const B3DPolygon& rCandidate, const B3DPoint& rCenter, bool bChangeX = true, bool bChangeY = true);
+ BASEGFX_DLLPUBLIC B3DPolygon applyDefaultTextureCoordinatesSphere( const B3DPolygon& rCandidate, const B3DPoint& rCenter, bool bChangeX = true, bool bChangeY = true);
// test if point is inside epsilon-range around an edge defined
// by the two given points. Can be used for HitTesting. The epsilon-range
// is defined to be the cylinder centered to the given edge, using radius
// fDistance, and the sphere around both points with radius fDistance.
- bool isInEpsilonRange(const B3DPoint& rEdgeStart, const B3DPoint& rEdgeEnd, const B3DPoint& rTestPosition, double fDistance);
+ BASEGFX_DLLPUBLIC bool isInEpsilonRange(const B3DPoint& rEdgeStart, const B3DPoint& rEdgeEnd, const B3DPoint& rTestPosition, double fDistance);
// test if point is inside epsilon-range around the given Polygon. Can be used
// for HitTesting. The epsilon-range is defined to be the cylinder centered to
// the given edge, using radius fDistance, and the sphere around both points with radius fDistance.
- bool isInEpsilonRange(const B3DPolygon& rCandidate, const B3DPoint& rTestPosition, double fDistance);
+ BASEGFX_DLLPUBLIC bool isInEpsilonRange(const B3DPolygon& rCandidate, const B3DPoint& rTestPosition, double fDistance);
// isInside tests for B3DPoint and other B3DPolygon. On border is not inside as long as
// not true is given in bWithBorder flag.
- bool isInside(const B3DPolygon& rCandidate, const B3DPoint& rPoint, bool bWithBorder = false);
- bool isInside(const B3DPolygon& rCandidate, const B3DPolygon& rPolygon, bool bWithBorder = false);
+ BASEGFX_DLLPUBLIC bool isInside(const B3DPolygon& rCandidate, const B3DPoint& rPoint, bool bWithBorder = false);
+ BASEGFX_DLLPUBLIC bool isInside(const B3DPolygon& rCandidate, const B3DPolygon& rPolygon, bool bWithBorder = false);
// calculates if given point is on given line, taking care of the numerical epsilon
- bool isPointOnLine(const B3DPoint& rStart, const B3DPoint& rEnd, const B3DPoint& rCandidate, bool bWithPoints = false);
+ BASEGFX_DLLPUBLIC bool isPointOnLine(const B3DPoint& rStart, const B3DPoint& rEnd, const B3DPoint& rCandidate, bool bWithPoints = false);
// calculates if given point is on given polygon, taking care of the numerical epsilon. Uses
// isPointOnLine internally
- bool isPointOnPolygon(const B3DPolygon& rCandidate, const B3DPoint& rPoint, bool bWithPoints = true);
+ BASEGFX_DLLPUBLIC bool isPointOnPolygon(const B3DPolygon& rCandidate, const B3DPoint& rPoint, bool bWithPoints = true);
// helper to get a fCut position between a plane (given with normal and a point)
// and a line given by start and end point
- bool getCutBetweenLineAndPlane(const B3DVector& rPlaneNormal, const B3DPoint& rPlanePoint, const B3DPoint& rEdgeStart, const B3DPoint& rEdgeEnd, double& fCut);
+ BASEGFX_DLLPUBLIC bool getCutBetweenLineAndPlane(const B3DVector& rPlaneNormal, const B3DPoint& rPlanePoint, const B3DPoint& rEdgeStart, const B3DPoint& rEdgeEnd, double& fCut);
// helper to get a fCut position between a 3d Polygon
// and a line given by start and end point
- bool getCutBetweenLineAndPolygon(const B3DPolygon& rCandidate, const B3DPoint& rEdgeStart, const B3DPoint& rEdgeEnd, double& fCut);
+ BASEGFX_DLLPUBLIC bool getCutBetweenLineAndPolygon(const B3DPolygon& rCandidate, const B3DPoint& rEdgeStart, const B3DPoint& rEdgeEnd, double& fCut);
//////////////////////////////////////////////////////////////////////
// comparators with tolerance for 3D Polygons
- bool equal(const B3DPolygon& rCandidateA, const B3DPolygon& rCandidateB, const double& rfSmallValue);
- bool equal(const B3DPolygon& rCandidateA, const B3DPolygon& rCandidateB);
+ BASEGFX_DLLPUBLIC bool equal(const B3DPolygon& rCandidateA, const B3DPolygon& rCandidateB, const double& rfSmallValue);
+ BASEGFX_DLLPUBLIC bool equal(const B3DPolygon& rCandidateA, const B3DPolygon& rCandidateB);
/** snap some polygon coordinates to discrete coordinates
@@ -183,7 +184,7 @@ namespace basegfx
@return
The modified version of the source polygon
*/
- B3DPolygon snapPointsOfHorizontalOrVerticalEdges(const B3DPolygon& rCandidate);
+ BASEGFX_DLLPUBLIC B3DPolygon snapPointsOfHorizontalOrVerticalEdges(const B3DPolygon& rCandidate);
} // end of namespace tools
} // end of namespace basegfx