Class SceneHierarchyInformation
Data structure used to store the labeling hierarchy
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth
Assembly: Unity.Perception.Runtime.dll
Syntax
public sealed class SceneHierarchyInformation
Properties
hierarchy
Read-only representation of the hierarchy
Declaration
public IReadOnlyDictionary<uint, SceneHierarchyNode> hierarchy { get; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<uint, SceneHierarchyNode> |
Methods
ContainsInstanceId(uint)
Determines whether the current instance contains an entry with the specified instance id.
Declaration
public bool ContainsInstanceId(uint instanceId)
Parameters
Type | Name | Description |
---|---|---|
uint | instanceId | Instance ID of a Labeling component. |
Returns
Type | Description |
---|---|
bool | True when the key exists |
GetAllNodes()
Retrieves an enumerable of all nodes present in the scene hierarchy.
Declaration
public List<SceneHierarchyNode> GetAllNodes()
Returns
Type | Description |
---|---|
List<SceneHierarchyNode> | A list of SceneHierarchyNode |
GetNodeCount()
The number of nodes inside the scene hierarchy.
Declaration
public int GetNodeCount()
Returns
Type | Description |
---|---|
int | The number of nodes |
TryGetNodeForInstanceId(uint, out SceneHierarchyNode)
Gets the SceneHierarchyNode representation of a node in the scene hierarchy given the instance id of a labeled object.
Declaration
public bool TryGetNodeForInstanceId(uint instanceId, out SceneHierarchyNode node)
Parameters
Type | Name | Description |
---|---|---|
uint | instanceId | The instance id of a labeled object. |
SceneHierarchyNode | node | A SceneHierarchyNode for the instance id instanceId |
Returns
Type | Description |
---|---|
bool | Whether a node exists for the given instance id |