Skip to content

Commit

Permalink
Implement group bounds property
Browse files Browse the repository at this point in the history
  • Loading branch information
szellmann committed May 15, 2024
1 parent 314ed0e commit d416507
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
20 changes: 5 additions & 15 deletions scene/Group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ bool Group::getProperty(
visionaraySceneConstruct();
visionaraySceneCommit();
}
// auto bounds = getEmbreeSceneBounds(m_embreeScene);
// for (auto *v : volumes()) {
// if (v->isValid())
// bounds.extend(v->bounds());
// }
// std::memcpy(ptr, &bounds, sizeof(bounds));
return true;
if (vscene && vscene->isValid()) {
auto bounds = vscene->getBounds();
std::memcpy(ptr, &bounds, sizeof(bounds));
return true;
}
}

return Object::getProperty(name, type, ptr, flags);
Expand Down Expand Up @@ -211,14 +209,6 @@ void Group::cleanup()
vscene = nullptr;
}

// box3 getEmbreeSceneBounds(RTCScene scene)
// {
// RTCBounds eb;
// rtcGetSceneBounds(scene, &eb);
// return box3({eb.lower_x, eb.lower_y, eb.lower_z},
// {eb.upper_x, eb.upper_y, eb.upper_z});
// }

} // namespace visionaray

VISIONARAY_ANARI_TYPEFOR_DEFINITION(visionaray::Group *);
2 changes: 0 additions & 2 deletions scene/Group.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ struct Group : public Object
VisionarayScene vscene{nullptr};
};

// box3 getEmbreeSceneBounds(RTCScene scene);

} // namespace visionaray

VISIONARAY_ANARI_TYPEFOR_SPECIALIZATION(visionaray::Group *, ANARI_GROUP);
1 change: 0 additions & 1 deletion scene/surface/geometry/Geometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Geometry::~Geometry()
{
deviceState()->dcos.geometries.free(vgeom.geomID);

// rtcReleaseGeometry(m_embreeGeometry);
deviceState()->objectCounts.geometries--;
}

Expand Down

0 comments on commit d416507

Please sign in to comment.