QCAD Application Framework
CAD Application Development and Automation.
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
RBox.h
Go to the documentation of this file.
1
#ifndef RBOX_H
2
#define RBOX_H
3
4
#include <QRectF>
5
6
#include "
RVector.h
"
7
#include "
RTriangle.h
"
8
9
class
RPolyline
;
10
11
#define RDEFAULT_RBOX RBox()
12
22
class
RBox
{
23
public
:
24
RBox
();
25
explicit
RBox
(
const
QRectF& rect);
26
RBox
(
const
RVector
&
c1
,
const
RVector
&
c2
);
27
RBox
(
const
RVector
& center,
double
range);
28
29
bool
isValid
()
const
;
30
31
double
getWidth
()
const
;
32
double
getHeight
()
const
;
33
RVector
getSize
()
const
;
34
RVector
getCenter
()
const
;
35
RVector
getMinimum
()
const
;
36
RVector
getMaximum
()
const
;
37
bool
isOutside
(
const
RBox
& other)
const
;
38
bool
contains
(
const
RBox
& other)
const
;
39
bool
contains
(
const
RVector
& v)
const
;
40
bool
intersects
(
const
RBox
& other)
const
;
41
42
void
growToInclude
(
const
RBox
& other);
43
void
growToInclude
(
const
RVector
& v);
44
45
RVector
getCorner1
();
46
void
setCorner1
(
const
RVector
& v);
47
RVector
getCorner2
();
48
void
setCorner2
(
const
RVector
& v);
49
50
QList<RVector>
getCorners
()
const
;
51
QList<RVector>
getCorners2d
()
const
;
52
QList<RLine>
getLines2d
()
const
;
53
RPolyline
getPolyline2d
()
const
;
54
QList<RTriangle>
getTriangles
()
const
;
55
56
RBox
&
grow
(
double
offset);
57
RBox
&
growXY
(
double
offset);
58
59
QRectF
toQRectF
()
const
;
60
61
bool
operator ==
(
const
RBox
& other)
const
;
62
bool
operator !=
(
const
RBox
& other)
const
{
63
return
!
operator==
(other);
64
}
65
66
public
:
71
RVector
c1
;
76
RVector
c2
;
77
};
78
79
QDebug
operator<<
(QDebug dbg,
const
RBox
& b);
80
81
Q_DECLARE_METATYPE
(
RBox
)
82
Q_DECLARE_METATYPE
(
RBox
*)
83
Q_DECLARE_METATYPE
(QSharedPointer<
RBox
>)
84
Q_DECLARE_METATYPE
(QSharedPointer<
RBox
>*)
85
Q_DECLARE_METATYPE
(QList<
RBox
>)
86
87
#endif
src
math
RBox.h
Generated on Tue Jun 26 2012 18:41:08 for QCAD Application Framework by
1.8.1.1