|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.physics.PhysicsGFXManager
public class PhysicsGFXManager
The PhysicsGFXManager is capable of updating the graphical
representations of Collideables each frame or vice versa, if
instantiated with the inverse flag.
| Constructor Summary | |
|---|---|
PhysicsGFXManager()
|
|
PhysicsGFXManager(boolean inverse)
|
|
| Method Summary | |
|---|---|
TransformGroup |
add(Body body)
Adds a Body and its graphical counterpart to the manager. |
TransformGroup |
add(Body body,
TransformGroup node)
Adds a Body and its graphical counterpart to the manager. |
TransformGroup |
add(Collideable collider)
Adds a Collideable and its graphical counterpart to the manager. |
TransformGroup |
add(Collideable collider,
TransformGroup node)
Adds a Collideable and its graphical counterpart to the manager. |
void |
clear()
Removes all items (colliders and GFX objects). |
TransformGroup |
directAdd(Body body,
GroupNode parentGroup)
Adds a Body and its graphical counterpart to the manager. |
TransformGroup |
directAdd(Body body,
TransformGroup node,
GroupNode parentGroup)
Adds a Body and its graphical counterpart to the manager. |
TransformGroup |
directAdd(Collideable collider,
GroupNode parentGroup)
Adds a Collideable and its graphical counterpart to the manager. |
TransformGroup |
directAdd(Collideable collider,
TransformGroup node,
GroupNode parentGroup)
Adds a Collideable and its graphical counterpart to the manager. |
void |
directAdd(Joint joint,
GroupNode parentGroup,
org.openmali.vecmath2.Colorf lineColor,
float lineWidth)
Adds all Bodies of a Joint and its graphical counterpart and lines for the Joint itself to the manager. |
Body |
getBody(int index)
|
TransformGroup |
getBodyGFX(int index)
|
Collideable |
getCollider(int index)
|
TransformGroup |
getColliderGFX(int index)
|
int |
getNumItems()
Gets the number of items (collideables + bodies). |
boolean |
isInverse()
The "normal" update implementation updates the graphical parts from the physical one. |
void |
remove(Body body)
Removes a Body and its graphical counterpart from the manager. |
void |
remove(Collideable collider)
Removes a Collider and its graphical counterpart from the manager. |
void |
remove(Joint joint)
Removes a Joint's Bodies and their graphical counterparts and the oint-lines from the manager. |
void |
remove(TransformGroup node)
Removes a Collider and its graphical counterpart from the manager. |
void |
removeBody(int index)
Removes a Body and its graphical counterpart from the manager. |
void |
removeCollider(int index)
Removes a Collider and its graphical counterpart from the manager. |
void |
update(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
Updates this Updatable object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PhysicsGFXManager(boolean inverse)
inverse - if true, the physical parts are updated from the graphical onespublic PhysicsGFXManager()
| Method Detail |
|---|
public final boolean isInverse()
public final int getNumItems()
public final TransformGroup directAdd(Collideable collider,
TransformGroup node,
GroupNode parentGroup)
collider - node - parentGroup - if not null, the node will be directly added to this group
public final TransformGroup directAdd(Collideable collider,
GroupNode parentGroup)
collider - parentGroup - if not null, the node will be directly added to this group
public final TransformGroup directAdd(Body body,
TransformGroup node,
GroupNode parentGroup)
body - node - parentGroup - if not null, the node will be directly added to this group
public final TransformGroup directAdd(Body body,
GroupNode parentGroup)
body - parentGroup - if not null, the node will be directly added to this group
public final void directAdd(Joint joint,
GroupNode parentGroup,
org.openmali.vecmath2.Colorf lineColor,
float lineWidth)
joint - parentGroup - lineColor - lineWidth -
public final TransformGroup add(Collideable collider,
TransformGroup node)
collider - node -
public final TransformGroup add(Collideable collider)
collider -
public final void removeCollider(int index)
index - public final void remove(Collideable collider)
collider -
public final TransformGroup add(Body body,
TransformGroup node)
body - node -
public final TransformGroup add(Body body)
body -
public final void removeBody(int index)
index - public final void remove(Body body)
body - public final void remove(Joint joint)
body - public final void remove(TransformGroup node)
node - public final void clear()
public final Collideable getCollider(int index)
public final Body getBody(int index)
public final TransformGroup getColliderGFX(int index)
public final TransformGroup getBodyGFX(int index)
public void update(long gameTime,
long frameTime,
UpdatingThread.TimingMode timingMode)
update in interface UpdatablegameTime - the gameTime in MillisecondsframeTime - the frameTime in Milliseconds (needed time for the last frame)timingMode - the TimingMode to use for frameTime.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||