SNAP Library 3.0, User Reference  2016-07-20 17:56:49
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TFltRect Class Reference

#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
 
TFltRectoperator= (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
 

Detailed Description

Definition at line 1482 of file dt.h.

Constructor & Destructor Documentation

TFltRect::TFltRect ( )
inline

Definition at line 1486 of file dt.h.

1486  :
1487  MnX(), MnY(), MxX(), MxY(){}
TFlt MnX
Definition: dt.h:1484
TFlt MnY
Definition: dt.h:1484
TFlt MxY
Definition: dt.h:1484
TFlt MxX
Definition: dt.h:1484
TFltRect::TFltRect ( const TFltRect FltRect)
inline

Definition at line 1488 of file dt.h.

1488  :
1489  MnX(FltRect.MnX), MnY(FltRect.MnY), MxX(FltRect.MxX), MxY(FltRect.MxY){}
TFlt MnX
Definition: dt.h:1484
TFlt MnY
Definition: dt.h:1484
TFlt MxY
Definition: dt.h:1484
TFlt MxX
Definition: dt.h:1484
TFltRect::TFltRect ( const double &  _MnX,
const double &  _MnY,
const double &  _MxX,
const double &  _MxY 
)
inline

Definition at line 1490 of file dt.h.

1492  :
1493  MnX(_MnX), MnY(_MnY), MxX(_MxX), MxY(_MxY){}
TFlt MnX
Definition: dt.h:1484
TFlt MnY
Definition: dt.h:1484
TFlt MxY
Definition: dt.h:1484
TFlt MxX
Definition: dt.h:1484
TFltRect::TFltRect ( TSIn SIn)
inline

Definition at line 1494 of file dt.h.

1494  :
1495  MnX(SIn), MnY(SIn), MxX(SIn), MxY(SIn){}
TFlt MnX
Definition: dt.h:1484
TFlt MnY
Definition: dt.h:1484
TFlt MxY
Definition: dt.h:1484
TFlt MxX
Definition: dt.h:1484

Member Function Documentation

double TFltRect::GetMnX ( ) const
inline

Definition at line 1506 of file dt.h.

1506 {return MnX;}
TFlt MnX
Definition: dt.h:1484
double TFltRect::GetMnY ( ) const
inline

Definition at line 1507 of file dt.h.

1507 {return MnY;}
TFlt MnY
Definition: dt.h:1484
double TFltRect::GetMxX ( ) const
inline

Definition at line 1508 of file dt.h.

1508 {return MxX;}
TFlt MxX
Definition: dt.h:1484
double TFltRect::GetMxY ( ) const
inline

Definition at line 1509 of file dt.h.

1509 {return MxY;}
TFlt MxY
Definition: dt.h:1484
TStr TFltRect::GetStr ( ) const

Definition at line 2325 of file dt.cpp.

2325  {
2326  TChA ChA;
2327  ChA+='(';
2328  ChA+=TFlt::GetStr(MnX, "%0.2f"); ChA+=',';
2329  ChA+=TFlt::GetStr(MnY, "%0.2f"); ChA+=',';
2330  ChA+=TFlt::GetStr(MxX, "%0.2f"); ChA+=',';
2331  ChA+=TFlt::GetStr(MxY, "%0.2f"); ChA+=')';
2332  return ChA;
2333 }
TFlt MnX
Definition: dt.h:1484
TFlt MnY
Definition: dt.h:1484
TFlt MxY
Definition: dt.h:1484
Definition: dt.h:201
TFlt MxX
Definition: dt.h:1484
TStr GetStr() const
Definition: dt.h:1369
double TFltRect::GetXCenter ( ) const
inline

Definition at line 1516 of file dt.h.

1516 {return MnX+(MxX-MnX)/2;}
TFlt MnX
Definition: dt.h:1484
TFlt MxX
Definition: dt.h:1484
double TFltRect::GetXLen ( ) const
inline

Definition at line 1512 of file dt.h.

1512 {return MxX-MnX;}
TFlt MnX
Definition: dt.h:1484
TFlt MxX
Definition: dt.h:1484
double TFltRect::GetYCenter ( ) const
inline

Definition at line 1517 of file dt.h.

1517 {return MnY+(MxY-MnY)/2;}
TFlt MnY
Definition: dt.h:1484
TFlt MxY
Definition: dt.h:1484
double TFltRect::GetYLen ( ) const
inline

Definition at line 1513 of file dt.h.

1513 {return MxY-MnY;}
TFlt MnY
Definition: dt.h:1484
TFlt MxY
Definition: dt.h:1484
bool TFltRect::Intersection ( const TFltRect Rect1,
const TFltRect Rect2 
)
static

Definition at line 2317 of file dt.cpp.

2317  {
2318  const double MnXX = TFlt::GetMx(Rect1.GetMnX(), Rect2.GetMnX());
2319  const double MnYY = TFlt::GetMx(Rect1.GetMnY(), Rect2.GetMnY());
2320  const double MxXX = TFlt::GetMn(Rect1.GetMxX(), Rect2.GetMxX());
2321  const double MxYY = TFlt::GetMn(Rect1.GetMxY(), Rect2.GetMxY());
2322  return (MnXX < MxXX) && (MnYY < MxYY);
2323 }
double GetMnY() const
Definition: dt.h:1507
static double GetMx(const double &Flt1, const double &Flt2)
Definition: dt.h:1351
double GetMxY() const
Definition: dt.h:1509
double GetMxX() const
Definition: dt.h:1508
static double GetMn(const double &Flt1, const double &Flt2)
Definition: dt.h:1344
double GetMnX() const
Definition: dt.h:1506
bool TFltRect::IsXYIn ( const double &  X,
const double &  Y 
) const
inline

Definition at line 1520 of file dt.h.

1520  {
1521  return (MnX<=X)&&(X<=MxX)&&(MnY<=Y)&&(Y<=MxY);}
TFlt MnX
Definition: dt.h:1484
TFlt MnY
Definition: dt.h:1484
TFlt MxY
Definition: dt.h:1484
TFlt MxX
Definition: dt.h:1484
void TFltRect::LoadXml ( const PXmlTok XmlTok,
const TStr Nm 
)

Definition at line 2303 of file dt.cpp.

2303  {
2304  XLoadHd(Nm);
2305  MnX=TXmlObjSer::GetFltArg(XmlTok, "MnX");
2306  MnY=TXmlObjSer::GetFltArg(XmlTok, "MnY");
2307  MxX=TXmlObjSer::GetFltArg(XmlTok, "MxX");
2308  MxY=TXmlObjSer::GetFltArg(XmlTok, "MxY");
2309 }
#define XLoadHd(Nm)
Definition: bd.h:312
TFlt MnX
Definition: dt.h:1484
TFlt MnY
Definition: dt.h:1484
TFlt MxY
Definition: dt.h:1484
static double GetFltArg(const PXmlTok &XmlTok, const TStr &Nm)
Definition: xml.cpp:104
TFlt MxX
Definition: dt.h:1484
TFltRect& TFltRect::operator= ( const TFltRect FltRect)
inline

Definition at line 1501 of file dt.h.

1501  {
1502  MnX=FltRect.MnX; MnY=FltRect.MnY; MxX=FltRect.MxX; MxY=FltRect.MxY;
1503  return *this;}
TFlt MnX
Definition: dt.h:1484
TFlt MnY
Definition: dt.h:1484
TFlt MxY
Definition: dt.h:1484
TFlt MxX
Definition: dt.h:1484
void TFltRect::Save ( TSOut SOut) const
inline

Definition at line 1496 of file dt.h.

1496  {
1497  MnX.Save(SOut); MnY.Save(SOut); MxX.Save(SOut); MxY.Save(SOut);}
TFlt MnX
Definition: dt.h:1484
TFlt MnY
Definition: dt.h:1484
TFlt MxY
Definition: dt.h:1484
TFlt MxX
Definition: dt.h:1484
void Save(TSOut &SOut) const
Definition: dt.h:1309
void TFltRect::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 2311 of file dt.cpp.

2311  {
2312  XSaveBETagArg4(Nm,
2313  "MnX", TFlt::GetStr(double(MnX)), "MnY", TFlt::GetStr(double(MnY)),
2314  "MxX", TFlt::GetStr(double(MxX)), "MxY", TFlt::GetStr(double(MxY)));
2315 }
TFlt MnX
Definition: dt.h:1484
#define XSaveBETagArg4(Nm, ArgNm1, ArgVal1, ArgNm2, ArgVal2, ArgNm3, ArgVal3, ArgNm4, ArgVal4)
Definition: bd.h:330
TFlt MnY
Definition: dt.h:1484
TFlt MxY
Definition: dt.h:1484
TFlt MxX
Definition: dt.h:1484
TStr GetStr() const
Definition: dt.h:1369

Member Data Documentation

TFlt TFltRect::MnX

Definition at line 1484 of file dt.h.

TFlt TFltRect::MnY

Definition at line 1484 of file dt.h.

TFlt TFltRect::MxX

Definition at line 1484 of file dt.h.

TFlt TFltRect::MxY

Definition at line 1484 of file dt.h.


The documentation for this class was generated from the following files: