Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
0db496f6
Commit
0db496f6
authored
3 years ago
by
Matthias Puchner
Browse files
Options
Downloads
Patches
Plain Diff
simplify RotationItem access
parent
aea6ea74
No related branches found
No related tags found
1 merge request
!575
Complete parameter tree builder, minor changes
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/Model/Sample/RotationItems.h
+5
-0
5 additions, 0 deletions
GUI/Model/Sample/RotationItems.h
GUI/View/SampleDesigner/LayerEditorUtils.cpp
+1
-10
1 addition, 10 deletions
GUI/View/SampleDesigner/LayerEditorUtils.cpp
with
6 additions
and
10 deletions
GUI/Model/Sample/RotationItems.h
+
5
−
0
View file @
0db496f6
...
@@ -30,6 +30,7 @@ public:
...
@@ -30,6 +30,7 @@ public:
RotMatrix
rotation
()
const
;
RotMatrix
rotation
()
const
;
virtual
void
serialize
(
Serializer
&
s
)
=
0
;
virtual
void
serialize
(
Serializer
&
s
)
=
0
;
virtual
DoubleDescriptors
rotationValues
()
const
=
0
;
protected:
protected:
RotationItem
();
RotationItem
();
...
@@ -40,6 +41,7 @@ class XRotationItem : public RotationItem {
...
@@ -40,6 +41,7 @@ class XRotationItem : public RotationItem {
public:
public:
XRotationItem
();
XRotationItem
();
void
serialize
(
Serializer
&
s
)
override
;
void
serialize
(
Serializer
&
s
)
override
;
DoubleDescriptors
rotationValues
()
const
override
{
return
{
m_angle
};
};
DoubleDescriptor
angle
()
const
;
DoubleDescriptor
angle
()
const
;
...
@@ -54,6 +56,7 @@ class YRotationItem : public RotationItem {
...
@@ -54,6 +56,7 @@ class YRotationItem : public RotationItem {
public:
public:
YRotationItem
();
YRotationItem
();
void
serialize
(
Serializer
&
s
)
override
;
void
serialize
(
Serializer
&
s
)
override
;
DoubleDescriptors
rotationValues
()
const
override
{
return
{
m_angle
};
};
DoubleDescriptor
angle
()
const
;
DoubleDescriptor
angle
()
const
;
...
@@ -68,6 +71,7 @@ class ZRotationItem : public RotationItem {
...
@@ -68,6 +71,7 @@ class ZRotationItem : public RotationItem {
public:
public:
ZRotationItem
();
ZRotationItem
();
void
serialize
(
Serializer
&
s
)
override
;
void
serialize
(
Serializer
&
s
)
override
;
DoubleDescriptors
rotationValues
()
const
override
{
return
{
m_angle
};
};
DoubleDescriptor
angle
()
const
;
DoubleDescriptor
angle
()
const
;
...
@@ -82,6 +86,7 @@ class EulerRotationItem : public RotationItem {
...
@@ -82,6 +86,7 @@ class EulerRotationItem : public RotationItem {
public:
public:
EulerRotationItem
();
EulerRotationItem
();
void
serialize
(
Serializer
&
s
)
override
;
void
serialize
(
Serializer
&
s
)
override
;
DoubleDescriptors
rotationValues
()
const
override
{
return
{
m_alpha
,
m_beta
,
m_gamma
};
};
DoubleDescriptor
alpha
()
const
;
DoubleDescriptor
alpha
()
const
;
DoubleDescriptor
beta
()
const
;
DoubleDescriptor
beta
()
const
;
...
...
This diff is collapsed.
Click to expand it.
GUI/View/SampleDesigner/LayerEditorUtils.cpp
+
1
−
10
View file @
0db496f6
...
@@ -147,16 +147,7 @@ DoubleDescriptors LayerEditorUtils::doubleDescriptorsOfItem(RotationItem* item)
...
@@ -147,16 +147,7 @@ DoubleDescriptors LayerEditorUtils::doubleDescriptorsOfItem(RotationItem* item)
if
(
!
item
)
if
(
!
item
)
return
{};
return
{};
if
(
auto
*
r
=
dynamic_cast
<
XRotationItem
*>
(
item
))
return
item
->
rotationValues
();
return
{
r
->
angle
()};
if
(
auto
*
r
=
dynamic_cast
<
YRotationItem
*>
(
item
))
return
{
r
->
angle
()};
if
(
auto
*
r
=
dynamic_cast
<
ZRotationItem
*>
(
item
))
return
{
r
->
angle
()};
if
(
auto
*
r
=
dynamic_cast
<
EulerRotationItem
*>
(
item
))
return
{
r
->
alpha
(),
r
->
beta
(),
r
->
gamma
()};
return
{};
}
}
DoubleDescriptors
LayerEditorUtils
::
doubleDescriptorsOfItem
(
FTDistribution2DItem
*
item
)
DoubleDescriptors
LayerEditorUtils
::
doubleDescriptorsOfItem
(
FTDistribution2DItem
*
item
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment