Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## mri.v3ds
Class Scene3ds

    java.lang.Object
      mri.v3ds.Scene3ds

    public class Scene3ds

extends java.lang.Object

Toplevel class for parsing a 3ds-file and containing a 3D Studio vector animation. The Scene3ds class constructors takes 3ds-file data as input, parses the data and builds a memory image of the relevant 3D vector animation data.
A successfully created Scene3ds object contains the following "global" data:
- An array of meshes
- An array of materials
- An array of cameras
- Start end end frame number of animation

Field Summary
`static int` | `DECODE_ALL` Decode level constant.
`static int` | `DECODE_USED_PARAMS` Decode level constant.
`static int` | `DECODE_USED_PARAMS_AND_CHUNKS` Decode level constant.

Constructor Summary
`Scene3ds(byte[] file_image)` Construct a Scene3ds object from a 3ds-file RAM image.
`Scene3ds(byte[] file_image, TextDecode3ds decode, int level)` Construct (and decode) a Scene3ds object from a 3ds-file RAM image.
`Scene3ds(java.io.File file)` Construct a Scene3ds object from a local 3ds-file.
`Scene3ds(java.io.File file, TextDecode3ds decode, int level)` Construct (and decode) a Scene3ds object from a local 3ds-file.
`Scene3ds(java.io.InputStream stream)` Construct a Scene3ds object from an InputStream containing 3ds-file data.
`Scene3ds(java.io.InputStream stream, TextDecode3ds decode, int level)` Construct (and decode) a Scene3ds object from an InputStream containing 3ds-file data.

Method Summary
`Camera3ds` | `camera(int i)` Access a specific camera in the camera array.
`int` | `cameras()` Get number of cameras.
`int` | `endFrame()` Get animation end frame.
`Light3ds` | `light(int i)` Access a specific light in the light array.
`int` | `lights()` Get number of lights.
`Material3ds` | `material(int i)` Access a specific material in the material array.
`int` | `materials()` Get number of materials.
`Mesh3ds` | `mesh(int i)` Access a specific mesh in the mesh array.
`int` | `meshes()` Get number of meshes.
`int` | `startFrame()` Get animation start frame.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DECODE_ALL

    public static final int DECODE_ALL

  Decode level constant. Decode all information. Unused parameters as hex bytes.

  See Also:
    Constant Field Values

### DECODE_USED_PARAMS

    public static final int DECODE_USED_PARAMS

  Decode level constant. Decode all information except unused parameters.

  See Also:
    Constant Field Values

### DECODE_USED_PARAMS_AND_CHUNKS

    public static final int DECODE_USED_PARAMS_AND_CHUNKS

  Decode level constant. Decode all information except unused parameters and chunks.

  See Also:
    Constant Field Values

Constructor Detail

### Scene3ds

    public Scene3ds(byte[] file_image,
                    TextDecode3ds decode,
                    int level)
             throws Exception3ds

  Construct (and decode) a Scene3ds object from a 3ds-file RAM image. The whole 3ds-file must be loaded beforhand into a `byte[]` array and passed as the `file_image` parameter.

  Parameters:
    `file_image` - file image of whole .3ds file
    `decode` - destination object for text decode
    `level` - decode level (DECODE_ALL, DECODE_USED_PARAMS, DECODE_USED_PARAMS_AND_CHUNKS)
  Throws:
    `Exception3ds` - in case of parsing problems

### Scene3ds

    public Scene3ds(byte[] file_image)
             throws Exception3ds

  Construct a Scene3ds object from a 3ds-file RAM image. The whole 3ds-file must be loaded beforhand into a `byte[]` array and passed as the `file_image` parameter.

  Parameters:
    `file_image` - file image of whole .3ds file
  Throws:
    `Exception3ds` - in case of parsing problems

### Scene3ds

    public Scene3ds(java.io.File file,
                    TextDecode3ds decode,
                    int level)
             throws Exception3ds

  Construct (and decode) a Scene3ds object from a local 3ds-file.

  Parameters:
    `file` - 3ds-file
    `decode` - destination object for text decode
    `level` - decode level (DECODE_ALL, DECODE_USED_PARAMS, DECODE_USED_PARAMS_AND_CHUNKS)
  Throws:
    `Exception3ds` - in case of I/O or parsing problems

### Scene3ds

    public Scene3ds(java.io.File file)
             throws Exception3ds

  Construct a Scene3ds object from a local 3ds-file.

  Parameters:
    `file` - 3ds-file
  Throws:
    `Exception3ds` - in case of I/O or parsing problems

### Scene3ds

    public Scene3ds(java.io.InputStream stream,
                    TextDecode3ds decode,
                    int level)
             throws Exception3ds

  Construct (and decode) a Scene3ds object from an InputStream containing 3ds-file data. The InputStream must contain exactly the 3ds-file data, nothing more and nothing less.

  Parameters:
    `stream` - InputStream containing 3ds-file data
    `decode` - destination object for text decode
    `level` - decode level (DECODE_ALL, DECODE_USED_PARAMS, DECODE_USED_PARAMS_AND_CHUNKS)
  Throws:
    `Exception3ds` - in case of I/O or parsing problems

### Scene3ds

    public Scene3ds(java.io.InputStream stream)
             throws Exception3ds

  Construct a Scene3ds object from an InputStream containing 3ds-file data. The InputStream must contain exactly the 3ds-file data, nothing more and nothing less.

  Parameters:
    `stream` - InputStream containing 3ds-file data
  Throws:
    `Exception3ds` - in case of I/O or parsing problems

Method Detail

### meshes

    public int meshes()

  Get number of meshes.

  Returns:
    number of meshes

### mesh

    public Mesh3ds mesh(int i)

  Access a specific mesh in the mesh array.

  Parameters:
    `i` - index into mesh array [0 ... meshes()-1]
  Returns:
    the specified mesh

### cameras

    public int cameras()

  Get number of cameras.

  Returns:
    number of cameras

### camera

    public Camera3ds camera(int i)

  Access a specific camera in the camera array.

  Parameters:
    `i` - index into camera array [0 ... cameras()-1]
  Returns:
    the specified camera

### materials

    public int materials()

  Get number of materials.

  Returns:
    number of materials

### material

    public Material3ds material(int i)

  Access a specific material in the material array.

  Parameters:
    `i` - index into material array [0 ... materials()-1]
  Returns:
    the specified material

### lights

    public int lights()

  Get number of lights.

  Returns:
    number of lights

### light

    public Light3ds light(int i)

  Access a specific light in the light array.

  Parameters:
    `i` - index into light array [0 ... lights()-1]
  Returns:
    the specified light

### startFrame

    public int startFrame()

  Get animation start frame.

  Returns:
    animation start frame

### endFrame

    public int endFrame()

  Get animation end frame.

  Returns:
    animation end frame

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD