j3d.org Code

org.j3d.loaders.discreet
Class ObjectMesh

java.lang.Object
  extended by org.j3d.loaders.discreet.ObjectMesh

public class ObjectMesh
extends java.lang.Object

Representation of a complete set of meshes to give a single object from the file.

A mesh consists of a collection of chunks. Each chunk contains different information, such as vertices, materials etc.

Version:
$Revision: 1.7 $
Author:
Justin Couch

Field Summary
 float[] ambientLight
          Ambient light setting.
 java.lang.String backgroundBitmap
          The name of the bitmap to use for the background, if set
 float backgroundMidpoint
          Percentage location of the mid point, [0,1]
 ObjectBlock[] blocks
          Listing of all the sub-objects in the mesh
 float[] distanceFogDetails
          Details of a distance-cued fog instruction.
 boolean fogBackground
          Flag to indicate that the background should also be fogged
 float[] fogColor
          Colour of the fog, if needed.
 float[][] gradientBackgroundColors
          Colours of the gradient background.
 KeyframeBlock[] keyframes
          Listing of all keyframe blocks available
 float[] layerFogDetails
          Details of a vertically layered constant atmospheric fog.
layerFogDetails[0] lower Y boundary
layerFogDetails[1] upper Y boundary
layerFogDetails[2] fog density.
 int layerFogFlags
          Flags associated with the layered fog.
 float[] linearFogDetails
          Details of a basic global fog instruction.
 float masterScale
          The master (uniform) scale to apply to all the objects
 MaterialBlock[] materials
          Listing of all material information
 int meshVersion
          The version of the mesh that was read
 int numBlocks
          Number of valid blocks available
 int numKeyframes
          The number of valid keyframe blocks available
 int numMaterials
          The number of valid materials available
 int selectedBackground
          Flag which of the 3 background structures should be used
 int selectedFog
          Flag which of the 3 fog structures should be used
 float[] solidBackgroundColor
          Colours of the background.
static int USE_BITMAP
          Flag instructing use of the bitmap background
static int USE_DISTANCE_FOG
          Flag instructing use of the solid colour fog
static int USE_GRADIENT
          Flag instructing use of the gradient background
static int USE_LAYER_FOG
          Flag instructing use of the gradient fog
static int USE_LINEAR_FOG
          Flag instructing use of the bitmap fog
static int USE_SOLID_BG
          Flag instructing use of the solid colour background
 
Constructor Summary
ObjectMesh()
          Construct a new instance with blocks initialised to a size of 8.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USE_BITMAP

public static final int USE_BITMAP
Flag instructing use of the bitmap background

See Also:
Constant Field Values

USE_GRADIENT

public static final int USE_GRADIENT
Flag instructing use of the gradient background

See Also:
Constant Field Values

USE_SOLID_BG

public static final int USE_SOLID_BG
Flag instructing use of the solid colour background

See Also:
Constant Field Values

USE_LINEAR_FOG

public static final int USE_LINEAR_FOG
Flag instructing use of the bitmap fog

See Also:
Constant Field Values

USE_LAYER_FOG

public static final int USE_LAYER_FOG
Flag instructing use of the gradient fog

See Also:
Constant Field Values

USE_DISTANCE_FOG

public static final int USE_DISTANCE_FOG
Flag instructing use of the solid colour fog

See Also:
Constant Field Values

masterScale

public float masterScale
The master (uniform) scale to apply to all the objects


meshVersion

public int meshVersion
The version of the mesh that was read


blocks

public ObjectBlock[] blocks
Listing of all the sub-objects in the mesh


numBlocks

public int numBlocks
Number of valid blocks available


materials

public MaterialBlock[] materials
Listing of all material information


numMaterials

public int numMaterials
The number of valid materials available


keyframes

public KeyframeBlock[] keyframes
Listing of all keyframe blocks available


numKeyframes

public int numKeyframes
The number of valid keyframe blocks available


ambientLight

public float[] ambientLight
Ambient light setting. Null if not set


selectedBackground

public int selectedBackground
Flag which of the 3 background structures should be used


backgroundBitmap

public java.lang.String backgroundBitmap
The name of the bitmap to use for the background, if set


solidBackgroundColor

public float[] solidBackgroundColor
Colours of the background. Has either linear or standard value, depending on the release version of the file.


gradientBackgroundColors

public float[][] gradientBackgroundColors
Colours of the gradient background. Has either linear or standard value, depending on the release version of the file. [0] is top color, [1] is mid colour, [2] is bottom color.


backgroundMidpoint

public float backgroundMidpoint
Percentage location of the mid point, [0,1]


linearFogDetails

public float[] linearFogDetails
Details of a basic global fog instruction.
linearFogDetails[0] is near fog distance
linearFogDetails[1] is near density (0-1)
linearFogDetails[2] is far fog distance
linearFogDetails[3] is far density.


fogColor

public float[] fogColor
Colour of the fog, if needed. Only used for linear and layered fog.


fogBackground

public boolean fogBackground
Flag to indicate that the background should also be fogged


layerFogDetails

public float[] layerFogDetails
Details of a vertically layered constant atmospheric fog.
layerFogDetails[0] lower Y boundary
layerFogDetails[1] upper Y boundary
layerFogDetails[2] fog density.


layerFogFlags

public int layerFogFlags
Flags associated with the layered fog. Bit 20 (0x100000) is set for background fogging, bit 0 (0x1) is set for bottom falloff, and bit 1 (0x2) is set for top falloff.


distanceFogDetails

public float[] distanceFogDetails
Details of a distance-cued fog instruction. (I think this means exponential) [0] is near fog distance, [1] is near dimming factor (0-1). [2] is far fog distance, [3] is far dimming factor.


selectedFog

public int selectedFog
Flag which of the 3 fog structures should be used

Constructor Detail

ObjectMesh

public ObjectMesh()
Construct a new instance with blocks initialised to a size of 8.


j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org