|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.rico.engine.effect.texproj.TextureProjector
public class TextureProjector
This class represents a texture projector. It can be used to project textures into the world. White parts of the texture will be transparent.
| Constructor Summary | |
|---|---|
TextureProjector(java.lang.String name,
java.lang.String texPath,
int textureUnit)
Creates a new texture projector. |
|
TextureProjector(java.lang.String name,
java.lang.String texPath,
int textureUnit,
Point3D position)
Creates a new texture projector. |
|
TextureProjector(java.lang.String name,
java.lang.String texPath,
int textureUnit,
Point3D position,
float rotX,
float rotY)
Creates a new texture projector. |
|
| Method Summary | |
|---|---|
void |
bind(javax.media.opengl.GL gl)
Binds the projected texture to the successing meshes. |
int |
getAssignedTexUnit()
Returns the texture unit this projection is assigned to. |
java.lang.String |
getName()
Returns the name of the texture projector. |
Point3D |
getPosition()
Returns the projector position |
float |
getProjectionBalance()
Returns the value that is influencing the texture projection balance. |
float |
getRotX()
Return the rotation around the x axis. |
float |
getRotY()
Return the rotation around the y axis. |
void |
release(javax.media.opengl.GL gl)
Releases (stops) the texture projection. |
void |
setAssignedTextureUnit(int texUnit)
Set the texture unit to be used for texture projection. |
void |
setPosition(float x,
float y,
float z)
Sets the projector's position |
void |
setPosition(Point3D position)
Sets the projector's position |
void |
setProjectionBalance(float value)
This method sets the balance of front and back projection of the texture. |
void |
setRotX(float rotX)
Set the x axis rotation of the texture projector. |
void |
setRotY(float rotY)
Set the y axis rotation of the texture projector. |
void |
setShowProjectorPosition(boolean show)
Determines whether the projector's position will be symbolized by a little solid cube. |
void |
setX(float x)
Sets the x-coordinate of the projector |
void |
setY(float y)
Sets the y-coordinate of the projector |
void |
setZ(float z)
Sets the z-coordinate of the projector |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextureProjector(java.lang.String name,
java.lang.String texPath,
int textureUnit)
name - name of the texture projector (can be used a script id)texPath - path to texture filetextureUnit - texture unit to use for texture projection (0 - 31)
public TextureProjector(java.lang.String name,
java.lang.String texPath,
int textureUnit,
Point3D position)
name - name of the texture projector (can be used a script id)texPath - path to texture filetextureUnit - texture unit to use for texture projectionposition - position of the light
public TextureProjector(java.lang.String name,
java.lang.String texPath,
int textureUnit,
Point3D position,
float rotX,
float rotY)
name - name of the texture projector (can be used a script id)texPath - path to texture filetextureUnit - texture unit to use for texture projectionposition - position of the lightrotX - rotation along the x axisrotY - rotation along the y axis| Method Detail |
|---|
public java.lang.String getName()
public void setShowProjectorPosition(boolean show)
show - Symbolize projector position? --> true = yes, false = nopublic void setAssignedTextureUnit(int texUnit)
texUnit - texture unit to use for projection (e.g. 1 or 2)public int getAssignedTexUnit()
public void bind(javax.media.opengl.GL gl)
gl - public void release(javax.media.opengl.GL gl)
gl - public Point3D getPosition()
public void setPosition(Point3D position)
position - position of the projector
public void setPosition(float x,
float y,
float z)
x - x-coordinatey - y-coordinatez - z-coordinatepublic void setX(float x)
x - x-coordinate valuepublic void setY(float y)
y - y-coordinate valuepublic void setZ(float z)
z - z-coordinate valuepublic void setRotX(float rotX)
rotX - degree of x axis roationpublic void setRotY(float rotY)
rotY - degree of y axis roationpublic float getRotX()
public float getRotY()
public void setProjectionBalance(float value)
value - value that affects the texture projection balancepublic float getProjectionBalance()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||