SNAP Library 2.1, Developer Reference
2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <dt.h>
Public Member Functions | |
TFltRect () | |
TFltRect (const TFltRect &FltRect) | |
TFltRect (const double &_MnX, const double &_MnY, const double &_MxX, const double &_MxY) | |
TFltRect (TSIn &SIn) | |
void | Save (TSOut &SOut) const |
void | LoadXml (const PXmlTok &XmlTok, const TStr &Nm) |
void | SaveXml (TSOut &SOut, const TStr &Nm) const |
TFltRect & | operator= (const TFltRect &FltRect) |
double | GetMnX () const |
double | GetMnY () const |
double | GetMxX () const |
double | GetMxY () const |
double | GetXLen () const |
double | GetYLen () const |
double | GetXCenter () const |
double | GetYCenter () const |
bool | IsXYIn (const double &X, const double &Y) const |
TStr | GetStr () const |
Static Public Member Functions | |
static bool | Intersection (const TFltRect &Rect1, const TFltRect &Rect2) |
Public Attributes | |
TFlt | MnX |
TFlt | MnY |
TFlt | MxX |
TFlt | MxY |
TFltRect::TFltRect | ( | ) | [inline] |
TFltRect::TFltRect | ( | const TFltRect & | FltRect | ) | [inline] |
TFltRect::TFltRect | ( | const double & | _MnX, |
const double & | _MnY, | ||
const double & | _MxX, | ||
const double & | _MxY | ||
) | [inline] |
TFltRect::TFltRect | ( | TSIn & | SIn | ) | [inline] |
double TFltRect::GetMnX | ( | ) | const [inline] |
Definition at line 1502 of file dt.h.
References MnX.
Referenced by Intersection().
{return MnX;}
double TFltRect::GetMnY | ( | ) | const [inline] |
Definition at line 1503 of file dt.h.
References MnY.
Referenced by Intersection().
{return MnY;}
double TFltRect::GetMxX | ( | ) | const [inline] |
Definition at line 1504 of file dt.h.
References MxX.
Referenced by Intersection().
{return MxX;}
double TFltRect::GetMxY | ( | ) | const [inline] |
Definition at line 1505 of file dt.h.
References MxY.
Referenced by Intersection().
{return MxY;}
TStr TFltRect::GetStr | ( | ) | const |
Definition at line 2325 of file dt.cpp.
References MnX, MnY, MxX, and MxY.
{ TChA ChA; ChA+='('; ChA+=TFlt::GetStr(MnX, "%0.2f"); ChA+=','; ChA+=TFlt::GetStr(MnY, "%0.2f"); ChA+=','; ChA+=TFlt::GetStr(MxX, "%0.2f"); ChA+=','; ChA+=TFlt::GetStr(MxY, "%0.2f"); ChA+=')'; return ChA; }
double TFltRect::GetXCenter | ( | ) | const [inline] |
double TFltRect::GetXLen | ( | ) | const [inline] |
double TFltRect::GetYCenter | ( | ) | const [inline] |
double TFltRect::GetYLen | ( | ) | const [inline] |
bool TFltRect::Intersection | ( | const TFltRect & | Rect1, |
const TFltRect & | Rect2 | ||
) | [static] |
Definition at line 2317 of file dt.cpp.
References TFlt::GetMn(), GetMnX(), GetMnY(), TFlt::GetMx(), GetMxX(), and GetMxY().
{ const double MnXX = TFlt::GetMx(Rect1.GetMnX(), Rect2.GetMnX()); const double MnYY = TFlt::GetMx(Rect1.GetMnY(), Rect2.GetMnY()); const double MxXX = TFlt::GetMn(Rect1.GetMxX(), Rect2.GetMxX()); const double MxYY = TFlt::GetMn(Rect1.GetMxY(), Rect2.GetMxY()); return (MnXX < MxXX) && (MnYY < MxYY); }
bool TFltRect::IsXYIn | ( | const double & | X, |
const double & | Y | ||
) | const [inline] |
void TFltRect::LoadXml | ( | const PXmlTok & | XmlTok, |
const TStr & | Nm | ||
) |
Definition at line 2303 of file dt.cpp.
References TXmlObjSer::GetFltArg(), MnX, MnY, MxX, MxY, and XLoadHd.
{ XLoadHd(Nm); MnX=TXmlObjSer::GetFltArg(XmlTok, "MnX"); MnY=TXmlObjSer::GetFltArg(XmlTok, "MnY"); MxX=TXmlObjSer::GetFltArg(XmlTok, "MxX"); MxY=TXmlObjSer::GetFltArg(XmlTok, "MxY"); }
void TFltRect::Save | ( | TSOut & | SOut | ) | const [inline] |
void TFltRect::SaveXml | ( | TSOut & | SOut, |
const TStr & | Nm | ||
) | const |
Definition at line 2311 of file dt.cpp.
References TFlt::GetStr(), MnX, MnY, MxX, MxY, and XSaveBETagArg4.
{ XSaveBETagArg4(Nm, "MnX", TFlt::GetStr(double(MnX)), "MnY", TFlt::GetStr(double(MnY)), "MxX", TFlt::GetStr(double(MxX)), "MxY", TFlt::GetStr(double(MxY))); }