BenQ Mobile

javax.microedition.m3g
Class Object3D

java.lang.Object
  extended byjavax.microedition.m3g.Object3D
Direct Known Subclasses:
AnimationController, AnimationTrack, Appearance, Background, CompositingMode, Fog, Image2D, IndexBuffer, KeyframeSequence, Material, PolygonMode, Transformable, VertexArray, VertexBuffer

public abstract class Object3D
extends java.lang.Object

An abstract base class for all objects that can be part of a 3D world. This includes the world itself, scene graph nodes, animations, textures, and so on. In fact, everything in this API is an Object3D, except for Loader, Transform, RayIntersection and Graphics3D.


Method Summary
 void addAnimationTrack(AnimationTrack animationTrack)
          Adds the given AnimationTrack to this Object3D, potentially changing the order and indices of the previously added tracks.
 int animate(int time)
          Updates all animated properties in this Object3D and all Object3Ds that are reachable from this Object3D.
 Object3D duplicate()
          Creates a duplicate of this Object3D.
 Object3D find(int userID)
          Retrieves an object that has the given user ID and is reachable from this object.
 AnimationTrack getAnimationTrack(int index)
          Gets an AnimationTrack by index.
 int getAnimationTrackCount()
          Gets the number of AnimationTracks currently associated with this Object3D.
 int getReferences(Object3D[] references)
          Returns the number of direct Object3D references in this object, and fills in the objects to the given array.
 int getUserID()
          Gets the user ID of this object.
 java.lang.Object getUserObject()
          Retrieves the user object that is currently associated with this Object3D.
 void removeAnimationTrack(AnimationTrack animationTrack)
          Removes the given AnimationTrack from this Object3D, potentially changing the order and indices of the remaining tracks.
 void setUserID(int userID)
          Sets the user ID for this object.
 void setUserObject(java.lang.Object pUserObject)
          Associates an arbitrary, application specific Object with this Object3D.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

duplicate

public final Object3D duplicate()
Creates a duplicate of this Object3D.


find

public Object3D find(int userID)
Retrieves an object that has the given user ID and is reachable from this object.


getReferences

public int getReferences(Object3D[] references)
Returns the number of direct Object3D references in this object, and fills in the objects to the given array. tRefs consists of the native objects tObjects consists of the according JAVA Objects If tObjects[index] is null, there is no JAVA object existing and must be created. Because of the same native object can be more than once in the tRefs array, only one according JAVA object must be created. Because of this a temporary hash is build with the native objects as keys and the java objects as values. Before a JAVA object is created, a look into this hash-map must be done, to ensure that a corresponding JAVA object was not created before.


setUserID

public void setUserID(int userID)
Sets the user ID for this object.


getUserID

public int getUserID()
Gets the user ID of this object.


setUserObject

public void setUserObject(java.lang.Object pUserObject)
Associates an arbitrary, application specific Object with this Object3D.


getUserObject

public java.lang.Object getUserObject()
Retrieves the user object that is currently associated with this Object3D.


addAnimationTrack

public void addAnimationTrack(AnimationTrack animationTrack)
Adds the given AnimationTrack to this Object3D, potentially changing the order and indices of the previously added tracks.


getAnimationTrack

public AnimationTrack getAnimationTrack(int index)
Gets an AnimationTrack by index.


removeAnimationTrack

public void removeAnimationTrack(AnimationTrack animationTrack)
Removes the given AnimationTrack from this Object3D, potentially changing the order and indices of the remaining tracks.


getAnimationTrackCount

public int getAnimationTrackCount()
Gets the number of AnimationTracks currently associated with this Object3D.


animate

public final int animate(int time)
Updates all animated properties in this Object3D and all Object3Ds that are reachable from this Object3D.


BenQ Mobile

Copyright © 2006 BenQ Mobile GmbH & Co. OHG or respective copyright owner.
All Rights Reserved.
BenQ Corp. is a trademark licensee of Siemens AG.


For further information about Mobility Toolkit (MTK) visit our Developer Portal.