11 static char THIS_FILE[]=__FILE__;
110 std::ostream STD_UTILS_PORT &
operator<<(std::ostream& oOs, CStdIPoint oPoint)
112 oOs <<
"(" << oPoint.x <<
", " << oPoint.y <<
", " << oPoint.z <<
")";
121 std::ostream STD_UTILS_PORT &
operator<<(std::ostream& oOs, CStdLPoint oPoint)
123 oOs <<
"(" << oPoint.x <<
", " << oPoint.y <<
", " << oPoint.z <<
")";
132 std::ostream STD_UTILS_PORT &
operator<<(std::ostream& oOs, CStdFPoint oPoint)
134 oOs <<
"(" << oPoint.x <<
", " << oPoint.y <<
", " << oPoint.z <<
")";
143 std::ostream STD_UTILS_PORT &
operator<<(std::ostream& oOs, CStdDPoint oPoint)
145 oOs <<
"(" << oPoint.x <<
", " << oPoint.y <<
", " << oPoint.z <<
")";
457 return (
double) sqrt( (
double) (pow((
double)(ptA.x-ptB.x), 2) + pow((
double)(ptA.y-ptB.y), 2) + pow((
double)(ptA.z-ptB.z), 2)) );
473 return (
double) sqrt( (
double) (pow((
double)(ptA.x-ptB.x), 2) + pow((
double)(ptA.y-ptB.y), 2) + pow((
double)(ptA.z-ptB.z), 2)) );
489 return sqrt( pow((ptA.x-ptB.x), 2) + pow((ptA.y-ptB.y), 2) + pow((ptA.z-ptB.z), 2) );
505 return sqrt( pow((ptA.x-ptB.x), 2) + pow((ptA.y-ptB.y), 2) + pow((ptA.z-ptB.z), 2) );
509 double STD_UTILS_PORT
Std_CalculateDistance(
float fltX1,
float fltY1,
float fltZ1,
float fltX2,
float fltY2,
float fltZ2)
511 return (
double) sqrt( (
double) (pow((
double)(fltX1-fltX2), 2) + pow((
double)(fltY1-fltY2), 2) + pow((
double)(fltZ1-fltZ2), 2)) );
virtual int GetAttribInt(std::string strAttribName, bool bThrowError=true, int iDefault=0)
Gets an attribute int.
virtual ~CStdSerialize()
Destructor.
virtual bool FindChildElement(std::string strElementName, bool fThrowError=true)
Finds a child element by name.
virtual void AddChildElement(std::string strElementName)
Adds a child element to current element.
virtual bool IntoElem()
Goes into the next element where the cursor is located.
virtual void Load(CStdXml &oXml)
Loads this object from an xml packet.
std::ostream & operator<<(std::ostream &oOs, CStdSerialize *lpObj)
writes to an output stream
A standard xml manipulation class.
virtual CStdSerialize * Clone()
Makes a deep copy of this object.
virtual float GetAttribFloat(std::string strAttribName, bool bThrowError=true, float fltDefault=0)
Gets an attribute float.
virtual double GetAttribDouble(std::string strAttribName, bool bThrowError=true, double dblDefault=0)
Gets an attribute double.
Namespace for the standard utility objects.
virtual void Save(CStdXml &oXml)
Saves this object to an xml packet..
virtual void Trace(std::ostream &oOs)
Traces this object to an output stream.
virtual bool OutOfElem()
Goes out of the element where the cursor is located.
virtual void Copy(CStdSerialize *lpSource)
Makes a deep copy of this object.
virtual long GetAttribLong(std::string strAttribName, bool bThrowError=true, long lDefault=0)
Gets an attribute long.
virtual bool IntoChildElement(std::string strElementName, bool bThrowError=true)
Goes into the child element with the specified name.
bool Std_LoadPoint(CStdXml &oXml, std::string strName, CStdIPoint &oPoint, bool bThrowError)
Standard load point.
void Std_SavePoint(CStdXml &oXml, std::string strName, CStdIPoint &oPoint)
Standard save point.
Standard serialize class.
virtual void SetAttrib(std::string strAttribName, std::string strVal)
Sets an attribute.
CStdSerialize()
Default constructor.
virtual bool FindChildByIndex(int iIndex, bool bThrowError=true)
Finds a child element by index.
double Std_CalculateDistance(CStdIPoint &ptA, CStdIPoint &ptB)
Calculates the distance between two points.