SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
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 1575 of file dt.h.

Constructor & Destructor Documentation

TFltRect::TFltRect ( )
inline

Definition at line 1579 of file dt.h.

1579  :
1580  MnX(), MnY(), MxX(), MxY(){}
TFlt MnX
Definition: dt.h:1577
TFlt MnY
Definition: dt.h:1577
TFlt MxY
Definition: dt.h:1577
TFlt MxX
Definition: dt.h:1577
TFltRect::TFltRect ( const TFltRect FltRect)
inline

Definition at line 1581 of file dt.h.

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

Definition at line 1583 of file dt.h.

1585  :
1586  MnX(_MnX), MnY(_MnY), MxX(_MxX), MxY(_MxY){}
TFlt MnX
Definition: dt.h:1577
TFlt MnY
Definition: dt.h:1577
TFlt MxY
Definition: dt.h:1577
TFlt MxX
Definition: dt.h:1577
TFltRect::TFltRect ( TSIn SIn)
inline

Definition at line 1587 of file dt.h.

1587  :
1588  MnX(SIn), MnY(SIn), MxX(SIn), MxY(SIn){}
TFlt MnX
Definition: dt.h:1577
TFlt MnY
Definition: dt.h:1577
TFlt MxY
Definition: dt.h:1577
TFlt MxX
Definition: dt.h:1577

Member Function Documentation

double TFltRect::GetMnX ( ) const
inline

Definition at line 1599 of file dt.h.

References MnX.

Referenced by Intersection().

1599 {return MnX;}
TFlt MnX
Definition: dt.h:1577

Here is the caller graph for this function:

double TFltRect::GetMnY ( ) const
inline

Definition at line 1600 of file dt.h.

References MnY.

Referenced by Intersection().

1600 {return MnY;}
TFlt MnY
Definition: dt.h:1577

Here is the caller graph for this function:

double TFltRect::GetMxX ( ) const
inline

Definition at line 1601 of file dt.h.

References MxX.

Referenced by Intersection().

1601 {return MxX;}
TFlt MxX
Definition: dt.h:1577

Here is the caller graph for this function:

double TFltRect::GetMxY ( ) const
inline

Definition at line 1602 of file dt.h.

References MxY.

Referenced by Intersection().

1602 {return MxY;}
TFlt MxY
Definition: dt.h:1577

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:1577
TFlt MnY
Definition: dt.h:1577
TFlt MxY
Definition: dt.h:1577
Definition: dt.h:201
TFlt MxX
Definition: dt.h:1577
TStr GetStr() const
Definition: dt.h:1462

Here is the call graph for this function:

double TFltRect::GetXCenter ( ) const
inline

Definition at line 1609 of file dt.h.

References MnX.

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

Definition at line 1605 of file dt.h.

References MnX.

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

Definition at line 1610 of file dt.h.

References MnY.

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

Definition at line 1606 of file dt.h.

References MnY.

1606 {return MxY-MnY;}
TFlt MnY
Definition: dt.h:1577
TFlt MxY
Definition: dt.h:1577
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:1600
static double GetMx(const double &Flt1, const double &Flt2)
Definition: dt.h:1444
double GetMxY() const
Definition: dt.h:1602
double GetMxX() const
Definition: dt.h:1601
static double GetMn(const double &Flt1, const double &Flt2)
Definition: dt.h:1437
double GetMnX() const
Definition: dt.h:1599

Here is the call graph for this function:

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

Definition at line 1613 of file dt.h.

References MxX, and MxY.

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

Here is the call graph for this function:

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

Definition at line 1594 of file dt.h.

References MnX, MnY, MxX, and MxY.

1594  {
1595  MnX=FltRect.MnX; MnY=FltRect.MnY; MxX=FltRect.MxX; MxY=FltRect.MxY;
1596  return *this;}
TFlt MnX
Definition: dt.h:1577
TFlt MnY
Definition: dt.h:1577
TFlt MxY
Definition: dt.h:1577
TFlt MxX
Definition: dt.h:1577
void TFltRect::Save ( TSOut SOut) const
inline

Definition at line 1589 of file dt.h.

References TFlt::Save().

1589  {
1590  MnX.Save(SOut); MnY.Save(SOut); MxX.Save(SOut); MxY.Save(SOut);}
TFlt MnX
Definition: dt.h:1577
TFlt MnY
Definition: dt.h:1577
TFlt MxY
Definition: dt.h:1577
TFlt MxX
Definition: dt.h:1577
void Save(TSOut &SOut) const
Definition: dt.h:1402

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:1577
#define XSaveBETagArg4(Nm, ArgNm1, ArgVal1, ArgNm2, ArgVal2, ArgNm3, ArgVal3, ArgNm4, ArgVal4)
Definition: bd.h:330
TFlt MnY
Definition: dt.h:1577
TFlt MxY
Definition: dt.h:1577
TFlt MxX
Definition: dt.h:1577
TStr GetStr() const
Definition: dt.h:1462

Here is the call graph for this function:

Member Data Documentation

TFlt TFltRect::MnX

Definition at line 1577 of file dt.h.

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

TFlt TFltRect::MnY

Definition at line 1577 of file dt.h.

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

TFlt TFltRect::MxX

Definition at line 1577 of file dt.h.

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

TFlt TFltRect::MxY

Definition at line 1577 of file dt.h.

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


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