Interface Entity

All Known Implementing Classes:
Entity.CppProxy

public interface Entity
A structure element of the scene. To construct a scene, you should form a hierarchy of entities to create its structure, then add different components such as lights, cameras, and geometry to entities to create visible content. Each entity has a name which could be used for finding the entity in a hierarchy. Entities in the scene form a tree hierarchy between parents and children. Each entity could be in an enabled or disabled state. The disabling of the entity is equivalent to removing the entity and all its children from the hierarchy. An entity is a container for components. Each entity could contain several components, but only one component of each component type. The Transform component is mandatory and it implicitly placed in each entity.
  • Method Details

    • setName

      void setName​(@NonNull java.lang.String name)
      Set a new name to the entity. Name could be empty.
    • getName

      @NonNull java.lang.String getName()
    • addChild

      void addChild​(@Nullable Entity child)
    • removeChild

      void removeChild​(@Nullable Entity child)
    • getChildren

      @NonNull java.util.ArrayList<Entity> getChildren()
    • clearChildren

      void clearChildren()
    • findChildByName

      @Nullable Entity findChildByName​(@NonNull java.lang.String entityName)
      Perform depth-first traverse of entity tree. Return first found child with name `entityName` or NULL if such an entity doesn't exist.
    • getParent

      @Nullable Entity getParent()
    • setActive

      void setActive​(boolean active)
    • isActive

      boolean isActive()
    • addIntoLayer

      void addIntoLayer​(@Nullable Layer layer)
    • removeFromLayer

      void removeFromLayer()
    • getLayer

      @Nullable Layer getLayer()
    • addComponent

      void addComponent​(@Nullable Component component)
    • hasComponent

      boolean hasComponent​(@NonNull ComponentType type)
    • getComponent

      @Nullable Component getComponent​(@NonNull ComponentType type)
    • removeComponent

      void removeComponent​(@Nullable Component component)
    • create

      @Nullable static Entity create​(@NonNull java.lang.String name)