Get contour of spatial dense mesh ?

0 votes
asked Dec 19, 2020 by ilanbps (120 points)

Hi, 

I need to draw only contour of spatialmaps on dense or sparse mesh, I already use this on arfoundation like: https://i.ytimg.com/vi/yaErjTKdNjo/maxresdefault.jpg

How can achieve this ? Because I need it to view the map created in topdown plan with another unity camera, already created with arfoundation but need too with EasyAR :-)

Last question how can I calculate the surface of the mesh created ? 

like this on ARFoundation:

private void OnEnable()

{

arPlane.boundaryChanged += ArPlane_BoundaryChanged;

}

private void OnDisable()

{

arPlane.boundaryChanged -= ArPlane_BoundaryChanged;

}

private void ArPlane_BoundaryChanged(ARPlaneBoundaryChangedEventArgs obj) 

float result = Mathf.Round(CalculatePlaneArea(arPlane) * 100f) / 100f;

areaText.text = result.ToString() + " m2";

private float CalculatePlaneArea(ARPlane plane) {

return plane.size.x * plane.size.y; 

}

Thx,

1 Answer

0 votes
answered Feb 9, 2021 by kenn (17,610 points)

The dense map is already converted to Unity mesh in Unity 3D.

And the sparse map is already converted to Unity particles in Unity 3D.

Treat them like normal Unity objects and use the Unity way to solve the problem.

Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...