| 
 | j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.j3d.loaders.discreet.MaterialBlock
public class MaterialBlock
Representation of a collection of material definitions that form a single block of data in the file.
For each piece of data, if it was not defined in the loaded file, then the array will be null.
The material chunk has the following format:
 MATERIAL BLOCK 0xAFFF
     MATERIAL NAME 0xA000
     AMBIENT COLOR 0xA010
     DIFFUSE COLOR 0xA020
     SPECULAR COLOR 0xA030
     SHININESS PERC 0xA040
     TRANSPARENCY PERC 0xA050
     TWO_SIDED_LIGHTING 0xA081
     TEXTURE MAP 1 0xA200
     SPECULAR MAP 0xA204
     OPACITY MAP 0xA210
     REFLECTION MAP 0xA220
     BUMP MAP 0xA230
     [SUB CHUNKS FOR EACH MAP]
         MAPPING FILENAME 0xA300
         MAPPING PARAMETERS 0xA351
 
| Field Summary | |
|---|---|
|  boolean | additiveBlendFlag indicating the transparency blend is additive | 
|  float[] | ambientColorThe ambient colour of this block - transcribed to 3 value RGB [0,1] | 
|  TextureBlock | bumpMapThe bump map to be associated with this material | 
|  TextureBlock | bumpMaskThe bump map to be associated with this material | 
|  float[] | diffuseColorThe diffuse colour of this block - transcribed to 3 value RGB [0,1] | 
|  java.lang.String | nameThe name of this material | 
|  TextureBlock | opacityMapThe opacity map to be associated with this material | 
|  TextureBlock | opacityMaskThe opacity map to be associated with this material | 
|  TextureBlock | reflectionMapThe reflection map (environment map) associated with this material | 
|  TextureBlock | reflectionMaskThe reflection map (environment map) associated with this material | 
|  int | shadingTypeThe shading type. | 
|  TextureBlock | shininessMapThe shininess map associated with this material | 
|  TextureBlock | shininessMaskThe shininess map associated with this material | 
|  float | shininessRatioThe shininess ratio to a [0,1] range | 
|  float | shininessStrengthThe shininess converted to a [0,1] range. | 
|  float[] | specularColorThe specular colour of this block - transcribed to 3 value RGB [0,1] | 
|  TextureBlock | specularMapThe specular light map to be associated with this material | 
|  TextureBlock | specularMaskThe specular light map to be associated with this material | 
|  TextureBlock | textureMap1The first texture map to be associated with this material | 
|  TextureBlock | textureMap2The second texture map to be associated with this material | 
|  TextureBlock | textureMask1The first texture map to be associated with this material | 
|  TextureBlock | textureMask2The second texture map to be associated with this material | 
|  float | transparencyThe transparency converted to a [0,1] range | 
|  boolean | twoSidedLightingFlag indicating 2-sided lighting is set or not | 
|  boolean | wireframeFlag indicating if the object should be rendered as wireframe | 
|  float | wireSizeThe wire size to use if wireframe | 
| Constructor Summary | |
|---|---|
| MaterialBlock()Create a new instance of this material block with the defaults set. | |
| Method Summary | 
|---|
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public java.lang.String name
public float[] ambientColor
public float[] diffuseColor
public float[] specularColor
public float shininessRatio
public float shininessStrength
public float transparency
public boolean wireframe
public float wireSize
public int shadingType
public boolean additiveBlend
public boolean twoSidedLighting
public TextureBlock textureMap1
public TextureBlock textureMask1
public TextureBlock textureMap2
public TextureBlock textureMask2
public TextureBlock specularMap
public TextureBlock specularMask
public TextureBlock opacityMap
public TextureBlock opacityMask
public TextureBlock bumpMap
public TextureBlock bumpMask
public TextureBlock reflectionMap
public TextureBlock reflectionMask
public TextureBlock shininessMap
public TextureBlock shininessMask
| Constructor Detail | 
|---|
public MaterialBlock()
| 
 | j3d.org Code | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||