Rhino C++ API  7.21
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ON_4dRect Class Reference

#include <opennurbs_point.h>

Public Member Functions

 ON_4dRect ()=default
 
 ON_4dRect (const ON_2dPoint &point, const ON_2dSize &size)
 
 ON_4dRect (const ON_2dPoint topLeft, const ON_2dPoint &bottomRight)
 
 ON_4dRect (const ON_4dRect &)=default
 
 ON_4dRect (double left, double top, double right, double bottom)
 
 ~ON_4dRect ()=default
 
const ON_2dPoint BottomRight (void) const
 
const ON_2dPoint CenterPoint (void) const
 
void DeflateRect (double, double)
 
double Height (void) const
 
void InflateRect (double, double)
 
void InflateRect (double, double, double, double)
 
bool IntersectRect (const ON_4dRect &r1, const ON_4dRect &r2)
 
bool IntersectRect (const ON_4dRect *r1, const ON_4dRect *r2)
 
bool IsRectEmpty (void) const
 
bool IsRectNull (void) const
 
bool IsSet () const
 
bool IsZero () const
 
void NormalizeRect ()
 
void OffsetRect (const ON_2dVector &)
 
void OffsetRect (double, double)
 
ON_4dRectoperator= (const ON_4dRect &)=default
 
bool PtInRect (const ON_2dPoint &pt) const
 
void SetRect (double l, double t, double r, double b)
 
void SetRectEmpty (void)
 
void SetZero ()
 
const ON_2dSize Size (void) const
 
bool SubtractRect (const ON_4dRect *rect1, const ON_4dRect *rect2)
 
const ON_2dPoint TopLeft (void) const
 
double Width (void) const
 

Public Attributes

double bottom
 
double left
 
double right
 
double top
 

Static Public Attributes

static const ON_4dRect Unset
 (ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX) More...
 
static const ON_4dRect Zero
 (0.0,0.0,0.0,0.0) More...
 

Detailed Description

Class ON_4iRect For those situations where a Windows SDK RECT or MFC CRect value needs to be used in code that does not link with MFC. If you want a traditional bounding box, use ON_2dBoundingBox.

Constructor & Destructor Documentation

◆ ON_4dRect() [1/5]

ON_4dRect::ON_4dRect ( )
default

Default construction intentionally leaves x and y uninitialized. Use something like ON_4dRect pt(1.0,2.0,3.0,4.0); or ON_4dRect pt = ON_4dRect::Zero; when you need an initialized ON_4dRect.

◆ ~ON_4dRect()

ON_4dRect::~ON_4dRect ( )
default

◆ ON_4dRect() [2/5]

ON_4dRect::ON_4dRect ( const ON_4dRect )
default

◆ ON_4dRect() [3/5]

ON_4dRect::ON_4dRect ( double  left,
double  top,
double  right,
double  bottom 
)

◆ ON_4dRect() [4/5]

ON_4dRect::ON_4dRect ( const ON_2dPoint  topLeft,
const ON_2dPoint bottomRight 
)

◆ ON_4dRect() [5/5]

ON_4dRect::ON_4dRect ( const ON_2dPoint point,
const ON_2dSize size 
)

Member Function Documentation

◆ BottomRight()

const ON_2dPoint ON_4dRect::BottomRight ( void  ) const

◆ CenterPoint()

const ON_2dPoint ON_4dRect::CenterPoint ( void  ) const

◆ DeflateRect()

void ON_4dRect::DeflateRect ( double  ,
double   
)

◆ Height()

double ON_4dRect::Height ( void  ) const

◆ InflateRect() [1/2]

void ON_4dRect::InflateRect ( double  ,
double   
)

◆ InflateRect() [2/2]

void ON_4dRect::InflateRect ( double  ,
double  ,
double  ,
double   
)

◆ IntersectRect() [1/2]

bool ON_4dRect::IntersectRect ( const ON_4dRect r1,
const ON_4dRect r2 
)

◆ IntersectRect() [2/2]

bool ON_4dRect::IntersectRect ( const ON_4dRect r1,
const ON_4dRect r2 
)

◆ IsRectEmpty()

bool ON_4dRect::IsRectEmpty ( void  ) const

◆ IsRectNull()

bool ON_4dRect::IsRectNull ( void  ) const

◆ IsSet()

bool ON_4dRect::IsSet ( ) const

Returns: true if none of left, top, right, or bottom is set to ON_UNSET_INT_INDEX

◆ IsZero()

bool ON_4dRect::IsZero ( ) const

Returns: true if all of left, top, right, and bottom are set to 0.

◆ NormalizeRect()

void ON_4dRect::NormalizeRect ( )

◆ OffsetRect() [1/2]

void ON_4dRect::OffsetRect ( const ON_2dVector )

◆ OffsetRect() [2/2]

void ON_4dRect::OffsetRect ( double  ,
double   
)

◆ operator=()

ON_4dRect& ON_4dRect::operator= ( const ON_4dRect )
default

◆ PtInRect()

bool ON_4dRect::PtInRect ( const ON_2dPoint pt) const

◆ SetRect()

void ON_4dRect::SetRect ( double  l,
double  t,
double  r,
double  b 
)

◆ SetRectEmpty()

void ON_4dRect::SetRectEmpty ( void  )
inline

◆ SetZero()

void ON_4dRect::SetZero ( )

◆ Size()

const ON_2dSize ON_4dRect::Size ( void  ) const

◆ SubtractRect()

bool ON_4dRect::SubtractRect ( const ON_4dRect rect1,
const ON_4dRect rect2 
)

◆ TopLeft()

const ON_2dPoint ON_4dRect::TopLeft ( void  ) const

◆ Width()

double ON_4dRect::Width ( void  ) const

Member Data Documentation

◆ bottom

double ON_4dRect::bottom

◆ left

double ON_4dRect::left

◆ right

double ON_4dRect::right

◆ top

double ON_4dRect::top

◆ Unset

const ON_4dRect ON_4dRect::Unset
static

(ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX,ON_UNSET_INT_INDEX)

◆ Zero

const ON_4dRect ON_4dRect::Zero
static

(0.0,0.0,0.0,0.0)