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
f9f9b620
Commit
f9f9b620
authored
2 years ago
by
Mikhail Svechnikov
Browse files
Options
Downloads
Patches
Plain Diff
RotationItem: back from using 'RotMatrix'
parent
85f048bf
No related branches found
No related tags found
1 merge request
!1220
RotationItem: back from using 'RotMatrix'
Pipeline
#84223
passed
2 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
GUI/Model/Sample/ItemWithParticles.cpp
+1
-2
1 addition, 2 deletions
GUI/Model/Sample/ItemWithParticles.cpp
GUI/Model/Sample/RotationItems.cpp
+0
-11
0 additions, 11 deletions
GUI/Model/Sample/RotationItems.cpp
GUI/Model/Sample/RotationItems.h
+2
-10
2 additions, 10 deletions
GUI/Model/Sample/RotationItems.h
with
3 additions
and
23 deletions
GUI/Model/Sample/ItemWithParticles.cpp
+
1
−
2
View file @
f9f9b620
...
...
@@ -41,8 +41,7 @@ std::unique_ptr<IRotation> ItemWithParticles::createRotation() const
{
if
(
!
m_rotation
.
currentItem
())
return
{};
const
auto
matrix
=
m_rotation
->
rotation
();
return
std
::
unique_ptr
<
IRotation
>
(
IRotation
::
createRotation
(
matrix
));
return
m_rotation
->
createRotation
();
}
void
ItemWithParticles
::
writeTo
(
QXmlStreamWriter
*
w
)
const
...
...
This diff is collapsed.
Click to expand it.
GUI/Model/Sample/RotationItems.cpp
+
0
−
11
View file @
f9f9b620
...
...
@@ -32,17 +32,6 @@ using namespace Units;
// ----------------------------------------------------------------------------
RotationItem
::
RotationItem
()
{}
RotMatrix
RotationItem
::
rotation
()
const
{
auto
p
=
createRotation
();
return
(
p
!=
nullptr
)
?
p
->
rotMatrix
()
:
RotMatrix
();
}
// ----------------------------------------------------------------------------
void
XYZRotationItem
::
serialize
(
Streamer
&
s
)
{
// s.assertVersion(0);
...
...
This diff is collapsed.
Click to expand it.
GUI/Model/Sample/RotationItems.h
+
2
−
10
View file @
f9f9b620
...
...
@@ -26,7 +26,7 @@ using std::unique_ptr;
class
RotationItem
{
public:
virtual
~
RotationItem
()
=
default
;
Rot
M
at
rix
r
otation
()
const
;
virtual
unique_ptr
<
I
Rotat
ion
>
createR
otation
()
const
=
0
;
virtual
void
serialize
(
Streamer
&
s
)
=
0
;
virtual
void
writeTo
(
QXmlStreamWriter
*
w
)
const
=
0
;
...
...
@@ -34,8 +34,7 @@ public:
virtual
DoubleProperties
rotationProperties
()
=
0
;
protected:
RotationItem
();
virtual
unique_ptr
<
IRotation
>
createRotation
()
const
=
0
;
RotationItem
()
{}
};
class
XYZRotationItem
:
public
RotationItem
{
...
...
@@ -54,24 +53,18 @@ protected:
class
XRotationItem
:
public
XYZRotationItem
{
public:
XRotationItem
();
protected:
unique_ptr
<
IRotation
>
createRotation
()
const
override
;
};
class
YRotationItem
:
public
XYZRotationItem
{
public:
YRotationItem
();
protected:
unique_ptr
<
IRotation
>
createRotation
()
const
override
;
};
class
ZRotationItem
:
public
XYZRotationItem
{
public:
ZRotationItem
();
protected:
unique_ptr
<
IRotation
>
createRotation
()
const
override
;
};
...
...
@@ -87,7 +80,6 @@ public:
void
setBeta
(
double
v
)
{
m_beta
.
setValue
(
v
);
}
void
setGamma
(
double
v
)
{
m_gamma
.
setValue
(
v
);
}
protected
:
unique_ptr
<
IRotation
>
createRotation
()
const
override
;
private
:
...
...
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