VOXEDIT: limit to 60fps
parent
9ca0bc805a
commit
1b69f50d7c
|
@ -14,6 +14,7 @@ VoxEdit::VoxEdit(const metric::MetricPtr& metric, const io::FilesystemPtr& files
|
|||
Super(metric, filesystem, eventBus, timeProvider), _mainWindow(nullptr), _meshPool(meshPool), _sceneMgr(voxedit::sceneMgr()) {
|
||||
init(ORGANISATION, "voxedit");
|
||||
_allowRelativeMouseMode = false;
|
||||
setFramesPerSecondsCap(60.0);
|
||||
}
|
||||
|
||||
bool VoxEdit::importheightmapFile(const std::string& file) {
|
||||
|
|
|
@ -391,7 +391,6 @@ bool VoxEditWindow::handleClickEvent(const tb::TBWidgetEvent &ev) {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (id == TBIDC("unsaved_changes_new")) {
|
||||
if (ev.ref_id == TBIDC("TBMessageWindow.yes")) {
|
||||
LayerWindow* win = new LayerWindow(this, TBIDC("new_scene"), _layerSettings);
|
||||
|
@ -402,18 +401,21 @@ bool VoxEditWindow::handleClickEvent(const tb::TBWidgetEvent &ev) {
|
|||
}
|
||||
}
|
||||
return true;
|
||||
} else if (id == TBIDC("unsaved_changes_quit")) {
|
||||
}
|
||||
if (id == TBIDC("unsaved_changes_quit")) {
|
||||
if (ev.ref_id == TBIDC("TBMessageWindow.yes")) {
|
||||
close();
|
||||
}
|
||||
return true;
|
||||
} else if (id == TBIDC("unsaved_changes_load")) {
|
||||
}
|
||||
if (id == TBIDC("unsaved_changes_load")) {
|
||||
if (ev.ref_id == TBIDC("TBMessageWindow.yes")) {
|
||||
sceneMgr().load(_loadFile);
|
||||
afterLoad(_loadFile);
|
||||
}
|
||||
return true;
|
||||
} else if (id == TBIDC("unsaved_changes_voxelize")) {
|
||||
}
|
||||
if (id == TBIDC("unsaved_changes_voxelize")) {
|
||||
if (ev.ref_id == TBIDC("TBMessageWindow.yes")) {
|
||||
const video::MeshPtr& mesh = _voxedit->meshPool()->getMesh(_voxelizeFile, false);
|
||||
sceneMgr().voxelizeModel(mesh);
|
||||
|
|
|
@ -181,7 +181,8 @@ bool LayerWidget::onEvent(const tb::TBWidgetEvent &ev) {
|
|||
const voxel::Region& region = _layerSettings.region();
|
||||
if (region.isValid()) {
|
||||
voxedit::LayerManager& layerMgr = voxedit::sceneMgr().layerMgr();
|
||||
const int layerId = layerMgr.addLayer(_layerSettings.name.c_str(), true, new voxel::RawVolume(_layerSettings.region()));
|
||||
voxel::RawVolume* v = new voxel::RawVolume(_layerSettings.region());
|
||||
const int layerId = layerMgr.addLayer(_layerSettings.name.c_str(), true, v);
|
||||
layerMgr.setActiveLayer(layerId);
|
||||
} else {
|
||||
_layerSettings.reset();
|
||||
|
|
Loading…
Reference in New Issue