Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper-Free
Commits
14b5c398
Commit
14b5c398
authored
Oct 25, 2016
by
Christopher Tenter
Browse files
compute transformed aabb in FloatingSubtreeNode
parent
d03842e6
Pipeline
#3357
passed with stage
in 47 minutes and 55 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
ACG/Scenegraph/FloatingSubtreeNode.cc
View file @
14b5c398
...
...
@@ -115,6 +115,32 @@ void FloatingSubtreeNode::setModelViewOverride(GLMatrixd modelview_override) {
modelview_override_inv_
.
invert
();
}
void
FloatingSubtreeNode
::
boundingBox
(
Vec3d
&
_bbMin
,
Vec3d
&
_bbMax
)
{
if
(
enable_modelview_override_
)
{
if
(
status
()
!=
BaseNode
::
HideChildren
)
{
BoundingBoxAction
action
;
BaseNode
::
ChildIter
cIt
,
cEnd
(
childrenEnd
());
// Process all children which are not second pass
for
(
cIt
=
childrenBegin
();
cIt
!=
cEnd
;
++
cIt
)
if
(
~
(
*
cIt
)
->
traverseMode
()
&
BaseNode
::
SecondPass
)
traverse
(
*
cIt
,
action
);
// Process all children which are second pass
for
(
cIt
=
childrenBegin
();
cIt
!=
cEnd
;
++
cIt
)
if
((
*
cIt
)
->
traverseMode
()
&
BaseNode
::
SecondPass
)
traverse
(
*
cIt
,
action
);
// Transform bounding box to view space
Vec3d
minVS
=
modelview_override_
.
transform_point
(
action
.
bbMin
());
Vec3d
maxVS
=
modelview_override_
.
transform_point
(
action
.
bbMax
());
_bbMin
.
minimize
(
minVS
);
_bbMax
.
maximize
(
maxVS
);
}
}
}
}
/* namespace Scenegraph */
}
/* namespace ACG */
...
...
ACG/Scenegraph/FloatingSubtreeNode.hh
View file @
14b5c398
...
...
@@ -115,6 +115,7 @@ class ACGDLLEXPORT FloatingSubtreeNode : public BaseNode {
void
leavePick
(
GLState
&
_state
,
PickTarget
_target
,
const
DrawModes
::
DrawMode
&
_drawMode
)
override
;
void
boundingBox
(
Vec3d
&
_bbMin
,
Vec3d
&
_bbMax
)
override
;
private:
GLMatrixd
modelview_override_
,
modelview_override_inv_
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment