Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
fix ruler clipping and nml reader.
Browse files Browse the repository at this point in the history
  • Loading branch information
takashi310 committed Mar 13, 2023
1 parent 88e208d commit 4a86e0d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fluorender/FluoRender/VRenderFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1832,9 +1832,13 @@ void VRenderFrame::ConvertNML2SWC(wxString filename, VRenderView* vrv)
double radius_scale = glm::length(res);

if (elem->Attribute("name"))
{
name = elem->Attribute("name");
name = wxString::Format("%d_", count) + name;
}
else
name = wxString::Format("component_%d", count);
count++;

if (elem->Attribute("color.r"))
{
Expand Down
19 changes: 19 additions & 0 deletions fluorender/FluoRender/VRenderView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15788,6 +15788,24 @@ Point* VRenderVulkanView::GetEditingRulerPoint(int mx, int my)
{
Ruler* ruler = m_ruler_list[i];
if (!ruler) continue;

bool skip = true;
if (m_cur_vol)
{
for (size_t j=0; j<ruler->GetNumPoint(); ++j)
{
if (m_cur_vol->InsideClippingPlanes(*(ruler->GetPoint(j))))
{
skip = false;
break;
}
}
}
else
skip = false;

if (skip)
continue;

for (j=0; j<ruler->GetNumPoint(); j++)
{
Expand Down Expand Up @@ -17225,6 +17243,7 @@ void VRenderVulkanView::OnMouse(wxMouseEvent& event)
if (t <= 0.0)
failed = true;
}

if (!failed)
{
m_editing_ruler_point->x(point.x());
Expand Down

0 comments on commit 4a86e0d

Please sign in to comment.