Commit 02b2a3ce authored by berenger-bramas's avatar berenger-bramas
Browse files

Solve compile problem, global functions/constant are not allowed.

So Binary operators (F3DPosition) and constant (FMath) have been move to a cpp.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@159 2616d619-271b-44dc-8df4-d4a8f33a7222
parent 0344535d
This diff is collapsed.
#include "F3DPosition.hpp"
// Binary operator for F3DPosition Class
/**
* Operator F3Position minus FReal
* This substract inValue to all dimensions of the inPosition
* @param inPosition the position to compute
* @param inValue the value to decrease/substract position
* @return the resulting position
*/
F3DPosition operator-(const F3DPosition& inPosition, const FReal inValue){
F3DPosition position(inPosition);
position -= inValue;
return position;
}
/**
* Operator F3Position plus FReal
* This affect from inValue all dimensions of the inPosition
* @param inPosition the position to compute
* @param inValue the value to increase/affect position
* @return the resulting position
*/
F3DPosition operator+(const F3DPosition& inPosition, const FReal inValue){
F3DPosition position(inPosition);
position += inValue;
return position;
}
/**
* Operator F3Position minus F3Position
* This substract one from anther
* @param inPosition the position to reduce
* @param inOther the position to decrease/substract inPosition
* @return the resulting position
*/
F3DPosition operator-(const F3DPosition& inPosition, const F3DPosition& inOther){
F3DPosition position(inPosition);
position -= inOther;
return position;
}
/**
* Operator F3Position plus F3Position
* This substract one from anther
* @param inPosition the position to reduce
* @param inOther the position to increase inPosition
* @return the resulting position
*/
F3DPosition operator+(const F3DPosition& inPosition, const F3DPosition& inOther){
F3DPosition position(inPosition);
position += inOther;
return position;
}
......@@ -174,57 +174,12 @@ public:
};
/**
* Operator F3Position minus FReal
* This substract inValue to all dimensions of the inPosition
* @param inPosition the position to compute
* @param inValue the value to decrease/substract position
* @return the resulting position
*/
F3DPosition operator-(const F3DPosition& inPosition, const FReal inValue){
F3DPosition position(inPosition);
position -= inValue;
return position;
}
/**
* Operator F3Position plus FReal
* This affect from inValue all dimensions of the inPosition
* @param inPosition the position to compute
* @param inValue the value to increase/affect position
* @return the resulting position
*/
F3DPosition operator+(const F3DPosition& inPosition, const FReal inValue){
F3DPosition position(inPosition);
position += inValue;
return position;
}
F3DPosition operator-(const F3DPosition& inPosition, const FReal inValue);;
F3DPosition operator+(const F3DPosition& inPosition, const FReal inValue);;
F3DPosition operator-(const F3DPosition& inPosition, const F3DPosition& inOther);;
F3DPosition operator+(const F3DPosition& inPosition, const F3DPosition& inOther);
/**
* Operator F3Position minus F3Position
* This substract one from anther
* @param inPosition the position to reduce
* @param inOther the position to decrease/substract inPosition
* @return the resulting position
*/
F3DPosition operator-(const F3DPosition& inPosition, const F3DPosition& inOther){
F3DPosition position(inPosition);
position -= inOther;
return position;
}
/**
* Operator F3Position plus F3Position
* This substract one from anther
* @param inPosition the position to reduce
* @param inOther the position to increase inPosition
* @return the resulting position
*/
F3DPosition operator+(const F3DPosition& inPosition, const F3DPosition& inOther){
F3DPosition position(inPosition);
position += inOther;
return position;
}
#endif //F3DPOSITION_HPP
......
#include "FMath.hpp"
// Constant values
const double FMath::FPi = M_PI;
const double FMath::FPiDiv2 = M_PI_2;
const double FMath::Epsilon = 0.00000000000000000001;
......@@ -99,9 +99,6 @@ struct FMath{
}
};
const double FMath::FPi = M_PI;
const double FMath::FPiDiv2 = M_PI_2;
const double FMath::Epsilon = 0.00000000000000000001;
#endif //FMATH_HPP
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment