Skip to content

Commit

Permalink
feat(pointcloud-info): Sync pointCloud showing info
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerwin-L committed Sep 14, 2022
1 parent d3406b4 commit 49cf007
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import MathUtils from '@/utils/MathUtils';
import RenderDomClass from '@/utils/tool/RenderDomClass';
import { DEFAULT_FONT, ELineTypes, SEGMENT_NUMBER } from '@/constant/tool';
import { DEFAULT_TEXT_SHADOW, DEFAULT_TEXT_OFFSET, TEXT_ATTRIBUTE_OFFSET } from '@/constant/annotation';
import { BasicToolOperation, IBasicToolOperationProps } from './basicToolOperation';
import ImgPosUtils from '@/utils/tool/ImgPosUtils';
import { BasicToolOperation, IBasicToolOperationProps } from './basicToolOperation';

const newScope = 3;
const DEFAULT_RADIUS = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,28 @@ export const SizeInfoForView = ({ perspectiveView }: { perspectiveView: EPerspec
const box = pointCloudBoxList.find((i) => i.id === selectedID);

if (selectedID && box) {
const { length, width, height } = PointCloudUtils.transferBox2Kitti(box);
const infos =
perspectiveView === EPerspectiveView.Back
? [
{ label: '宽', value: box.width },
{ label: '高', value: box.depth },
{
label: '宽',
value: width,
},
{
label: '高',
value: height,
},
]
: [
{ label: '长', value: box.height },
{ label: '宽', value: box.width },
{
label: '长',
value: length,
},
{
label: '宽',
value: width,
},
];

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,6 @@ const PointCloudTopView: React.FC<IAnnotationStateProps> = ({ currentData }) =>
height: ref.current.clientHeight,
};

console.error("asd'");

const pointCloudAnnotation = new PointCloudAnnotation({
container: ref.current,
size,
Expand Down

0 comments on commit 49cf007

Please sign in to comment.