feat: add getAncestor method

This commit is contained in:
Nick Fisher
2024-09-08 13:52:33 +08:00
parent ff304ad3d4
commit ec9366d72b
4 changed files with 73 additions and 3 deletions
@@ -773,9 +773,14 @@ abstract class ThermionViewer {
PrimitiveType primitiveType = PrimitiveType.TRIANGLES});
///
/// Gets the parent transform of [child].
/// Gets the parent entity of [entity]. Returns null if the entity has no parent.
///
Future<ThermionEntity?> getParent(ThermionEntity child);
Future<ThermionEntity?> getParent(ThermionEntity entity);
///
/// Gets the ancestor (ultimate parent) entity of [entity]. Returns null if the entity has no parent.
///
Future<ThermionEntity?> getAncestor(ThermionEntity entity);
///
/// Sets the parent transform of [child] to [parent].