MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / RectI

Class RectI

Engine/source/math/mRect.h:31–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30
31class RectI
32{
33 public:
34 Point2I point;
35 Point2I extent;
36
37 public:
38 RectI() { }
39 RectI(const Point2I& in_rMin,
40 const Point2I& in_rExtent);
41 RectI(const S32 in_left, const S32 in_top,
42 const S32 in_width, const S32 in_height);
43
44 void set(const Point2I& in_rMin, const Point2I& in_rExtent);
45 void set(const S32 in_left, const S32 in_top,
46 const S32 in_width, const S32 in_height);
47
48 bool intersect(const RectI& clipRect);
49 bool pointInRect(const Point2I& pt) const;
50 bool overlaps(RectI R) const;
51 bool contains(const RectI& R) const;
52 void inset(S32 x, S32 y);
53
54 void unionRects(const RectI&);
55
56 S32 len_x() const;
57 S32 len_y() const;
58
59 /// Returns the area of the rectangle.
60 S32 area() const { return extent.x * extent.y; }
61
62 bool operator==(const RectI&) const;
63 bool operator!=(const RectI&) const;
64
65 bool isValidRect() const { return (extent.x > 0 && extent.y > 0); }
66
67public:
68
69 /// A rect of zero extent.
70 static const RectI Zero;
71
72 /// A rect of 1,1 extent.
73 static const RectI One;
74
75};
76
77class RectF
78{

Callers 15

ConsoleSetTypeFunction · 0.70
onRenderMethod · 0.50
onRenderMethod · 0.50
onRenderMethod · 0.50
onRenderMethod · 0.50
_updateMethod · 0.50
getMonitorRectMethod · 0.50
getMonitorUsableRectMethod · 0.50
getPrimaryDesktopAreaMethod · 0.50
getMonitorRectMethod · 0.50
getMonitorUsableRectMethod · 0.50
getMonitorRegionsMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected