easyx_framework V1.0.0
基于easyx的c++游戏框架
 
载入中...
搜索中...
未找到
Rect结构体 参考

矩形框 更多...

#include <Struct.h>

Public 成员函数

 Rect (float _left=0, float _top=0, float _right=0, float _bottom=0)
 
Vector2D GetCenter () const
 获取矩形的中心点
 
Vector2D GetSize () const
 获取矩形大小
 
bool Intersects (const Rect &other) const
 检查两个矩形是否相交
 

Public 属性

float left
 <左边
 
float top
 <上面的边
 
float right
 <右边的边
 
float bottom
 下面的边
 

详细描述

矩形框

盒型坐标.

构造及析构函数说明

◆ Rect()

Rect::Rect ( float _left = 0,
float _top = 0,
float _right = 0,
float _bottom = 0 )
inline

成员函数说明

◆ GetCenter()

Vector2D Rect::GetCenter ( ) const
inline

获取矩形的中心点

◆ GetSize()

Vector2D Rect::GetSize ( ) const
inline

获取矩形大小

◆ Intersects()

bool Rect::Intersects ( const Rect & other) const
inline

检查两个矩形是否相交

类成员变量说明

◆ bottom

float Rect::bottom

下面的边

◆ left

float Rect::left

<左边

◆ right

float Rect::right

<右边的边

◆ top

float Rect::top

<上面的边