SNAP Library 2.4, User Reference  2015-05-11 19:40:56
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 1480 of file dt.h.

Constructor & Destructor Documentation

TFltRect::TFltRect ( )
inline

Definition at line 1484 of file dt.h.

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

Definition at line 1486 of file dt.h.

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

Definition at line 1488 of file dt.h.

1490  :
1491  MnX(_MnX), MnY(_MnY), MxX(_MxX), MxY(_MxY){}
TFlt MnX
Definition: dt.h:1482
TFlt MnY
Definition: dt.h:1482
TFlt MxY
Definition: dt.h:1482
TFlt MxX
Definition: dt.h:1482
TFltRect::TFltRect ( TSIn SIn)
inline

Definition at line 1492 of file dt.h.

1492  :
1493  MnX(SIn), MnY(SIn), MxX(SIn), MxY(SIn){}
TFlt MnX
Definition: dt.h:1482
TFlt MnY
Definition: dt.h:1482
TFlt MxY
Definition: dt.h:1482
TFlt MxX
Definition: dt.h:1482

Member Function Documentation

double TFltRect::GetMnX ( ) const
inline

Definition at line 1504 of file dt.h.

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

Definition at line 1505 of file dt.h.

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

Definition at line 1506 of file dt.h.

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

Definition at line 1507 of file dt.h.

1507 {return MxY;}
TFlt MxY
Definition: dt.h:1482
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:1482
TFlt MnY
Definition: dt.h:1482
TFlt MxY
Definition: dt.h:1482
Definition: dt.h:201
TFlt MxX
Definition: dt.h:1482
TStr GetStr() const
Definition: dt.h:1367
double TFltRect::GetXCenter ( ) const
inline

Definition at line 1514 of file dt.h.

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

Definition at line 1510 of file dt.h.

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

Definition at line 1515 of file dt.h.

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

Definition at line 1511 of file dt.h.

1511 {return MxY-MnY;}
TFlt MnY
Definition: dt.h:1482
TFlt MxY
Definition: dt.h:1482
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:1505
static double GetMx(const double &Flt1, const double &Flt2)
Definition: dt.h:1349
double GetMxY() const
Definition: dt.h:1507
double GetMxX() const
Definition: dt.h:1506
static double GetMn(const double &Flt1, const double &Flt2)
Definition: dt.h:1342
double GetMnX() const
Definition: dt.h:1504
bool TFltRect::IsXYIn ( const double &  X,
const double &  Y 
) const
inline

Definition at line 1518 of file dt.h.

1518  {
1519  return (MnX<=X)&&(X<=MxX)&&(MnY<=Y)&&(Y<=MxY);}
TFlt MnX
Definition: dt.h:1482
TFlt MnY
Definition: dt.h:1482
TFlt MxY
Definition: dt.h:1482
TFlt MxX
Definition: dt.h:1482
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:1482
TFlt MnY
Definition: dt.h:1482
TFlt MxY
Definition: dt.h:1482
static double GetFltArg(const PXmlTok &XmlTok, const TStr &Nm)
Definition: xml.cpp:104
TFlt MxX
Definition: dt.h:1482
TFltRect& TFltRect::operator= ( const TFltRect FltRect)
inline

Definition at line 1499 of file dt.h.

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

Definition at line 1494 of file dt.h.

1494  {
1495  MnX.Save(SOut); MnY.Save(SOut); MxX.Save(SOut); MxY.Save(SOut);}
TFlt MnX
Definition: dt.h:1482
TFlt MnY
Definition: dt.h:1482
TFlt MxY
Definition: dt.h:1482
TFlt MxX
Definition: dt.h:1482
void Save(TSOut &SOut) const
Definition: dt.h:1307
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:1482
#define XSaveBETagArg4(Nm, ArgNm1, ArgVal1, ArgNm2, ArgVal2, ArgNm3, ArgVal3, ArgNm4, ArgVal4)
Definition: bd.h:330
TFlt MnY
Definition: dt.h:1482
TFlt MxY
Definition: dt.h:1482
TFlt MxX
Definition: dt.h:1482
TStr GetStr() const
Definition: dt.h:1367

Member Data Documentation

TFlt TFltRect::MnX

Definition at line 1482 of file dt.h.

TFlt TFltRect::MnY

Definition at line 1482 of file dt.h.

TFlt TFltRect::MxX

Definition at line 1482 of file dt.h.

TFlt TFltRect::MxY

Definition at line 1482 of file dt.h.


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