Commit 33c71247 authored by messner's avatar messner

added overloaded operator <<


git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@355 2616d619-271b-44dc-8df4-d4a8f33a7222
parent ebca05d7
......@@ -243,6 +243,19 @@ public:
friend inline F3DPosition operator+(const F3DPosition& inPosition, const F3DPosition& inOther){
return F3DPosition(inPosition.x + inOther.x, inPosition.y + inOther.y, inPosition.z + inOther.z);
}
/**
* Operator stream F3DPosition to std::ostream
* This can be used to simply write out a position
* @param[in,out] output where to write the position
* @param[in] inPosition the position to write out
* @return the output for multiple << operators
*/
friend std::ostream& operator<<(std::ostream& output, const F3DPosition& inPosition)
{
output << "(" << inPosition.getX() << ", " << inPosition.getY() << ", " << inPosition.getZ() <<")";
return output; // for multiple << operators.
}
};
......
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