Skip to content

Commit

Permalink
fix: Update the function of getCuboidFromPointCloudBox
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerwin-L committed Nov 25, 2022
1 parent eb0e927 commit 6fe8af4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
* @LastEditors: Laoluo luozefeng@sensetime.com
* @LastEditTime: 2022-07-08 11:08:02
*/
import { PointCloud, MathUtils, PointCloudAnnotation } from '@labelbee/lb-annotation';
import {
PointCloud,
MathUtils,
PointCloudAnnotation,
getCuboidFromPointCloudBox,
} from '@labelbee/lb-annotation';
import { getClassName } from '@/utils/dom';
import { PointCloudContainer } from './PointCloudLayout';
import React, { useEffect, useRef } from 'react';
Expand Down Expand Up @@ -172,8 +177,7 @@ const PointCloudSideView = ({ currentData, config }: IA2MapStateProps) => {
// Update count
if (ptCtx.mainViewInstance) {
const { count } = ptCtx.mainViewInstance.getSensesPointZAxisInPolygon(
ptCtx.mainViewInstance.getCuboidFromPointCloudBox(newBoxParams)
.polygonPointList as IPolygonPoint[],
getCuboidFromPointCloudBox(newBoxParams).polygonPointList as IPolygonPoint[],
[
newBoxParams.center.z - newBoxParams.depth / 2,
newBoxParams.center.z + newBoxParams.depth / 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Glenfiddish <edwinlee0927@hotmail.com>
* @createdate 2022-08-17
*/
import { PointCloudAnnotation, PointCloud, MathUtils } from '@labelbee/lb-annotation';
import { PointCloudAnnotation, PointCloud, MathUtils, getCuboidFromPointCloudBox } from '@labelbee/lb-annotation';
import {
IPointCloudBox,
EPerspectiveView,
Expand Down Expand Up @@ -453,7 +453,7 @@ export const usePointCloudViews = () => {
// Update count
if (mainViewInstance) {
const { count } = mainViewInstance.getSensesPointZAxisInPolygon(
mainViewInstance.getCuboidFromPointCloudBox(newBoxParams)
getCuboidFromPointCloudBox(newBoxParams)
.polygonPointList as IPolygonPoint[],
[
newBoxParams.center.z - newBoxParams.depth / 2,
Expand Down

0 comments on commit 6fe8af4

Please sign in to comment.