j3d.org Code

org.j3d.loaders.discreet
Class TextureBlock

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

public class TextureBlock
extends java.lang.Object

Representation of a single texture and its paramaters needed for rendering.

Textures are not inlined in the file, so this object only contains information needed to read an external file and render it.

The texture subchunk consists of the following information

     MAPPING FILENAME 0xA300
     MAPPING PARAMETERS 0xA351
 

Version:
$Revision: 1.3 $
Author:
Justin Couch

Field Summary
 float angle
          The amount of rotation of the map (degrees or radians?)
 float[] blendColor1
          blend colour 1.
 float[] blendColor2
          blend colour 2.
 float[] blueBlends
          Individual blue component blend colour value
 float blurring
          The amount of blurring of the texture
 float bumpPercentage
          Bump map percentage filter to apply.
 java.lang.String filename
          The name of the file containing the raw texture file.
 float[] greenBlends
          Individual green component blend colour value
 float[] redBlends
          Individual red component blend colour value
 float strength
          A strength (percentage - [0,1]) for the texture map
 int tiling
          The map tiling type (Not for repeat, clamp etc).
 float uOffset
          The translation in the u direction
 float uScale
          The scale in the U direction
 float vOffset
          The translation in the v direction
 float vScale
          The scale in the V direction
 
Constructor Summary
TextureBlock()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filename

public java.lang.String filename
The name of the file containing the raw texture file. Name may be absolute or relative.


strength

public float strength
A strength (percentage - [0,1]) for the texture map


tiling

public int tiling
The map tiling type (Not for repeat, clamp etc). Control bit flags, where bit 0 (0x1) activates decaling, bit 1 (0x2) activates mirroring, bit 3 (0x8) activates negation, bit 4 (0x10) deactivates tiling, bit 5 (0x20) activates summed area sampling, bit 6 (0x40) activates alpha sourcing, bit 7 (0x80) activates tinting, bit 8 (0x100) ignores alpha, and bit 9 (0x200) activates RGB tinting. Bits 7, 8, and 9 are only used with MAT_TEXMAP, MAT_TEX2MAP, and MAT_SPECMAP chunks. Bit 6, when used with a MAT_TEXMAP, MAT_TEX2MAP, or MAT_SPECMAP chunk must be accompanied with a tinting bit, either 7 or 9. Remaining bits are for internal use only.


blurring

public float blurring
The amount of blurring of the texture


bumpPercentage

public float bumpPercentage
Bump map percentage filter to apply. Not quite sure exacly what this does, but probably a scaling factor, like Strength.


uScale

public float uScale
The scale in the U direction


vScale

public float vScale
The scale in the V direction


uOffset

public float uOffset
The translation in the u direction


vOffset

public float vOffset
The translation in the v direction


angle

public float angle
The amount of rotation of the map (degrees or radians?)


blendColor1

public float[] blendColor1
blend colour 1. Null if not set.


blendColor2

public float[] blendColor2
blend colour 2. Null if not set


redBlends

public float[] redBlends
Individual red component blend colour value


greenBlends

public float[] greenBlends
Individual green component blend colour value


blueBlends

public float[] blueBlends
Individual blue component blend colour value

Constructor Detail

TextureBlock

public TextureBlock()

j3d.org Code

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