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
RPolylineData.h
Go to the documentation of this file.
1
#ifndef RPOLYLINEDATA_H
2
#define RPOLYLINEDATA_H
3
4
#include "
RBox.h
"
5
#include "
RDocument.h
"
6
#include "
REntity.h
"
7
#include "
RPolyline.h
"
8
#include "
RVector.h
"
9
17
class
RPolylineData
:
public
REntityData
,
protected
RPolyline
{
18
19
friend
class
RPolylineEntity
;
20
21
protected
:
22
RPolylineData
(
RDocument
*
document
,
const
RPolylineData
&
data
);
23
24
public
:
25
RPolylineData
();
26
RPolylineData
(
const
RPolyline
& polyline);
27
28
virtual
QList<RBox>
getBoundingBoxes
()
const
;
29
30
virtual
QList<RVector>
getReferencePoints
(
31
RS::ProjectionRenderingHint
hint =
RS::RenderTop
)
const
;
32
33
virtual
bool
moveReferencePoint
(
const
RVector
& referencePoint,
34
const
RVector
& targetPoint);
35
36
virtual
RShape
*
castToShape
() {
37
return
this
;
38
}
39
40
void
clear
() {
41
RPolyline::clear
();
42
}
43
44
void
normalize
() {
45
RPolyline::normalize
();
46
}
47
48
QList<RVector>
getVertices
()
const
{
49
return
RPolyline::getVertices
();
50
}
51
52
RVector
getVertexAt
(
int
i)
const
{
53
return
RPolyline::getVertexAt
(i);
54
}
55
56
void
appendVertex
(
const
RVector
& vertex,
double
bulge = 0.0) {
57
RPolyline::appendVertex
(vertex, bulge);
58
}
59
60
void
prependVertex
(
const
RVector
& vertex,
double
bulge = 0.0) {
61
RPolyline::prependVertex
(vertex, bulge);
62
}
63
64
void
insertVertex
(
int
index,
const
RVector
& vertex) {
65
RPolyline::insertVertex
(index, vertex);
66
}
67
68
void
removeLastVertex
() {
69
RPolyline::removeLastVertex
();
70
}
71
72
void
removeVertex
(
int
index) {
73
RPolyline::removeVertex
(index);
74
}
75
76
int
countSegments
()
const
{
77
return
RPolyline::countSegments
();
78
}
79
80
QSharedPointer<RShape>
getSegmentAt
(
int
i)
const
{
81
return
RPolyline::getSegmentAt
(i);
82
}
83
84
double
getBulgeAt
(
int
i)
const
{
85
return
RPolyline::getBulgeAt
(i);
86
}
87
88
void
setBulgeAt
(
int
i,
double
b) {
89
RPolyline::setBulgeAt
(i, b);
90
}
91
92
double
getDirection1
()
const
{
93
return
RPolyline::getDirection1
();
94
}
95
96
double
getDirection2
()
const
{
97
return
RPolyline::getDirection2
();
98
}
99
100
bool
reverse
() {
101
return
RPolyline::reverse
();
102
}
103
104
RVector
getEndPoint
()
const
{
105
return
RPolyline::getEndPoint
();
106
}
107
108
RVector
getStartPoint
()
const
{
109
return
RPolyline::getStartPoint
();
110
}
111
112
void
setClosed
(
bool
on) {
113
RPolyline::setClosed
(on);
114
}
115
116
bool
isClosed
()
const
{
117
return
RPolyline::isClosed
();
118
}
119
120
bool
isLogicallyClosed
()
const
{
121
return
RPolyline::isLogicallyClosed
();
122
}
123
124
QList<QSharedPointer<RShape> >
getExploded
()
const
{
125
return
RPolyline::getExploded
();
126
}
127
128
virtual
QList<QSharedPointer<RShape> >
getShapes
(
const
RBox
& queryBox =
RDEFAULT_RBOX
)
const
{
129
Q_UNUSED(queryBox)
130
131
return
QList<QSharedPointer<RShape> >() <<
132
QSharedPointer<RShape>(
new
RPolyline
(*
this
));
133
}
134
135
virtual
QList<RVector>
getIntersectionPoints
(
136
const
REntityData
& other,
bool
limited =
true
,
bool
same =
false
,
137
const
RBox
& queryBox =
RDEFAULT_RBOX
/*,
138
const QSet<int>& pos = RDEFAULT_QSET_INT,
139
const QSet<int>& posOther = RDEFAULT_QSET_INT*/
)
const
;
140
};
141
142
Q_DECLARE_METATYPE
(
RPolylineData
*)
143
Q_DECLARE_METATYPE
(QSharedPointer<
RPolylineData
>)
144
145
#endif
src
entity
RPolylineData.h
Generated on Tue Jun 26 2012 18:41:08 for QCAD Application Framework by
1.8.1.1