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
RUcs.h
Go to the documentation of this file.
1
#ifndef RUCS_H
2
#define RUCS_H
3
4
#include "
RObject.h
"
5
#include "
RVector.h
"
6
#include "
RPropertyTypeId.h
"
7
8
class
RDocument
;
9
10
20
class
RUcs
:
public
RObject
{
21
public
:
22
static
RPropertyTypeId
PropertyName
;
23
static
RPropertyTypeId
PropertyOriginX
;
24
static
RPropertyTypeId
PropertyOriginY
;
25
static
RPropertyTypeId
PropertyOriginZ
;
26
static
RPropertyTypeId
PropertyXAxisDirectionX
;
27
static
RPropertyTypeId
PropertyXAxisDirectionY
;
28
static
RPropertyTypeId
PropertyXAxisDirectionZ
;
29
static
RPropertyTypeId
PropertyYAxisDirectionX
;
30
static
RPropertyTypeId
PropertyYAxisDirectionY
;
31
static
RPropertyTypeId
PropertyYAxisDirectionZ
;
32
33
public
:
34
RUcs
() :
RObject
(),
origin
(0,0,0),
xAxisDirection
(1,0,0),
yAxisDirection
(0,1,0) {
35
}
36
37
RUcs
(
38
RDocument
*
document
,
39
const
QString&
name
,
40
const
RVector
&
origin
,
41
const
RVector
&
xAxisDirection
,
42
const
RVector
&
yAxisDirection
43
) :
RObject
(document),
44
name(name),
45
origin(origin),
46
xAxisDirection(xAxisDirection),
47
yAxisDirection(yAxisDirection) {
48
}
49
50
virtual
~RUcs
() {
51
}
52
53
static
void
init
();
54
55
virtual
RUcs
*
clone
()
const
{
56
return
new
RUcs
(*
this
);
57
}
58
59
virtual
bool
isSelectedForPropertyEditing
() {
60
return
false
;
61
}
62
63
virtual
QPair<QVariant, RPropertyAttributes>
getProperty
(
64
RPropertyTypeId
propertyTypeId,
65
bool
humanReadable =
false
,
bool
noAttributes =
false
);
66
virtual
bool
setProperty
(
RPropertyTypeId
propertyTypeId,
67
const
QVariant& value);
68
69
void
setOrigin
(
const
RVector
& o) {
70
origin
= o;
71
}
72
73
void
setXAxisDirection
(
const
RVector
& x) {
74
xAxisDirection
= x;
75
}
76
77
void
setYAxisDirection
(
const
RVector
& y) {
78
yAxisDirection
= y;
79
}
80
81
RVector
getZAxisDirection
();
82
83
RVector
mapFromUcs
(
const
RVector
& positionUcs);
84
RVector
mapToUcs
(
const
RVector
& positionWcs);
85
86
public
:
87
QString
name
;
88
RVector
origin
;
89
RVector
xAxisDirection
;
90
RVector
yAxisDirection
;
91
};
92
93
Q_DECLARE_METATYPE
(
RUcs
)
94
Q_DECLARE_METATYPE
(
RUcs
*)
95
Q_DECLARE_METATYPE
(QSharedPointer<
RUcs
>)
96
Q_DECLARE_METATYPE
(QSharedPointer<
RUcs
>*)
97
98
#endif
src
core
RUcs.h
Generated on Tue Jun 26 2012 18:41:07 for QCAD Application Framework by
1.8.1.1