public final class GameObject extends java.lang.Object implements ITree<GameObject>
| Modifier and Type | Field and Description |
|---|---|
AnimationComponent |
animation |
CameraComponent |
camera |
ICollisionComponent |
collision |
IConstraintComponent[] |
constraints |
IComponent[] |
otherComponents |
RenderableComponent |
renderable |
RigidBodyComponent |
rigidBody |
ScriptComponent[] |
scripts |
UiComponent |
ui |
| Constructor and Description |
|---|
GameObject() |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(T child) |
boolean |
addComponent(IComponent component) |
void |
destroy()
Destroy this
GameObject and all of its childs. |
void |
destroyNow()
Deprecated.
use
destroy() instead |
T |
getChild(int index) |
<T extends IComponent> |
getComponent(java.lang.Class<T> clazz) |
Array<IComponent> |
getComponents() |
<T extends IComponent> |
getComponents(java.lang.Class<T> clazz,
Array<? super T> dst) |
<T> void |
getComponentsFromInterface(java.lang.Class<T> clazz,
Array<? super T> dst) |
GameScreen |
getGameScreen() |
java.lang.String |
getName() |
int |
getNumChilds() |
T |
getParent() |
Transform |
getTransform(Transform dst) |
Mat4x4 |
getWorldMatrix(Mat4x4 dst) |
Transform |
getWorldTransform(Transform dst) |
boolean |
hasWorldTransform() |
boolean |
isActive() |
boolean |
isNodeActive() |
boolean |
isNodeVisible() |
boolean |
isVisible() |
void |
log(java.lang.Throwable t) |
void |
processInputs(IInput input)
Process inputs
|
boolean |
removeChild(T child) |
Array<T> |
removeChilds() |
boolean |
removeComponent(IComponent component) |
void |
setName(java.lang.String name) |
void |
setNodeActive(boolean nodeActive) |
void |
setNodeVisible(boolean nodeVisible) |
void |
setTransform(Transform src) |
void |
setWorldTransform(Transform t) |
void |
synchronize() |
java.lang.String |
toString() |
void |
transform(Transform t) |
void |
update(long timePassedMs)
Update
|
void |
updateEnd(long timePassedMs)
Update end
|
void |
updateStep(long timeStepMs)
Physic fixed step update
|
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddChild, getChild, getNumChildspublic RenderableComponent renderable
public AnimationComponent animation
public ICollisionComponent collision
public RigidBodyComponent rigidBody
public IConstraintComponent[] constraints
public CameraComponent camera
public UiComponent ui
public ScriptComponent[] scripts
public IComponent[] otherComponents
public final GameScreen getGameScreen()
GameScreen of thispublic final void updateStep(long timeStepMs)
public final void processInputs(IInput input)
public final void update(long timePassedMs)
public void updateEnd(long timePassedMs)
public final Array<IComponent> getComponents()
public final <T extends IComponent> T getComponent(java.lang.Class<T> clazz)
clazz - Class of the IComponent to returnpublic final <T extends IComponent> void getComponents(java.lang.Class<T> clazz, Array<? super T> dst)
public final <T> void getComponentsFromInterface(java.lang.Class<T> clazz,
Array<? super T> dst)
public final boolean removeComponent(IComponent component)
component - the IComponent to removepublic final boolean addComponent(IComponent component)
component - IComponent to addpublic final void destroy()
GameObject and all of its childs.GameScreen update.GameScreen.remove(GameObject)@Deprecated public final void destroyNow()
destroy() insteadGameObject nowpublic final void log(java.lang.Throwable t)
public final void setName(java.lang.String name)
public final java.lang.String getName()
public java.lang.String toString()
toString in class java.lang.Objectpublic final T getParent()
public final void addChild(T child)
public final boolean removeChild(T child)
public final Array<T> removeChilds()
public final int getNumChilds()
public T getChild(int index)
public boolean isNodeActive()
T active statepublic void setNodeActive(boolean nodeActive)
nodeVisible - new value for this T active statepublic boolean isActive()
T impacted by its parents, if anypublic boolean isNodeVisible()
T visible statepublic void setNodeVisible(boolean nodeVisible)
nodeVisible - new value for this T visible statepublic boolean isVisible()
T impacted by its parents, if anypublic final Transform getTransform(Transform dst)
getTransform in interface ITransformabledst - storage of the Transform value (or the identity if the value is null)public final void setTransform(Transform src)
setTransform in interface ITransformablepublic final void transform(Transform t)
transform in interface ITransformablepublic final boolean hasWorldTransform()
public final void setWorldTransform(Transform t)
public final void synchronize()
Bonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com