SNAP Library 2.0, User Reference  2013-05-13 16:33:57
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 1478 of file dt.h.


Constructor & Destructor Documentation

TFltRect::TFltRect ( ) [inline]

Definition at line 1482 of file dt.h.

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

Definition at line 1484 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 1486 of file dt.h.

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

Definition at line 1490 of file dt.h.

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

Member Function Documentation

double TFltRect::GetMnX ( ) const [inline]

Definition at line 1502 of file dt.h.

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

Definition at line 1503 of file dt.h.

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

Definition at line 1504 of file dt.h.

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

Definition at line 1505 of file dt.h.

{return MxY;}

Definition at line 2325 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 1512 of file dt.h.

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

Definition at line 1508 of file dt.h.

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

Definition at line 1513 of file dt.h.

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

Definition at line 1509 of file dt.h.

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

Definition at line 2317 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 1516 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 2303 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 1497 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 1492 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 2311 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 1480 of file dt.h.

Definition at line 1480 of file dt.h.

Definition at line 1480 of file dt.h.

Definition at line 1480 of file dt.h.


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