Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Sofa/Component/Visual/src/sofa/component/visual/VisualMesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ void VisualMesh::init()
}
}

void VisualMesh::computeBBox(const core::ExecParams* exec_params, bool cond)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
void VisualMesh::computeBBox(const core::ExecParams* exec_params, bool cond)
void VisualMesh::computeBBox(const core::ExecParams* exec_params, bool computeOnlyVisible)

cond is not really.... informative 🫢

{
if (!d_enable.getValue())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!d_enable.getValue())
SOFA_UNUSED(computeOnlyVisible);
if (!d_enable.getValue())

return;

type::BoundingBox bbox;
for (const auto& i : sofa::helper::getReadAccessor(d_position))
{
bbox.include(i);
}
this->f_bbox.setValue(bbox);
}

void VisualMesh::doDrawVisual(const core::visual::VisualParams* vparams)
{
auto* drawTool = vparams->drawTool();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class VisualMesh : public core::visual::VisualModel
sofa::BaseLink::FLAG_STOREPATH | sofa::BaseLink::FLAG_STRONGLINK> l_topology;

void init() override;
void computeBBox(const core::ExecParams*, bool) override;

protected:

Expand Down
Loading