Version: Unity 6.4 Beta (6000.4)
LanguageEnglish
  • C#

PhysicsComposer.GetGeometryIslands

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public NativeArray<RangeInt> GetGeometryIslands(Unity.Collections.Allocator allocator);

Parameters

Parameter Description
allocator The memory allocator to use for the results. This can only be Allocator.Temp, Allocator.TempJob or Allocator.Persistent.

Returns

NativeArray<RangeInt> A NativeArray containing a series of ranges where each range is aunique connected island where the range indicates both the start and end indices of the original polygon indices.

Description

Get the geometry islands from a previous polygon geometry composition i.e. a call to PhysicsComposer.CreatePolygonGeometry or PhysicsComposer.CreateConvexHulls. Each generated polygon or convex-hull belongs to a unique island defining a set of polygons that are connected together as they share edges. The array returned contains a series of ranges where each range is a unique connected island where the range indicates both the start index and length of the original polygon indices. The number of discovered unique islands is defined by the size of the returned array.