SNAP Library 2.4, Developer 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>

Collaboration diagram for TFltRect:

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.

References MnX.

Referenced by Intersection().

1504 {return MnX;}
TFlt MnX
Definition: dt.h:1482

Here is the caller graph for this function:

double TFltRect::GetMnY ( ) const
inline

Definition at line 1505 of file dt.h.

References MnY.

Referenced by Intersection().

1505 {return MnY;}
TFlt MnY
Definition: dt.h:1482

Here is the caller graph for this function:

double TFltRect::GetMxX ( ) const
inline

Definition at line 1506 of file dt.h.

References MxX.

Referenced by Intersection().

1506 {return MxX;}
TFlt MxX
Definition: dt.h:1482

Here is the caller graph for this function:

double TFltRect::GetMxY ( ) const
inline

Definition at line 1507 of file dt.h.

References MxY.

Referenced by Intersection().

1507 {return MxY;}
TFlt MxY
Definition: dt.h:1482

Here is the caller graph for this function:

TStr TFltRect::GetStr ( ) const

Definition at line 2325 of file dt.cpp.

References TFlt::GetStr(), MnX, MnY, MxX, and MxY.

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

Here is the call graph for this function:

double TFltRect::GetXCenter ( ) const
inline

Definition at line 1514 of file dt.h.

References MnX, and MxX.

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.

References MnX, and MxX.

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.

References MnY, and MxY.

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.

References MnY, and MxY.

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.

References TFlt::GetMn(), GetMnX(), GetMnY(), TFlt::GetMx(), GetMxX(), and GetMxY().

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

Here is the call graph for this function:

bool TFltRect::IsXYIn ( const double &  X,
const double &  Y 
) const
inline

Definition at line 1518 of file dt.h.

References MnX, MnY, MxX, and MxY.

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.

References TXmlObjSer::GetFltArg(), MnX, MnY, MxX, MxY, and XLoadHd.

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

Here is the call graph for this function:

TFltRect& TFltRect::operator= ( const TFltRect FltRect)
inline

Definition at line 1499 of file dt.h.

References MnX, MnY, MxX, and MxY.

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.

References MnX, MnY, MxX, MxY, and TFlt::Save().

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

Here is the call graph for this function:

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.

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

Here is the call graph for this function:

Member Data Documentation

TFlt TFltRect::MnX

Definition at line 1482 of file dt.h.

Referenced by GetMnX(), GetStr(), GetXCenter(), GetXLen(), IsXYIn(), LoadXml(), operator=(), Save(), and SaveXml().

TFlt TFltRect::MnY

Definition at line 1482 of file dt.h.

Referenced by GetMnY(), GetStr(), GetYCenter(), GetYLen(), IsXYIn(), LoadXml(), operator=(), Save(), and SaveXml().

TFlt TFltRect::MxX

Definition at line 1482 of file dt.h.

Referenced by GetMxX(), GetStr(), GetXCenter(), GetXLen(), IsXYIn(), LoadXml(), operator=(), Save(), and SaveXml().

TFlt TFltRect::MxY

Definition at line 1482 of file dt.h.

Referenced by GetMxY(), GetStr(), GetYCenter(), GetYLen(), IsXYIn(), LoadXml(), operator=(), Save(), and SaveXml().


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