de.jreality.writer.u3d
Class U3DSceneUtility

java.lang.Object
  extended by de.jreality.writer.u3d.U3DSceneUtility

public class U3DSceneUtility
extends java.lang.Object


Constructor Summary
U3DSceneUtility()
           
 
Method Summary
static java.util.HashMap<SceneGraphComponent,EffectiveAppearance> getAppearanceMap(JrScene scene)
           
static java.util.HashMap<EffectiveAppearance,java.lang.String> getAppearanceNames(java.util.Collection<EffectiveAppearance> apps)
           
static java.util.HashMap<Geometry,Rectangle3D> getBoundingBoxes(java.util.Collection<Geometry> l)
           
static java.awt.image.BufferedImage getBufferedImage(ImageData img)
           
static java.util.List<Camera> getCameras(JrScene scene)
           
static java.util.Map<Geometry,SceneGraphComponent> getGeometries(JrScene scene)
          TODO Returns a map that contains data that is used to build a workaround for the texture matrix bug in adobe reader.
static java.util.List<SceneGraphComponent> getLightNodes(JrScene scene)
           
static java.util.List<Light> getLights(JrScene scene)
           
static java.util.HashMap<SceneGraphComponent,java.util.Collection<SceneGraphComponent>> getParentsMap(java.util.Collection<SceneGraphComponent> l)
           
static java.util.List<SceneGraphComponent> getSceneGraphComponents(JrScene scene)
           
static SceneGraphComponent getSkyBox(JrScene scene)
           
static java.util.HashMap<EffectiveAppearance,U3DTexture> getSphereMapsMap(java.util.Collection<EffectiveAppearance> apps)
           
static java.util.HashMap<EffectiveAppearance,U3DTexture> getTextureMap(java.util.Collection<EffectiveAppearance> apps)
           
static java.util.HashMap<U3DTexture,java.lang.String> getTextureNames(java.lang.String prefix, java.util.Collection<U3DTexture> l)
           
static
<T extends SceneGraphNode>
java.util.HashMap<T,java.lang.String>
getUniqueNames(java.util.Collection<T> l)
           
static java.util.List<SceneGraphComponent> getViewNodes(JrScene scene)
           
static java.util.HashMap<SceneGraphComponent,java.lang.Boolean> getVisibility(JrScene scene, java.util.HashMap<SceneGraphComponent,EffectiveAppearance> appMap)
           
static IndexedFaceSet prepareFaceSet(IndexedFaceSet ifs)
           
static java.util.HashMap<Geometry,Geometry> prepareGeometries(java.util.Collection<Geometry> geometry)
           
static byte[] preparePNGImageData(ImageData img)
           
static java.util.HashMap<U3DTexture,byte[]> preparePNGTextures(java.util.Collection<U3DTexture> textures)
           
static java.util.HashMap<CubeMap,byte[]> prepareSphereMap(java.util.Collection<CubeMap> maps)
           
static void prepareTubesAndSpheres(SceneGraphComponent root)
           
static
<T extends EffectiveAppearance>
void
printAppearanceNameMap(java.util.HashMap<T,java.lang.String> map)
           
static void printComponents(java.util.Collection<SceneGraphComponent> l)
           
static
<T extends SceneGraphNode>
void
printNameMap(java.util.HashMap<T,java.lang.String> map)
           
static void printNodes(java.lang.String title, java.util.Collection<? extends SceneGraphNode> l)
           
static
<T extends U3DTexture>
void
printTextureNameMap(java.util.HashMap<T,java.lang.String> map)
           
static void printTextures(java.util.Collection<U3DTexture> l)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

U3DSceneUtility

public U3DSceneUtility()
Method Detail

getParentsMap

public static java.util.HashMap<SceneGraphComponent,java.util.Collection<SceneGraphComponent>> getParentsMap(java.util.Collection<SceneGraphComponent> l)

getSceneGraphComponents

public static java.util.List<SceneGraphComponent> getSceneGraphComponents(JrScene scene)

getUniqueNames

public static <T extends SceneGraphNode> java.util.HashMap<T,java.lang.String> getUniqueNames(java.util.Collection<T> l)

getViewNodes

public static java.util.List<SceneGraphComponent> getViewNodes(JrScene scene)

getLightNodes

public static java.util.List<SceneGraphComponent> getLightNodes(JrScene scene)

printComponents

public static void printComponents(java.util.Collection<SceneGraphComponent> l)

printNameMap

public static <T extends SceneGraphNode> void printNameMap(java.util.HashMap<T,java.lang.String> map)

printNodes

public static void printNodes(java.lang.String title,
                              java.util.Collection<? extends SceneGraphNode> l)

printTextures

public static void printTextures(java.util.Collection<U3DTexture> l)

printAppearanceNameMap

public static <T extends EffectiveAppearance> void printAppearanceNameMap(java.util.HashMap<T,java.lang.String> map)

printTextureNameMap

public static <T extends U3DTexture> void printTextureNameMap(java.util.HashMap<T,java.lang.String> map)

getGeometries

public static java.util.Map<Geometry,SceneGraphComponent> getGeometries(JrScene scene)
TODO Returns a map that contains data that is used to build a workaround for the texture matrix bug in adobe reader.

Parameters:
scene -
Returns:

getCameras

public static java.util.List<Camera> getCameras(JrScene scene)

getLights

public static java.util.List<Light> getLights(JrScene scene)

prepareFaceSet

public static IndexedFaceSet prepareFaceSet(IndexedFaceSet ifs)

prepareTubesAndSpheres

public static void prepareTubesAndSpheres(SceneGraphComponent root)

prepareGeometries

public static java.util.HashMap<Geometry,Geometry> prepareGeometries(java.util.Collection<Geometry> geometry)

getAppearanceMap

public static java.util.HashMap<SceneGraphComponent,EffectiveAppearance> getAppearanceMap(JrScene scene)

getAppearanceNames

public static java.util.HashMap<EffectiveAppearance,java.lang.String> getAppearanceNames(java.util.Collection<EffectiveAppearance> apps)

getSphereMapsMap

public static java.util.HashMap<EffectiveAppearance,U3DTexture> getSphereMapsMap(java.util.Collection<EffectiveAppearance> apps)

prepareSphereMap

public static java.util.HashMap<CubeMap,byte[]> prepareSphereMap(java.util.Collection<CubeMap> maps)

getTextureNames

public static java.util.HashMap<U3DTexture,java.lang.String> getTextureNames(java.lang.String prefix,
                                                                             java.util.Collection<U3DTexture> l)

getTextureMap

public static java.util.HashMap<EffectiveAppearance,U3DTexture> getTextureMap(java.util.Collection<EffectiveAppearance> apps)

getBufferedImage

public static java.awt.image.BufferedImage getBufferedImage(ImageData img)

preparePNGImageData

public static byte[] preparePNGImageData(ImageData img)

preparePNGTextures

public static java.util.HashMap<U3DTexture,byte[]> preparePNGTextures(java.util.Collection<U3DTexture> textures)

getBoundingBoxes

public static java.util.HashMap<Geometry,Rectangle3D> getBoundingBoxes(java.util.Collection<Geometry> l)

getSkyBox

public static SceneGraphComponent getSkyBox(JrScene scene)

getVisibility

public static java.util.HashMap<SceneGraphComponent,java.lang.Boolean> getVisibility(JrScene scene,
                                                                                     java.util.HashMap<SceneGraphComponent,EffectiveAppearance> appMap)