Skip to content

Commit

Permalink
Merge pull request #172 from epam/fixs_In_3D
Browse files Browse the repository at this point in the history
Fixs in 3 d
  • Loading branch information
BelSergUr authored Oct 11, 2023
2 parents 6e337c8 + f55045a commit f51d974
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/engine/VolumeRenderer3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ export default class VolumeRenderer3d {

onMouseDown(xx, yy) {
if (this.Tool23D) {
this.graphics23d.onMouseDown(xx / this.windowWidth, yy / this.windowHeight);
this.graphics23d.onMouseDown(xx / this.windowWidth, -yy / this.windowHeight);
return;
}
this.orbitControl.onMouseDown(xx, yy);
Expand All @@ -1418,14 +1418,14 @@ export default class VolumeRenderer3d {
this.eraserMouseDown = true;
if (this.isEraseMode && this.eraserStart) {
this.lockEraserBuffersUpdating = true;
this.volumeUpdater.eraser.eraseStart(xx, yy, this.windowWidth, this.matVolumeRender.uniforms.isoThreshold.value, true);
this.volumeUpdater.eraser.eraseStart(xx, -yy, this.windowWidth, this.matVolumeRender.uniforms.isoThreshold.value, true);
}
}

onMouseMove(xx, yy) {
//this.tools23d.onMouseMove(xx / this.windowWidth, yy / this.windowHeight);
if (this.Tool23D) {
this.graphics23d.onMouseMove(xx / this.windowWidth, yy / this.windowHeight);
this.graphics23d.onMouseMove(xx / this.windowWidth, -yy / this.windowHeight);
return;
}
if (this.checkFrameBufferMode !== CHECK_MODE_RESULT_OK) {
Expand All @@ -1435,13 +1435,13 @@ export default class VolumeRenderer3d {
if (!(this.isEraseMode && this.eraserMouseDown && this.eraserStart)) {
this.orbitControl.onMouseMove(xx, yy);
} else {
this.volumeUpdater.eraser.eraseStart(xx, yy, this.windowWidth, this.matVolumeRender.uniforms.isoThreshold.value, false);
this.volumeUpdater.eraser.eraseStart(xx, -yy, this.windowWidth, this.matVolumeRender.uniforms.isoThreshold.value, false);
}
}

onMouseUp(xx, yy) {
if (this.Tool23D) {
this.graphics23d.onMouseUp(xx / this.windowWidth, yy / this.windowHeight);
this.graphics23d.onMouseUp(xx / this.windowWidth, -yy / this.windowHeight);
return;
}
//this.tools23d.onMouseUp(xx / this.windowWidth, yy / this.windowHeight);
Expand Down
2 changes: 1 addition & 1 deletion src/ui/Modals/UiModalWinCW.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class UiModalWindowCenterWidth extends React.Component {
} // end render preview

onSliderWindowRange(value) {
this.m_updateEnable = false;
this.m_updateEnable = true;
const [min, max] = value;
this.setState({ windowMin: min });
this.setState({ windowMax: max });
Expand Down
3 changes: 0 additions & 3 deletions src/ui/Panels/Tabs/Mode3dSelectionTabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Modes3d from '../../../store/Modes3d';
import { Box, Tab, Tabs } from '@mui/material';
import { TabPanel } from './TabPanel';
import css from '../../Form/Slider.module.css';
import { HistogramProperty } from '../Properties3d/HistogramProperty';
import { IsosurfaceProperty } from '../Properties3d/IsosurfaceProperty';
import { AmbientOcclusionProperty } from '../Properties3d/AmbientOcclusionProperty';
import { SliderCaption } from '../../Form';
Expand Down Expand Up @@ -65,12 +64,10 @@ export function Mode3dSelectionTabs() {
</Tabs>
</Box>
<TabPanel index={Modes3d.ISO} value={mode3d}>
<HistogramProperty />
<IsosurfaceProperty />
<AmbientOcclusionProperty />
</TabPanel>
<TabPanel index={Modes3d.RAYCAST} value={mode3d}>
<HistogramProperty />
<SliderCaption caption="Set" />
<RGBProperty />
<OpacityProperty />
Expand Down

0 comments on commit f51d974

Please sign in to comment.