|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jinx.video.model.ImportExportUtil
public class ImportExportUtil
Contains methods for importing and exporting Models in 3rd-party formats.
This currently supports exporting to Wavefront .obj format and POV-Ray's
mesh2 data structure.
There are a few caveats when exporting Models to other formats. First,
there's no way to carry textures over, but the texture coordinates will make
the transition. Second, any kind of line-based MeshElement isn't likely to
carry over and even if it does, it probably won't work the same. I suggest
you not use lines in your Models anyway. Third, Coloration objects attached
to the Model won't always carry over (currently they don't carry over at
all). Fourth, some model formats require tessalating all geometry into
triangles, so things may not look exactly the same.
I'll offer a little advice on building Models for export. One, stick to
using Triangles MeshElements only; this will save you from unexpected
oddities showing up in your models after export. Two, don't use a
Coloration, but instead use a texture. This should work with any modeler
program, as most of the modeling world loves textures and doesn't even
consider any other kind of coloring scheme.
API Stability: Alpha.
Method Summary | |
---|---|
static void |
exportPOVRayMesh2(java.io.OutputStream o,
Model m)
Exports an ascii POV-Ray file using a Model object as the source of geometry data for building a mesh2 structure. |
static void |
exportWavefrontOBJ(java.io.OutputStream o,
Model m)
Exports an ascii Wavefront .obj file using a Model object as the source of geometry data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void exportPOVRayMesh2(java.io.OutputStream o, Model m)
o
- the OutputStream to send the export data through.m
- the Model object for geometry data.public static void exportWavefrontOBJ(java.io.OutputStream o, Model m)
o
- the OutputStream to send the export data through.m
- the Model object for geometry data.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |