BenQ Mobile

javax.microedition.m3g
Class Mesh

java.lang.Object
  extended byjavax.microedition.m3g.Object3D
      extended byjavax.microedition.m3g.Transformable
          extended byjavax.microedition.m3g.Node
              extended byjavax.microedition.m3g.Mesh
Direct Known Subclasses:
MorphingMesh, SkinnedMesh

public class Mesh
extends Node

A scene graph node that represents a 3D object defined as a polygonal surface.


Field Summary
 
Fields inherited from class javax.microedition.m3g.Node
NONE, ORIGIN, X_AXIS, Y_AXIS, Z_AXIS
 
Constructor Summary
Mesh(VertexBuffer vertices, IndexBuffer[] submeshes, Appearance[] appearances)
          Constructs a new Mesh with the given VertexBuffer and submeshes.
Mesh(VertexBuffer vertices, IndexBuffer submesh, Appearance appearance)
          Constructs a new Mesh consisting of only one submesh.
 
Method Summary
 Appearance getAppearance(int index)
          Gets the current Appearance of the specified submesh.
 IndexBuffer getIndexBuffer(int index)
          Retrieves the submesh at the given index.
 int getSubmeshCount()
          Gets the number of submeshes in this Mesh.
 VertexBuffer getVertexBuffer()
          Gets the vertex buffer of this Mesh.
 void setAppearance(int index, Appearance appearance)
          Sets the Appearance for the specified submesh.
 
Methods inherited from class javax.microedition.m3g.Node
align, getAlphaFactor, getParent, getScope, getTransformTo, isPickingEnabled, isRenderingEnabled, setAlignment, setAlphaFactor, setPickingEnable, setRenderingEnable, setScope
 
Methods inherited from class javax.microedition.m3g.Transformable
getCompositeTransform, getOrientation, getScale, getTransform, getTranslation, postRotate, preRotate, scale, setOrientation, setScale, setTransform, setTranslation, translate
 
Methods inherited from class javax.microedition.m3g.Object3D
addAnimationTrack, animate, duplicate, find, getAnimationTrack, getAnimationTrackCount, getReferences, getUserID, getUserObject, removeAnimationTrack, setUserID, setUserObject
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mesh

public Mesh(VertexBuffer vertices,
            IndexBuffer submesh,
            Appearance appearance)
Constructs a new Mesh consisting of only one submesh.


Mesh

public Mesh(VertexBuffer vertices,
            IndexBuffer[] submeshes,
            Appearance[] appearances)
Constructs a new Mesh with the given VertexBuffer and submeshes.

Method Detail

setAppearance

public void setAppearance(int index,
                          Appearance appearance)
Sets the Appearance for the specified submesh.


getAppearance

public Appearance getAppearance(int index)
Gets the current Appearance of the specified submesh.


getIndexBuffer

public IndexBuffer getIndexBuffer(int index)
Retrieves the submesh at the given index.


getVertexBuffer

public VertexBuffer getVertexBuffer()
Gets the vertex buffer of this Mesh.


getSubmeshCount

public int getSubmeshCount()
Gets the number of submeshes in this Mesh.


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.