Package com.banuba.sdk.scene
Class Entity.CppProxy
- java.lang.Object
-
- com.banuba.sdk.scene.Entity.CppProxy
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.banuba.sdk.scene.Entity
Entity.CppProxy
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
_djinni_private_destroy()
void
addChild(Entity child)
add entiy as child to hierarchyvoid
addComponent(Component component)
add given component to entity if component of given type wasn't added before.void
addIntoLayer(Layer layer)
Add entity for given layer if it is wasn't added before.void
clearChildren()
remove all child entites list.protected void
finalize()
Entity
findChildByName(java.lang.String entityName)
Perform depth-first traverse of entity tree.java.util.ArrayList<Entity>
getChildren()
get all child entites list.Component
getComponent(ComponentType type)
get component of given type.java.util.ArrayList<Layer>
getLayers()
returns list of layers in which entity was added.java.lang.String
getName()
Entity
getParent()
boolean
hasComponent(ComponentType type)
check if component of given type was added.boolean
isActive()
void
removeChild(Entity child)
remove entiy as child to hierarchyvoid
removeComponent(Component component)
remove given component to entity if component of given component was added before.void
removeFromLayer(Layer layer)
Removes entity from given layer if it is was added before.void
setActive(boolean active)
Set enable/disable entity flag.void
setName(java.lang.String name)
Set a new name to the entity.
-
-
-
Method Detail
-
_djinni_private_destroy
public void _djinni_private_destroy()
-
finalize
protected void finalize() throws java.lang.Throwable
- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-
setName
public void setName(java.lang.String name)
Description copied from interface:Entity
Set a new name to the entity. Name could be empty.
-
getName
public java.lang.String getName()
-
addChild
public void addChild(Entity child)
Description copied from interface:Entity
add entiy as child to hierarchy
-
removeChild
public void removeChild(Entity child)
Description copied from interface:Entity
remove entiy as child to hierarchy- Specified by:
removeChild
in interfaceEntity
- Parameters:
child
- (entity): child entity.
-
getChildren
public java.util.ArrayList<Entity> getChildren()
Description copied from interface:Entity
get all child entites list.- Specified by:
getChildren
in interfaceEntity
-
clearChildren
public void clearChildren()
Description copied from interface:Entity
remove all child entites list.- Specified by:
clearChildren
in interfaceEntity
-
findChildByName
public Entity findChildByName(java.lang.String entityName)
Description copied from interface:Entity
Perform depth-first traverse of entity tree. Return first found child with name `entityName` or NULL if such an entity doesn't exist.- Specified by:
findChildByName
in interfaceEntity
- Parameters:
entityName
- (string): name of desired entity- Returns:
- found entity (entity) or null
-
getParent
public Entity getParent()
-
setActive
public void setActive(boolean active)
Description copied from interface:Entity
Set enable/disable entity flag. The disabling of the entity is equivalent to removing the entity and all its children from the hierarchy.
-
isActive
public boolean isActive()
-
addIntoLayer
public void addIntoLayer(Layer layer)
Description copied from interface:Entity
Add entity for given layer if it is wasn't added before.- Specified by:
addIntoLayer
in interfaceEntity
- Parameters:
layer
- (layer): layer to add.
-
removeFromLayer
public void removeFromLayer(Layer layer)
Description copied from interface:Entity
Removes entity from given layer if it is was added before.- Specified by:
removeFromLayer
in interfaceEntity
-
getLayers
public java.util.ArrayList<Layer> getLayers()
Description copied from interface:Entity
returns list of layers in which entity was added.
-
addComponent
public void addComponent(Component component)
Description copied from interface:Entity
add given component to entity if component of given type wasn't added before.- Specified by:
addComponent
in interfaceEntity
- Parameters:
component
- (component): component to add.
-
hasComponent
public boolean hasComponent(ComponentType type)
Description copied from interface:Entity
check if component of given type was added.- Specified by:
hasComponent
in interfaceEntity
- Returns:
- flag (bool)
-
getComponent
public Component getComponent(ComponentType type)
Description copied from interface:Entity
get component of given type.- Specified by:
getComponent
in interfaceEntity
- Returns:
- component of given type (component)
-
removeComponent
public void removeComponent(Component component)
Description copied from interface:Entity
remove given component to entity if component of given component was added before.- Specified by:
removeComponent
in interfaceEntity
- Parameters:
component
- (component): component to remove.
-
-