summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorAlexander Bergmann <myaddons@gmx.de>2012-01-28 00:22:05 +0000
committerMichael Meeks <michael.meeks@suse.com>2012-01-28 00:23:01 +0000
commit6e4b79042bbb6695eb88ee5d4a8f661932778a50 (patch)
treef121e34c5b5ac9835ae5b0b344b7ec0c5c8b7cb6 /basegfx
parent2ea8bbe1d381a8f12b163c0e2a17cf758a420a44 (diff)
Actually apply substance of previous unused code removal
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/inc/basegfx/tuple/b2ituple.hxx7
-rw-r--r--basegfx/inc/basegfx/vector/b2ivector.hxx65
-rw-r--r--basegfx/source/tuple/b2ituple.cxx48
-rw-r--r--basegfx/source/vector/b2ivector.cxx67
4 files changed, 0 insertions, 187 deletions
diff --git a/basegfx/inc/basegfx/tuple/b2ituple.hxx b/basegfx/inc/basegfx/tuple/b2ituple.hxx
index f376bb782c59..4072073026a9 100644
--- a/basegfx/inc/basegfx/tuple/b2ituple.hxx
+++ b/basegfx/inc/basegfx/tuple/b2ituple.hxx
@@ -204,13 +204,6 @@ namespace basegfx
//////////////////////////////////////////////////////////////////////////
class B2DTuple;
- BASEGFX_DLLPUBLIC B2ITuple minimum(const B2ITuple& rTupA, const B2ITuple& rTupB);
- BASEGFX_DLLPUBLIC B2ITuple maximum(const B2ITuple& rTupA, const B2ITuple& rTupB);
- BASEGFX_DLLPUBLIC B2ITuple absolute(const B2ITuple& rTup);
- BASEGFX_DLLPUBLIC B2DTuple interpolate(const B2ITuple& rOld1, const B2ITuple& rOld2, double t);
- BASEGFX_DLLPUBLIC B2DTuple average(const B2ITuple& rOld1, const B2ITuple& rOld2);
- BASEGFX_DLLPUBLIC B2DTuple average(const B2ITuple& rOld1, const B2ITuple& rOld2, const B2ITuple& rOld3);
-
BASEGFX_DLLPUBLIC B2ITuple operator+(const B2ITuple& rTupA, const B2ITuple& rTupB);
BASEGFX_DLLPUBLIC B2ITuple operator-(const B2ITuple& rTupA, const B2ITuple& rTupB);
BASEGFX_DLLPUBLIC B2ITuple operator/(const B2ITuple& rTupA, const B2ITuple& rTupB);
diff --git a/basegfx/inc/basegfx/vector/b2ivector.hxx b/basegfx/inc/basegfx/vector/b2ivector.hxx
index 1e3be7810e59..2fcbc540b755 100644
--- a/basegfx/inc/basegfx/vector/b2ivector.hxx
+++ b/basegfx/inc/basegfx/vector/b2ivector.hxx
@@ -113,12 +113,6 @@ namespace basegfx
*/
B2IVector& operator=( const ::basegfx::B2ITuple& rVec );
- /** Calculate the length of this 2D Vector
-
- @return The Length of the 2D Vector
- */
- double getLength() const;
-
/** Set the length of this 2D Vector
@param fLen
@@ -136,69 +130,17 @@ namespace basegfx
*/
double scalar( const B2IVector& rVec ) const;
- /** Calculate the length of the cross product with another 2D Vector
-
- In 2D, returning an actual vector does not make much
- sense here. The magnitude, although, can be readily
- used for tasks such as angle calculations, since for
- the returned value, the following equation holds:
- retVal = getLength(this)*getLength(rVec)*sin(theta),
- with theta being the angle between the two vectors.
-
- @param rVec
- The second 2D Vector
-
- @return
- The length of the cross product of the two involved 2D Vectors
- */
- double cross( const B2IVector& rVec ) const;
-
- /** Calculate the Angle with another 2D Vector
-
- @param rVec
- The second 2D Vector
-
- @return
- The Angle value of the two involved 2D Vectors in -pi/2 < return < pi/2
- */
- double angle( const B2IVector& rVec ) const;
-
/** Transform vector by given transformation matrix.
Since this is a vector, translational components of the
matrix are disregarded.
*/
B2IVector& operator*=( const B2DHomMatrix& rMat );
-
- static const B2IVector& getEmptyVector();
};
// external operators
//////////////////////////////////////////////////////////////////////////
- /** Calculate the orientation to another 2D Vector
-
- @param rVecA
- The first 2D Vector
-
- @param rVecB
- The second 2D Vector
-
- @return
- The mathematical Orientation of the two involved 2D Vectors
- */
- BASEGFX_DLLPUBLIC B2VectorOrientation getOrientation( const B2IVector& rVecA, const B2IVector& rVecB );
-
- /** Calculate a perpendicular 2D Vector to the given one
-
- @param rVec
- The source 2D Vector
-
- @return
- A 2D Vector perpendicular to the one given in parameter rVec
- */
- BASEGFX_DLLPUBLIC B2IVector getPerpendicular( const B2IVector& rVec );
-
/** Test two vectors which need not to be normalized for parallelism
@param rVecA
@@ -220,13 +162,6 @@ namespace basegfx
*/
BASEGFX_DLLPUBLIC B2IVector operator*( const B2DHomMatrix& rMat, const B2IVector& rVec );
- /** Test continuity between given vectors.
-
- The two given vectors are assumed to describe control points on a
- common point. Calculate if there is a continuity between them.
- */
- BASEGFX_DLLPUBLIC B2VectorContinuity getContinuity( const B2IVector& rBackVector, const B2IVector& rForwardVector );
-
} // end of namespace basegfx
#endif /* _BGFX_VECTOR_B2IVECTOR_HXX */
diff --git a/basegfx/source/tuple/b2ituple.cxx b/basegfx/source/tuple/b2ituple.cxx
index b4846b27e1ec..e4bd0fba77c4 100644
--- a/basegfx/source/tuple/b2ituple.cxx
+++ b/basegfx/source/tuple/b2ituple.cxx
@@ -42,54 +42,6 @@ namespace basegfx
// external operators
//////////////////////////////////////////////////////////////////////////
- B2ITuple minimum(const B2ITuple& rTupA, const B2ITuple& rTupB)
- {
- B2ITuple aMin(
- (rTupB.getX() < rTupA.getX()) ? rTupB.getX() : rTupA.getX(),
- (rTupB.getY() < rTupA.getY()) ? rTupB.getY() : rTupA.getY());
- return aMin;
- }
-
- B2ITuple maximum(const B2ITuple& rTupA, const B2ITuple& rTupB)
- {
- B2ITuple aMax(
- (rTupB.getX() > rTupA.getX()) ? rTupB.getX() : rTupA.getX(),
- (rTupB.getY() > rTupA.getY()) ? rTupB.getY() : rTupA.getY());
- return aMax;
- }
-
- B2ITuple absolute(const B2ITuple& rTup)
- {
- B2ITuple aAbs(
- (0 > rTup.getX()) ? -rTup.getX() : rTup.getX(),
- (0 > rTup.getY()) ? -rTup.getY() : rTup.getY());
- return aAbs;
- }
-
- B2DTuple interpolate(const B2ITuple& rOld1, const B2ITuple& rOld2, double t)
- {
- B2DTuple aInt(
- ((rOld2.getX() - rOld1.getX()) * t) + rOld1.getX(),
- ((rOld2.getY() - rOld1.getY()) * t) + rOld1.getY());
- return aInt;
- }
-
- B2DTuple average(const B2ITuple& rOld1, const B2ITuple& rOld2)
- {
- B2DTuple aAvg(
- (rOld1.getX() + rOld2.getX()) * 0.5,
- (rOld1.getY() + rOld2.getY()) * 0.5);
- return aAvg;
- }
-
- B2DTuple average(const B2ITuple& rOld1, const B2ITuple& rOld2, const B2ITuple& rOld3)
- {
- B2DTuple aAvg(
- (rOld1.getX() + rOld2.getX() + rOld3.getX()) * (1.0 / 3.0),
- (rOld1.getY() + rOld2.getY() + rOld3.getY()) * (1.0 / 3.0));
- return aAvg;
- }
-
B2ITuple operator+(const B2ITuple& rTupA, const B2ITuple& rTupB)
{
B2ITuple aSum(rTupA);
diff --git a/basegfx/source/vector/b2ivector.cxx b/basegfx/source/vector/b2ivector.cxx
index 7297ae49d91d..bb3ac61ee75b 100644
--- a/basegfx/source/vector/b2ivector.cxx
+++ b/basegfx/source/vector/b2ivector.cxx
@@ -39,33 +39,11 @@ namespace basegfx
return *this;
}
-
- double B2IVector::getLength() const
- {
- return hypot( mnX, mnY );
- }
-
double B2IVector::scalar( const B2IVector& rVec ) const
{
return((mnX * rVec.mnX) + (mnY * rVec.mnY));
}
- double B2IVector::cross( const B2IVector& rVec ) const
- {
- return(mnX * rVec.getY() - mnY * rVec.getX());
- }
-
- double B2IVector::angle( const B2IVector& rVec ) const
- {
- return atan2(double( mnX * rVec.getY() - mnY * rVec.getX()),
- double( mnX * rVec.getX() + mnY * rVec.getY()));
- }
-
- const B2IVector& B2IVector::getEmptyVector()
- {
- return (const B2IVector&) ::basegfx::B2ITuple::getEmptyTuple();
- }
-
B2IVector& B2IVector::operator*=( const B2DHomMatrix& rMat )
{
mnX = fround( rMat.get(0,0)*mnX +
@@ -102,57 +80,12 @@ namespace basegfx
return ::basegfx::fTools::equalZero(fVal);
}
- B2VectorOrientation getOrientation( const B2IVector& rVecA, const B2IVector& rVecB )
- {
- double fVal(rVecA.getX() * rVecB.getY() - rVecA.getY() * rVecB.getX());
-
- if(fVal > 0.0)
- {
- return ORIENTATION_POSITIVE;
- }
-
- if(fVal < 0.0)
- {
- return ORIENTATION_NEGATIVE;
- }
-
- return ORIENTATION_NEUTRAL;
- }
-
- B2IVector getPerpendicular( const B2IVector& rNormalizedVec )
- {
- B2IVector aPerpendicular(-rNormalizedVec.getY(), rNormalizedVec.getX());
- return aPerpendicular;
- }
-
B2IVector operator*( const B2DHomMatrix& rMat, const B2IVector& rVec )
{
B2IVector aRes( rVec );
return aRes*=rMat;
}
- B2VectorContinuity getContinuity(const B2IVector& rBackVector, const B2IVector& rForwardVector )
- {
- B2VectorContinuity eRetval(CONTINUITY_NONE);
-
- if(!rBackVector.equalZero() && !rForwardVector.equalZero())
- {
- const B2IVector aInverseForwardVector(-rForwardVector.getX(), -rForwardVector.getY());
-
- if(rBackVector == aInverseForwardVector)
- {
- // same direction and same length -> C2
- eRetval = CONTINUITY_C2;
- }
- else if(areParallel(rBackVector, aInverseForwardVector))
- {
- // same direction -> C1
- eRetval = CONTINUITY_C1;
- }
- }
-
- return eRetval;
- }
} // end of namespace basegfx
// eof