|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.threed.jpct.TextureInfo
public class TextureInfo
TextureInfo is jPCT's key to multi texturing. You can use addTriangle() or
setTexture() in Object3D to define a polygon or the whole object as multi
textured.
You can use any combination of textures and blending modes for a polygon.
jPCT will try to optimize the texture state changes when rendering the image.
However, don't overuse this feature on a single object, because jPCT can only
do so much.
If you are adding more layers than the hardware supports, additional layers
will be ignored.
Field Summary | |
---|---|
static int |
MAX_PHYSICAL_TEXTURE_STAGES
The maximum number of physical texture layers available. |
static int |
MODE_ADD
Use addition for adding this texture layer |
static int |
MODE_BLEND
Use blending for adding this texture layer |
static int |
MODE_DECAL
Use the layer as a decal, i.e. the alpha channel defines the opacity. |
static int |
MODE_MODULATE
Use multiplication of color values for adding this texture layer |
static int |
MODE_REPLACE
For the sake of completeness. |
Constructor Summary | |
---|---|
TextureInfo(int texID)
Creates a new TextureInfo. |
|
TextureInfo(int texID,
float u0,
float v0,
float u1,
float v1,
float u2,
float v2)
Creates a new TextureInfo. |
Method Summary | |
---|---|
void |
add(int texID,
float u0,
float v0,
float u1,
float v1,
float u2,
float v2,
int mode)
Adds another texture layer. |
void |
add(int texID,
int mode)
Adds another texture layer. |
void |
set(int texID,
int stageCnt,
float u0,
float v0,
float u1,
float v1,
float u2,
float v2,
int mode)
Sets the values of an existing layer. |
void |
set(int texID,
int stageCnt,
int mode)
Sets the values of an existing layer. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MODE_MODULATE
public static final int MODE_ADD
public static final int MODE_REPLACE
public static final int MODE_BLEND
public static final int MODE_DECAL
public static final int MAX_PHYSICAL_TEXTURE_STAGES
Constructor Detail |
---|
public TextureInfo(int texID, float u0, float v0, float u1, float v1, float u2, float v2)
texID
- int the ID of the Texture as the TextureManager sees it.u0
- float the u-coordinate for the first vertexv0
- float the v-coordinate for the first vertexu1
- float the u-coordinate for the second vertexv1
- float the v-coordinate for the second vertexu2
- float the u-coordinate for the third vertexv2
- float the v-coordinate for the third vertexpublic TextureInfo(int texID)
texID
- int the ID of the Texture as the TextureManager sees it.Method Detail |
---|
public void add(int texID, int mode)
texID
- int the Texture's IDmode
- int the combination modepublic void set(int texID, int stageCnt, int mode)
texID
- int the ID of the Texture as the TextureManager sees it.stageCnt
- int the stagemode
- int the combination modepublic void add(int texID, float u0, float v0, float u1, float v1, float u2, float v2, int mode)
texID
- int the ID of the Texture as the TextureManager sees it.u0
- float the u-coordinate for the first vertexv0
- float the v-coordinate for the first vertexu1
- float the u-coordinate for the second vertexv1
- float the v-coordinate for the second vertexu2
- float the u-coordinate for the third vertexv2
- float the v-coordinate for the third vertexmode
- int the combination modepublic void set(int texID, int stageCnt, float u0, float v0, float u1, float v1, float u2, float v2, int mode)
texID
- int the ID of the Texture as the TextureManager sees it.stageCnt
- int the stageu0
- float the u-coordinate for the first vertexv0
- float the v-coordinate for the first vertexu1
- float the u-coordinate for the second vertexv1
- float the v-coordinate for the second vertexu2
- float the u-coordinate for the third vertexv2
- float the v-coordinate for the third vertexmode
- int the combination mode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |