Public Member Functions | Public Attributes | List of all members
Rect2 Struct Reference

Public Member Functions

const Vector2get_pos () const
 
void set_pos (const Vector2 &p_pos)
 
const Vector2get_size () const
 
void set_size (const Vector2 &p_size)
 
float get_area () const
 
bool intersects (const Rect2 &p_rect) const
 
float distance_to (const Vector2 &p_point) const
 
_FORCE_INLINE_ bool intersects_transformed (const Matrix32 &p_xform, const Rect2 &p_rect) const
 
bool intersects_segment (const Point2 &p_from, const Point2 &p_to, Point2 *r_pos=NULL, Point2 *r_normal=NULL) const
 
bool encloses (const Rect2 &p_rect) const
 
bool has_no_area () const
 
Rect2 clip (const Rect2 &p_rect) const
 
Rect2 merge (const Rect2 &p_rect) const
 
bool has_point (const Point2 &p_point) const
 
bool no_area () const
 
bool operator== (const Rect2 &p_rect) const
 
bool operator!= (const Rect2 &p_rect) const
 
Rect2 grow (real_t p_by) const
 
Rect2 expand (const Vector2 &p_vector) const
 
void expand_to (const Vector2 &p_vector)
 
 operator String () const
 
 Rect2 (float p_x, float p_y, float p_width, float p_height)
 
 Rect2 (const Point2 &p_pos, const Size2 &p_size)
 

Public Attributes

Point2 pos
 
Size2 size
 

Member Function Documentation

Rect2 Rect2::clip ( const Rect2 p_rect) const
inline

return a clipped rect

Rect2 Rect2::merge ( const Rect2 p_rect) const
inline

< return a merged rect


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