-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update the function of getCuboidFromPointCloudBox
- Loading branch information
Showing
2 changed files
with
9 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,12 @@ | |
* @LastEditors: Laoluo [email protected] | ||
* @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'; | ||
|
@@ -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, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* @author Glenfiddish <[email protected]> | ||
* @createdate 2022-08-17 | ||
*/ | ||
import { PointCloudAnnotation, PointCloud, MathUtils } from '@labelbee/lb-annotation'; | ||
import { PointCloudAnnotation, PointCloud, MathUtils, getCuboidFromPointCloudBox } from '@labelbee/lb-annotation'; | ||
import { | ||
IPointCloudBox, | ||
EPerspectiveView, | ||
|
@@ -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, | ||
|