Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ArViz Godot
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
Core
ArViz Godot
Commits
4e47db48
Commit
4e47db48
authored
2 years ago
by
Jean Patrick Mathes
Browse files
Options
Downloads
Patches
Plain Diff
Fix volume calculation of paths and lines
parent
2886504a
No related branches found
No related tags found
2 merge requests
!77
Upcoming Release
,
!42
Resolve "viz::Path and viz::Line are only drawn as single pixel line, i.e. do not consider with / lineWidth parameter"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/arviz_godot/lib/avi/scene/LineElementNode.cpp
+5
-5
5 additions, 5 deletions
source/arviz_godot/lib/avi/scene/LineElementNode.cpp
source/arviz_godot/lib/avi/scene/PathElementNode.cpp
+5
-5
5 additions, 5 deletions
source/arviz_godot/lib/avi/scene/PathElementNode.cpp
with
10 additions
and
10 deletions
source/arviz_godot/lib/avi/scene/LineElementNode.cpp
+
5
−
5
View file @
4e47db48
...
...
@@ -113,11 +113,11 @@ avi::scene::LineElementNode::newLineElementNode(std::string name, avi::core::Lay
godot
::
AABB
avi
::
scene
::
LineElementNode
::
getVolume
()
{
godot
::
AABB
aabb
(
a
,
godot
::
Vector3
::
ZERO
);
aabb
.
expand_to
(
b
);
godot
::
AABB
aabb
(
a
/
avi
::
core
::
GODOT_TO_ARMARX_CONVERSION_FACTOR
,
godot
::
Vector3
::
ZERO
);
aabb
.
expand_to
(
b
/
avi
::
core
::
GODOT_TO_ARMARX_CONVERSION_FACTOR
);
aabb
.
position
+=
staticBody
->
get_transform
().
origin
;
aabb
.
size
*=
staticBody
->
get_scale
()
*
0.5
;
aabb
.
size
*=
staticBody
->
get_scale
()
*
0.5
*
avi
::
core
::
GODOT_TO_ARMARX_CONVERSION_FACTOR
;
return
aabb
;
}
...
...
@@ -186,13 +186,13 @@ avi::scene::LineElementNode::updateLine(godot::Vector3 from, godot::Vector3 to)
void
avi
::
scene
::
LineElementNode
::
setPosition
(
godot
::
Vector3
position
)
{
this
->
set_translation
(
position
);
staticBody
->
set_translation
(
position
);
}
void
avi
::
scene
::
LineElementNode
::
setRotation
(
godot
::
Quat
rotation
)
{
this
->
set_rotation
(
rotation
.
get_euler
());
staticBody
->
set_rotation
(
rotation
.
get_euler
());
}
void
...
...
This diff is collapsed.
Click to expand it.
source/arviz_godot/lib/avi/scene/PathElementNode.cpp
+
5
−
5
View file @
4e47db48
...
...
@@ -128,10 +128,10 @@ avi::scene::PathElementNode::updateAttributes(int flag,
godot
::
AABB
avi
::
scene
::
PathElementNode
::
getVolume
()
{
godot
::
Vector3
position
=
minPoint
;
godot
::
Vector3
position
=
minPoint
/
avi
::
core
::
GODOT_TO_ARMARX_CONVERSION_FACTOR
;
godot
::
Vector3
size
=
maxPoint
-
minPoint
;
godot
::
AABB
aabb
(
position
/
avi
::
core
::
GODOT_TO_ARMARX_CONVERSION_FACTOR
,
size
);
godot
::
AABB
aabb
(
position
,
size
);
aabb
.
position
+=
staticBody
->
get_transform
().
origin
;
aabb
.
size
*=
staticBody
->
get_scale
()
*
0.5
;
...
...
@@ -280,19 +280,19 @@ avi::scene::PathElementNode::buildSpheres()
void
avi
::
scene
::
PathElementNode
::
setPosition
(
godot
::
Vector3
position
)
{
this
->
set_translation
(
position
);
staticBody
->
set_translation
(
position
);
}
void
avi
::
scene
::
PathElementNode
::
setRotation
(
godot
::
Quat
rotation
)
{
this
->
set_rotation
(
rotation
.
get_euler
());
staticBody
->
set_rotation
(
rotation
.
get_euler
());
}
void
avi
::
scene
::
PathElementNode
::
setScale
(
godot
::
Vector3
scale
)
{
this
->
set_scale
(
scale
);
staticBody
->
set_scale
(
scale
);
}
void
...
...
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