Skip to content

Commit

Permalink
3d viewer: various improvements and fixes
Browse files Browse the repository at this point in the history
- fix track color lookup
- handle showing only selected track
- draw only filtered track
- show cube axes actor
- fix: show track by default
- fix: features are no longer exposed on track since #1287
so we now use a different mechanism to get the feature set of a track
- use getTracksMerged since we don't care about cameras in this mode, we just want the detections
and their attributes
  • Loading branch information
bourdaisj committed Apr 17, 2024
1 parent c74f5ca commit 6c8a20f
Show file tree
Hide file tree
Showing 7 changed files with 704 additions and 296 deletions.
16 changes: 15 additions & 1 deletion client/dive-common/components/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ import { usePrompt } from 'dive-common/vue-utilities/prompt-service';
import context from 'dive-common/store/context';
import { MarkChangesPendingFilter, TrackWithContext } from 'vue-media-annotator/BaseFilterControls';
import { EditAnnotationTypes, VisibleAnnotationTypes } from 'vue-media-annotator/layers';
import TrackViewer from 'vue-media-annotator/components/TrackViewer.vue';
import TrackViewer from 'vue-media-annotator/components/track_3d_viewer/TrackViewer.vue';
import TrackViewerSettings from 'vue-media-annotator/components/track_3d_viewer/TrackViewerSettings.vue';
import GroupSidebarVue from './GroupSidebar.vue';
import MultiCamToolsVue from './MultiCamTools.vue';
import PrimaryAttributeTrackFilter from './PrimaryAttributeTrackFilter.vue';
Expand All @@ -73,6 +74,7 @@ export default defineComponent({
EditorMenu,
PrimaryAttributeTrackFilter,
TrackViewer,
TrackViewerSettings,
},
// TODO: remove this in vue 3
Expand Down Expand Up @@ -101,7 +103,12 @@ export default defineComponent({
setup(props, ctx) {
const { prompt } = usePrompt();
const loadError = ref('');
const tracks3d = ref(false);
const trackViewerSettings = reactive({
onlyShowSelectedTrack: false,
});
const baseMulticamDatasetId = ref(null as string | null);
const datasetId = toRef(props, 'id');
const multiCamList: Ref<string[]> = ref(['singleCam']);
Expand Down Expand Up @@ -966,6 +973,7 @@ export default defineComponent({
onGeometryAdded,
datasetId,
tracks3d,
trackViewerSettings,
};
},
});
Expand Down Expand Up @@ -1087,6 +1095,11 @@ export default defineComponent({
>
Toggle 3d
</v-btn>

<track-viewer-settings
v-if="tracks3d"
:only-show-selected-track.sync="trackViewerSettings.onlyShowSelectedTrack"
/>
<v-divider
vertical
class="mx-2"
Expand Down Expand Up @@ -1190,6 +1203,7 @@ export default defineComponent({
<track-viewer
v-if="tracks3d"
:controls-height="controlsHeight"
:only-show-selected-track="trackViewerSettings.onlyShowSelectedTrack"
/>
<div
v-else
Expand Down
295 changes: 0 additions & 295 deletions client/src/components/TrackViewer.vue

This file was deleted.

Loading

0 comments on commit 6c8a20f

Please sign in to comment.