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

#include <opennurbs_fpoint.h>

Public Member Functions

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

Public Attributes

float bottom = 0
 
float left = 0
 
float right = 0
 
float top = 0
 

Static Public Attributes

static const ON_4fRect Unset
 (ON_UNSET_FLOAT,ON_UNSET_FLOAT,ON_UNSET_FLOAT,ON_UNSET_FLOAT) More...
 
static const ON_4fRect Zero
 (0.0f,0.0f,0.0f,0.0f) More...
 

Detailed Description

Class ON_4fRect Float precision version of ON_4dRect.

Constructor & Destructor Documentation

◆ ON_4fRect() [1/5]

ON_4fRect::ON_4fRect ( )
default

◆ ~ON_4fRect()

ON_4fRect::~ON_4fRect ( )
default

◆ ON_4fRect() [2/5]

ON_4fRect::ON_4fRect ( const ON_4fRect )
default

◆ ON_4fRect() [3/5]

ON_4fRect::ON_4fRect ( float  left,
float  top,
float  right,
float  bottom 
)

◆ ON_4fRect() [4/5]

ON_4fRect::ON_4fRect ( const ON_2fPoint  topLeft,
const ON_2fPoint bottomRight 
)

◆ ON_4fRect() [5/5]

ON_4fRect::ON_4fRect ( const ON_2fPoint point,
const ON_2fSize size 
)

Member Function Documentation

◆ BottomRight()

const ON_2fPoint ON_4fRect::BottomRight ( void  ) const

◆ CenterPoint()

const ON_2fPoint ON_4fRect::CenterPoint ( void  ) const

◆ DeflateRect()

void ON_4fRect::DeflateRect ( float  ,
float   
)

◆ Height()

float ON_4fRect::Height ( void  ) const

◆ InflateRect() [1/2]

void ON_4fRect::InflateRect ( float  ,
float   
)

◆ InflateRect() [2/2]

void ON_4fRect::InflateRect ( float  ,
float  ,
float  ,
float   
)

◆ IntersectRect() [1/2]

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

◆ IntersectRect() [2/2]

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

◆ IsRectEmpty()

bool ON_4fRect::IsRectEmpty ( void  ) const

◆ IsRectNull()

bool ON_4fRect::IsRectNull ( void  ) const

◆ IsSet()

bool ON_4fRect::IsSet ( ) const

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

◆ IsZero()

bool ON_4fRect::IsZero ( ) const

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

◆ NormalizeRect()

void ON_4fRect::NormalizeRect ( )

◆ OffsetRect() [1/2]

void ON_4fRect::OffsetRect ( const ON_2fVector )

◆ OffsetRect() [2/2]

void ON_4fRect::OffsetRect ( float  ,
float   
)

◆ operator=()

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

◆ PtInRect()

bool ON_4fRect::PtInRect ( const ON_2fPoint pt) const

◆ SetRect()

void ON_4fRect::SetRect ( float  l,
float  t,
float  r,
float  b 
)

◆ SetRectEmpty()

void ON_4fRect::SetRectEmpty ( void  )
inline

◆ SetZero()

void ON_4fRect::SetZero ( )

◆ Size()

const ON_2fSize ON_4fRect::Size ( void  ) const

◆ SubtractRect()

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

◆ TopLeft()

const ON_2fPoint ON_4fRect::TopLeft ( void  ) const

◆ Width()

float ON_4fRect::Width ( void  ) const

Member Data Documentation

◆ bottom

float ON_4fRect::bottom = 0

◆ left

float ON_4fRect::left = 0

◆ right

float ON_4fRect::right = 0

◆ top

float ON_4fRect::top = 0

◆ Unset

const ON_4fRect ON_4fRect::Unset
static

(ON_UNSET_FLOAT,ON_UNSET_FLOAT,ON_UNSET_FLOAT,ON_UNSET_FLOAT)

◆ Zero

const ON_4fRect ON_4fRect::Zero
static

(0.0f,0.0f,0.0f,0.0f)