|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jmex.model.collada.ColladaImporter
public class ColladaImporter
ColladaNode
provides a mechanism to parse and load a COLLADA
(COLLAborative Design Activity) model. Making use of a DOM parse, the XML
formatted COLLADA file is parsed into Java Type classes and then processed by
jME. This processing is currently aimed at the 1.4.1 release of the COLLADA
Specification, and will, in most likelyhood, require updating with a new
release of COLLADA.
Field Summary | |
---|---|
static boolean |
OPTIMIZE_GEOMETRY
|
static OptimizeCallback |
optimizeCallBack
|
Method Summary | |
---|---|
static void |
addUserInformation(java.lang.String key,
java.lang.Object value)
|
static void |
addUVControllerName(java.lang.String name)
|
static void |
cleanUp()
|
StencilState.StencilOperation |
evaluateStencilOp(java.lang.String value)
|
static java.lang.Object |
get(java.lang.Object id)
|
static BoneAnimation |
getAnimationController(java.lang.String id)
|
java.lang.String |
getAssetInformation()
getAssetInformation returns a string of the collected asset information of this COLLADA model. |
static CameraNode |
getCameraNode(java.lang.String id)
|
static java.util.ArrayList<java.lang.String> |
getCameraNodeNames()
Returns the camera node names associated with this model. |
static java.util.ArrayList<java.lang.String> |
getControllerNames()
returns the names of the controllers that affect this imported model. |
static Geometry |
getGeometry(java.lang.String id)
|
static java.util.ArrayList<java.lang.String> |
getGeometryNames()
|
static ColladaImporter |
getInstance()
|
static LightNode |
getLightNode(java.lang.String id)
|
static java.util.ArrayList<java.lang.String> |
getLightNodeNames()
|
static Node |
getModel()
|
java.lang.String |
getModelAuthor()
Author of the last loaded collada model. |
java.lang.String |
getRevision()
Revision number of the last loaded collada model. |
static Bone |
getSkeleton(java.lang.String id)
|
static java.util.ArrayList<java.lang.String> |
getSkeletonNames()
|
static SkinNode |
getSkinNode(java.lang.String id)
|
static java.util.ArrayList<java.lang.String> |
getSkinNodeNames()
returns the names of the skin nodes that are associated with this imported model. |
java.lang.String |
getTool()
the tool used to build the last collada model. |
float |
getUnitMeter()
the unit scale of the last collada model. |
java.lang.String |
getUnitName()
the unit name of the last collada model. |
static java.lang.Object |
getUserInformation(java.lang.String key)
|
static TextureKeyframeController |
getUVAnimationController(java.lang.String id)
|
static java.util.ArrayList<java.lang.String> |
getUVControllerNames()
|
static boolean |
hasUserInformation(java.lang.String key)
|
static void |
load(java.io.InputStream source,
java.lang.String name)
load takes the model path as a string object and uses the COLLADASchemaDoc object to load it. |
void |
processCollada(COLLADAType root)
processCollada takes a COLLADAType object that contains the heirarchical information obtained from the XML structure of a COLLADA model. |
void |
processScene(sceneType scene)
processScene finalizes the model node to be returned as the COLLADA model. |
TextureState |
processTexture(java.lang.String key,
ColladaMaterial mat,
int index)
|
TextureState |
processTexture(textureType texture,
ColladaMaterial mat)
processTexture generates a texture state that contains the image and texture coordinate unit information. |
static void |
put(java.lang.String key,
java.lang.Object value)
places an object into the resource library with a given key. |
void |
shutdown()
|
static void |
squelchErrors(boolean b)
squelchErrors sets if the ColladaImporter should spit out errors or not |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean OPTIMIZE_GEOMETRY
public static OptimizeCallback optimizeCallBack
Method Detail |
---|
public static boolean hasUserInformation(java.lang.String key)
public static void addUserInformation(java.lang.String key, java.lang.Object value)
public static java.lang.Object getUserInformation(java.lang.String key)
public static void load(java.io.InputStream source, java.lang.String name)
source
- the source to import.textureDirectory
- the location of the textures.name
- the name of the node.public static java.util.ArrayList<java.lang.String> getControllerNames()
public static java.util.ArrayList<java.lang.String> getUVControllerNames()
public static void addUVControllerName(java.lang.String name)
public static java.util.ArrayList<java.lang.String> getSkinNodeNames()
public static java.util.ArrayList<java.lang.String> getCameraNodeNames()
public static java.util.ArrayList<java.lang.String> getLightNodeNames()
public static java.util.ArrayList<java.lang.String> getSkeletonNames()
public static java.util.ArrayList<java.lang.String> getGeometryNames()
public static Node getModel()
public static SkinNode getSkinNode(java.lang.String id)
public static CameraNode getCameraNode(java.lang.String id)
public static LightNode getLightNode(java.lang.String id)
public static java.lang.Object get(java.lang.Object id)
public static void put(java.lang.String key, java.lang.Object value)
key
- the key to obtain the object from the library.value
- the object to store in the library.public static BoneAnimation getAnimationController(java.lang.String id)
public static TextureKeyframeController getUVAnimationController(java.lang.String id)
public static Bone getSkeleton(java.lang.String id)
public static Geometry getGeometry(java.lang.String id)
public static void cleanUp()
public void shutdown()
public java.lang.String getModelAuthor()
public java.lang.String getRevision()
public java.lang.String getTool()
public float getUnitMeter()
public java.lang.String getUnitName()
public java.lang.String getAssetInformation()
public void processCollada(COLLADAType root)
root
- the COLLADAType data structure that contains the COLLADA model
information.public void processScene(sceneType scene) throws java.lang.Exception
scene
- the scene to process
java.lang.Exception
- thrown if there is an error processing the xml.public StencilState.StencilOperation evaluateStencilOp(java.lang.String value)
public TextureState processTexture(textureType texture, ColladaMaterial mat) throws java.lang.Exception
texture
- the texture type to process.
java.lang.Exception
- thrown if there is a problem processing the xml.public TextureState processTexture(java.lang.String key, ColladaMaterial mat, int index) throws java.lang.Exception
java.lang.Exception
public static void squelchErrors(boolean b)
b
- public static ColladaImporter getInstance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |