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
1c7fb6aa
Commit
1c7fb6aa
authored
2 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
ba3d Object + accessor fct geo()
parent
f67285af
No related branches found
No related tags found
1 merge request
!1067
break include cycle in ba3d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
GUI/ba3d/model/object.cpp
+9
-4
9 additions, 4 deletions
GUI/ba3d/model/object.cpp
GUI/ba3d/model/object.h
+2
-1
2 additions, 1 deletion
GUI/ba3d/model/object.h
with
11 additions
and
5 deletions
GUI/ba3d/model/object.cpp
+
9
−
4
View file @
1c7fb6aa
...
@@ -95,7 +95,14 @@ void Object::addExtrinsicRotation(F3 turn, F3 scale, F3& rotate, F3 rotateExtrin
...
@@ -95,7 +95,14 @@ void Object::addExtrinsicRotation(F3 turn, F3 scale, F3& rotate, F3 rotateExtrin
void
Object
::
releaseGeometry
()
void
Object
::
releaseGeometry
()
{
{
geo
.
reset
();
m_geo
.
reset
();
}
const
Geometry
&
Object
::
geo
()
{
if
(
!
m_geo
)
m_geo
=
geometryStore
().
getGeometry
(
gky
);
return
*
m_geo
;
}
}
void
Object
::
draw
(
Canvas
&
canvas
)
void
Object
::
draw
(
Canvas
&
canvas
)
...
@@ -103,9 +110,7 @@ void Object::draw(Canvas& canvas)
...
@@ -103,9 +110,7 @@ void Object::draw(Canvas& canvas)
if
(
isNull
)
if
(
isNull
)
return
;
return
;
if
(
!
geo
)
canvas
.
draw
(
color
,
mat
,
geo
());
geo
=
geometryStore
().
getGeometry
(
gky
);
canvas
.
draw
(
color
,
mat
,
*
geo
);
}
}
}
// namespace GUI::RealSpace
}
// namespace GUI::RealSpace
...
...
This diff is collapsed.
Click to expand it.
GUI/ba3d/model/object.h
+
2
−
1
View file @
1c7fb6aa
...
@@ -41,6 +41,7 @@ public:
...
@@ -41,6 +41,7 @@ public:
void
transform
(
F3
turn
,
F3
scale
,
F3
rotate
,
F3
translate
);
void
transform
(
F3
turn
,
F3
scale
,
F3
rotate
,
F3
translate
);
void
addExtrinsicRotation
(
F3
turn
,
F3
scale
,
F3
&
rotate
,
F3
rotateExtrinsic
,
F3
&
translate
);
void
addExtrinsicRotation
(
F3
turn
,
F3
scale
,
F3
&
rotate
,
F3
rotateExtrinsic
,
F3
&
translate
);
const
Geometry
&
geo
();
protected:
protected:
bool
isNull
;
bool
isNull
;
...
@@ -49,7 +50,7 @@ private:
...
@@ -49,7 +50,7 @@ private:
Model
*
model
;
Model
*
model
;
GeometricID
::
Key
gky
;
GeometricID
::
Key
gky
;
GeometryHandle
geo
;
// retrieved on demand
GeometryHandle
m_
geo
;
// retrieved on demand
void
releaseGeometry
();
// can be released whenever
void
releaseGeometry
();
// can be released whenever
QMatrix4x4
mat
;
QMatrix4x4
mat
;
...
...
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