SNAP Library , User Reference  2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TFltRect Class Reference

#include <dt.h>

List of all members.

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 1455 of file dt.h.


Constructor & Destructor Documentation

TFltRect::TFltRect ( ) [inline]

Definition at line 1459 of file dt.h.

            :
    MnX(), MnY(), MxX(), MxY(){}
TFltRect::TFltRect ( const TFltRect FltRect) [inline]

Definition at line 1461 of file dt.h.

                                   :
    MnX(FltRect.MnX), MnY(FltRect.MnY), MxX(FltRect.MxX), MxY(FltRect.MxY){}
TFltRect::TFltRect ( const double &  _MnX,
const double &  _MnY,
const double &  _MxX,
const double &  _MxY 
) [inline]

Definition at line 1463 of file dt.h.

                                          :
    MnX(_MnX), MnY(_MnY), MxX(_MxX), MxY(_MxY){}
TFltRect::TFltRect ( TSIn SIn) [inline]

Definition at line 1467 of file dt.h.

                     :
    MnX(SIn), MnY(SIn), MxX(SIn), MxY(SIn){}

Member Function Documentation

double TFltRect::GetMnX ( ) const [inline]

Definition at line 1479 of file dt.h.

{return MnX;}
double TFltRect::GetMnY ( ) const [inline]

Definition at line 1480 of file dt.h.

{return MnY;}
double TFltRect::GetMxX ( ) const [inline]

Definition at line 1481 of file dt.h.

{return MxX;}
double TFltRect::GetMxY ( ) const [inline]

Definition at line 1482 of file dt.h.

{return MxY;}

Definition at line 2278 of file dt.cpp.

                            {
  TChA ChA;
  ChA+='(';
  ChA+=TFlt::GetStr(MnX, "%0.2f"); ChA+=',';
  ChA+=TFlt::GetStr(MnY, "%0.2f"); ChA+=',';
  ChA+=TFlt::GetStr(MxX, "%0.2f"); ChA+=',';
  ChA+=TFlt::GetStr(MxY, "%0.2f"); ChA+=')';
  return ChA;
}
double TFltRect::GetXCenter ( ) const [inline]

Definition at line 1489 of file dt.h.

{return MnX+(MxX-MnX)/2;}
double TFltRect::GetXLen ( ) const [inline]

Definition at line 1485 of file dt.h.

{return MxX-MnX;}
double TFltRect::GetYCenter ( ) const [inline]

Definition at line 1490 of file dt.h.

{return MnY+(MxY-MnY)/2;}
double TFltRect::GetYLen ( ) const [inline]

Definition at line 1486 of file dt.h.

{return MxY-MnY;}
bool TFltRect::Intersection ( const TFltRect Rect1,
const TFltRect Rect2 
) [static]

Definition at line 2270 of file dt.cpp.

                                                                       {
  const double MnXX = TFlt::GetMx(Rect1.GetMnX(), Rect2.GetMnX());
  const double MnYY = TFlt::GetMx(Rect1.GetMnY(), Rect2.GetMnY());
  const double MxXX = TFlt::GetMn(Rect1.GetMxX(), Rect2.GetMxX());
  const double MxYY = TFlt::GetMn(Rect1.GetMxY(), Rect2.GetMxY());
  return (MnXX < MxXX) && (MnYY < MxYY);
}
bool TFltRect::IsXYIn ( const double &  X,
const double &  Y 
) const [inline]

Definition at line 1493 of file dt.h.

                                                      {
    return (MnX<=X)&&(X<=MxX)&&(MnY<=Y)&&(Y<=MxY);}
void TFltRect::LoadXml ( const PXmlTok XmlTok,
const TStr Nm 
)

Definition at line 2256 of file dt.cpp.

                                                           {
  XLoadHd(Nm);
  MnX=TXmlObjSer::GetFltArg(XmlTok, "MnX");
  MnY=TXmlObjSer::GetFltArg(XmlTok, "MnY");
  MxX=TXmlObjSer::GetFltArg(XmlTok, "MxX");
  MxY=TXmlObjSer::GetFltArg(XmlTok, "MxY");
}
TFltRect& TFltRect::operator= ( const TFltRect FltRect) [inline]

Definition at line 1474 of file dt.h.

                                              {
    MnX=FltRect.MnX; MnY=FltRect.MnY; MxX=FltRect.MxX; MxY=FltRect.MxY;
    return *this;}
void TFltRect::Save ( TSOut SOut) const [inline]

Definition at line 1469 of file dt.h.

                               {
    MnX.Save(SOut); MnY.Save(SOut); MxX.Save(SOut); MxY.Save(SOut);}
void TFltRect::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 2264 of file dt.cpp.

                                                        {
  XSaveBETagArg4(Nm,
   "MnX", TFlt::GetStr(double(MnX)), "MnY", TFlt::GetStr(double(MnY)),
   "MxX", TFlt::GetStr(double(MxX)), "MxY", TFlt::GetStr(double(MxY)));
}

Member Data Documentation

Definition at line 1457 of file dt.h.

Definition at line 1457 of file dt.h.

Definition at line 1457 of file dt.h.

Definition at line 1457 of file dt.h.


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