|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jinx.video.Options
public class Options
Holds flags and other attributes for rendering. Unlike Hierarchy, the
attributes are stored in their native form and have individual methods to
handle each. There are also a pair of methods for pushing and poping values
from an internal stack. This can be handy for hierarchical 3D objects that
require different settings for each part.
API Stability: Stable.
Constructor Summary | |
---|---|
protected |
Options()
Constructs a new Options object. |
Method Summary | |
---|---|
float |
getAlpha()
Provides the current alpha transparency value. |
java.awt.Color |
getAWTClearColor()
Provides the clear color as a java.awt.Color. |
float[] |
getClearColor()
Provides the clear color that is used to clear the color buffer. |
double |
getFarClip()
Provides the value of the far clipping plane. |
double |
getFOV()
Provides the angle for the field of view. |
float[] |
getGlobalAmbientLight()
Provides the global ambient light color. |
double |
getNearClip()
Provides the value of the near clipping plane. |
boolean |
getSmoothness()
Indicates whether or not objects should be rendered as smooth or flat shaded. |
boolean |
getSolidity()
Indicates whether or not objects should be rendered as solid or wire frames. |
int |
getTextureMode()
Provides the value of the current texture mode. |
java.lang.String |
getTextureModeName()
Provides the texture mode name for the value of the current texture mode attribute. |
boolean |
getTwosidedness()
Indicates whether or not polygons should be rendered as one or two sided. |
boolean |
getUseLists()
Indicates whether or not display lists should be used. |
boolean |
isAmbient()
Indicates whether or not ambient color should be used. |
boolean |
isCountingFrames()
Indicates whether or not frames should be counted. |
boolean |
isDebuggingGL()
Indicates whether or not the OpenGL pipeline should be debugged. |
boolean |
isDiffuse()
Indicates whether or not diffuse color should be used. |
boolean |
isEmissive()
Indicates whether or not emissive color should be used. |
boolean |
isShiny()
Indicates whether or not the shininess color component should be used. |
boolean |
isSpecular()
Indicates whether or not specular color should be used. |
boolean |
isTracingGL()
Indicates whether or not the OpenGL pipeline should be traced. |
void |
load(net.jinx.db.Hierarchy h)
Configures this Context object using the given Hierarchy. |
void |
pop()
Restores the state of this Context object from it's internal stack. |
void |
push()
Pushes the current state of this Context object onto it's own internal stack. |
void |
setAlpha(float alpha)
Allows setting the current alpha transparency value. |
void |
setAmbient(boolean ambient)
Allows setting whether or not ambient color should be used. |
void |
setClearColor(float[] clearColor)
Sets the clear color that is used to clear the color buffer. |
void |
setCountingFrames(boolean countframes)
Allows setting whether or not frames should be counted. |
void |
setDebugGL(boolean debuggl)
Allows setting whether or not the OpenGL pipeline should be debugged. |
void |
setDiffuse(boolean diffuse)
Allows setting whether or not diffuse color should be used. |
void |
setEmissive(boolean emissive)
Allows setting whether or not emissive color should be used. |
void |
setFarClip(double far)
Sets the far clipping plane. |
void |
setFOV(double fov)
Allows setting the angle for the field of view. |
void |
setGlobalAmbientLight(float[] globalAmbient)
Sets the global ambient light color. |
void |
setNearClip(double near)
Sets the near clipping plane. |
void |
setShininess(boolean shininess)
Allows setting whether or not the shininess color component should be used. |
void |
setSmoothness(boolean smooth)
Allows setting whether or not objects should be rendered as smooth or flat shaded. |
void |
setSolidity(boolean solid)
Allows setting whether or not objects should be rendered as solid or not. |
void |
setSpecular(boolean specular)
Allows setting whether or not specular color should be used. |
void |
setTextureMode(int textureMode)
Sets the texture mode attribute. |
void |
setTextureModeName(java.lang.String modeName)
Sets the texture mode attribute based on the given String. |
void |
setTraceGL(boolean tracegl)
Allows setting whether or not the OpenGL pipeline should be traced. |
void |
setTwosidedness(boolean twoside)
Allows setting whether or not objects should be rendered as one or two sided. |
void |
setUseLists(boolean uselists)
Allows setting whether or not display lists should be used. |
void |
store(net.jinx.db.Hierarchy h)
Stores this Context object's flags into the given Hierarchy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Options()
Method Detail |
---|
public boolean isDebuggingGL()
public void setDebugGL(boolean debuggl)
debuggl
- true if the OpenGL pipeline should be debugged.public boolean isTracingGL()
public void setTraceGL(boolean tracegl)
tracegl
- true if the OpenGL pipeline should be traced.public void setFOV(double fov)
fov
- the angle.public double getFOV()
public void setNearClip(double near)
near
- the value for the near clipping plane.public double getNearClip()
public void setFarClip(double far)
far
- the value for the far clipping plane.public double getFarClip()
public void setAmbient(boolean ambient)
ambient
- true if ambient color should be used.public boolean isAmbient()
public void setDiffuse(boolean diffuse)
diffuse
- true if diffuse color should be used.public boolean isDiffuse()
public void setSpecular(boolean specular)
specular
- true if specular color should be used.public boolean isSpecular()
public void setEmissive(boolean emissive)
emissive
- true if emissive color should be used.public boolean isEmissive()
public void setShininess(boolean shininess)
shininess
- true if the shininess color component should be used.public boolean isShiny()
public boolean getSolidity()
public void setSolidity(boolean solid)
solid
- if true, solid; if false, wire frame.public boolean getSmoothness()
public void setSmoothness(boolean smooth)
smooth
- if true, smooth; if false, flat shaded.public boolean getTwosidedness()
public void setTwosidedness(boolean twoside)
twoside
- two sided if true; if false, one sided.public boolean getUseLists()
public void setUseLists(boolean uselists)
uselists
- if true display lists should be used.public boolean isCountingFrames()
public void setCountingFrames(boolean countframes)
countframes
- true indicates frames will be counted; false means
that they won't be counted.public float getAlpha()
public void setAlpha(float alpha)
alpha
- the alpha value as a float. This value will be clamped
between zero and one.public float[] getGlobalAmbientLight()
public void setGlobalAmbientLight(float[] globalAmbient)
globalAmbient
- the array of color data. It must be length four.public float[] getClearColor()
public java.awt.Color getAWTClearColor()
public void setClearColor(float[] clearColor)
clearColor
- the array of color data. It must be length four.public int getTextureMode()
public java.lang.String getTextureModeName()
public void setTextureMode(int textureMode)
textureMode
- this must be one of GL_MODULATE, GL_REPLACE, GL_BLEND,
or GL_DECAL from the net.java.games.jogl.GL interface.public void setTextureModeName(java.lang.String modeName)
modeName
- the name of the mode to use. Must be one of "modulate",
"mod", "replace", "rep", "blend", "decal", or "dec".
java.lang.IllegalArgumentException
- if the String is not one of the
specified Strings.
NullPointeException
- if modeName is null.public void load(net.jinx.db.Hierarchy h)
h
- the Hierarchy.public void store(net.jinx.db.Hierarchy h)
h
- the Hierarchy.public void push()
public void pop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |