SNAP Library 4.1, Developer Reference  2018-07-26 16:30:42
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 1572 of file dt.h.

Constructor & Destructor Documentation

TFltRect::TFltRect ( )
inline

Definition at line 1576 of file dt.h.

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

Definition at line 1578 of file dt.h.

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

Definition at line 1580 of file dt.h.

1582  :
1583  MnX(_MnX), MnY(_MnY), MxX(_MxX), MxY(_MxY){}
TFlt MnX
Definition: dt.h:1574
TFlt MnY
Definition: dt.h:1574
TFlt MxY
Definition: dt.h:1574
TFlt MxX
Definition: dt.h:1574
TFltRect::TFltRect ( TSIn SIn)
inline

Definition at line 1584 of file dt.h.

1584  :
1585  MnX(SIn), MnY(SIn), MxX(SIn), MxY(SIn){}
TFlt MnX
Definition: dt.h:1574
TFlt MnY
Definition: dt.h:1574
TFlt MxY
Definition: dt.h:1574
TFlt MxX
Definition: dt.h:1574

Member Function Documentation

double TFltRect::GetMnX ( ) const
inline

Definition at line 1596 of file dt.h.

References MnX.

Referenced by Intersection().

1596 {return MnX;}
TFlt MnX
Definition: dt.h:1574

Here is the caller graph for this function:

double TFltRect::GetMnY ( ) const
inline

Definition at line 1597 of file dt.h.

References MnY.

Referenced by Intersection().

1597 {return MnY;}
TFlt MnY
Definition: dt.h:1574

Here is the caller graph for this function:

double TFltRect::GetMxX ( ) const
inline

Definition at line 1598 of file dt.h.

References MxX.

Referenced by Intersection().

1598 {return MxX;}
TFlt MxX
Definition: dt.h:1574

Here is the caller graph for this function:

double TFltRect::GetMxY ( ) const
inline

Definition at line 1599 of file dt.h.

References MxY.

Referenced by Intersection().

1599 {return MxY;}
TFlt MxY
Definition: dt.h:1574

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

Here is the call graph for this function:

double TFltRect::GetXCenter ( ) const
inline

Definition at line 1606 of file dt.h.

References MnX, and MxX.

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

Definition at line 1602 of file dt.h.

References MnX, and MxX.

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

Definition at line 1607 of file dt.h.

References MnY, and MxY.

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

Definition at line 1603 of file dt.h.

References MnY, and MxY.

1603 {return MxY-MnY;}
TFlt MnY
Definition: dt.h:1574
TFlt MxY
Definition: dt.h:1574
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:1597
static double GetMx(const double &Flt1, const double &Flt2)
Definition: dt.h:1441
double GetMxY() const
Definition: dt.h:1599
double GetMxX() const
Definition: dt.h:1598
static double GetMn(const double &Flt1, const double &Flt2)
Definition: dt.h:1434
double GetMnX() const
Definition: dt.h:1596

Here is the call graph for this function:

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

Definition at line 1610 of file dt.h.

References MnX, MnY, MxX, and MxY.

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

Here is the call graph for this function:

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

Definition at line 1591 of file dt.h.

References MnX, MnY, MxX, and MxY.

1591  {
1592  MnX=FltRect.MnX; MnY=FltRect.MnY; MxX=FltRect.MxX; MxY=FltRect.MxY;
1593  return *this;}
TFlt MnX
Definition: dt.h:1574
TFlt MnY
Definition: dt.h:1574
TFlt MxY
Definition: dt.h:1574
TFlt MxX
Definition: dt.h:1574
void TFltRect::Save ( TSOut SOut) const
inline

Definition at line 1586 of file dt.h.

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

1586  {
1587  MnX.Save(SOut); MnY.Save(SOut); MxX.Save(SOut); MxY.Save(SOut);}
TFlt MnX
Definition: dt.h:1574
TFlt MnY
Definition: dt.h:1574
TFlt MxY
Definition: dt.h:1574
TFlt MxX
Definition: dt.h:1574
void Save(TSOut &SOut) const
Definition: dt.h:1399

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

Here is the call graph for this function:

Member Data Documentation

TFlt TFltRect::MnX

Definition at line 1574 of file dt.h.

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

TFlt TFltRect::MnY

Definition at line 1574 of file dt.h.

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

TFlt TFltRect::MxX

Definition at line 1574 of file dt.h.

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

TFlt TFltRect::MxY

Definition at line 1574 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: