|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jinx.video.Options net.jinx.video.model.ModelContext net.jinx.video.Context
public class Context
In addition to the attributes stored in Options, this class stores
attributes that function as contextual data for rendering. The attributes
defined in this class are not affected by the push() and pop() methods of
the Options class.
API Stability: Stable; the setView and getView methods are
beta.
Constructor Summary | |
---|---|
Context()
Constructs a new Context object. |
|
Context(boolean initTM)
Constructs a new Context object. |
|
Context(boolean initTM,
boolean initTS)
Constructs a new Context object. |
Method Summary | |
---|---|
int |
currentLight()
Provides the number of the current light to use. |
float |
getAspectRatio()
Provides thw current aspect ratio for the drawing area. |
Vector |
getCameraPosition()
Provides the current position of the viewer/camera. |
float |
getDeltaTime()
Provides the change in time value that should indicate how to use the interpolation value that's set in this class. |
java.awt.Rectangle |
getDrawingArea()
Provides the rectangle describing the current drawing area. |
javax.media.opengl.GL |
getGL()
|
javax.media.opengl.GLContext |
getGLContext()
|
javax.media.opengl.GLDrawable |
getGLDrawable()
|
float |
getInterpolation()
Provides the current interpolation value. |
TextureManager |
getTextureManager()
Provides the current TextureManager. |
TimeSource |
getTimeSource()
Provides the TimeSource that will function as simulation clock for rendering. |
View |
getView()
Provides the current View for the scene being rendered. |
boolean |
isInit()
Provides the means to easily determine if the init() method of SplitScreenRenderer is currently running. |
int |
lastEnabledLight()
Provides the number of the highest enabled light. |
int |
newLight()
Increments the current light number and returns it. |
void |
resetLight()
Resets the current light number to -1. |
void |
setCameraPosition(Vector cameraPosition)
3D View implementations are required to call this when they update the position of the camera. |
void |
setDeltaTime(float deltaTime)
Sets the change in time value that should indicate how to use the interpolation value that's set in this class. |
void |
setLastEnabledLight(int light)
Tells the system that all lights up to the given number are now enabled. |
void |
setTextureManager(TextureManager textures)
Sets the current TextureManager. |
void |
setTimeSource(TimeSource timeSource)
Sets the TimeSource that functions as simulation clock for rendering. |
void |
setView(View view)
Sets the current View. |
Methods inherited from class net.jinx.video.model.ModelContext |
---|
getCurrentModel |
Methods inherited from class net.jinx.video.Options |
---|
getAlpha, getAWTClearColor, getClearColor, getFarClip, getFOV, getGlobalAmbientLight, getNearClip, getSmoothness, getSolidity, getTextureMode, getTextureModeName, getTwosidedness, getUseLists, isAmbient, isCountingFrames, isDebuggingGL, isDiffuse, isEmissive, isShiny, isSpecular, isTracingGL, load, pop, push, setAlpha, setAmbient, setClearColor, setCountingFrames, setDebugGL, setDiffuse, setEmissive, setFarClip, setFOV, setGlobalAmbientLight, setNearClip, setShininess, setSmoothness, setSolidity, setSpecular, setTextureMode, setTextureModeName, setTraceGL, setTwosidedness, setUseLists, store |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Context()
public Context(boolean initTM)
initTM
- if true, a new TextureManager is constructed and the
setTextureManager(TextureManager) method is called.public Context(boolean initTM, boolean initTS)
initTM
- if true, a new TextureManager is constructed and the
setTextureManager(TextureManager) method is called.initTS
- if true, a default real-time TimeSource is constructed and
the setTimeSoTimeSource) method is called. If this is false, you MUST
configure the attached TimeSource before you can use the Context object
produced from this constructor.Method Detail |
---|
public final Vector getCameraPosition()
public void setCameraPosition(Vector cameraPosition)
cameraPosition
- the Vector with camera location data.public final javax.media.opengl.GLContext getGLContext()
public final javax.media.opengl.GLDrawable getGLDrawable()
public final javax.media.opengl.GL getGL()
public final View getView()
public void setView(View view)
view
- the View.public final TimeSource getTimeSource()
public void setTimeSource(TimeSource timeSource)
timeSource
- the TimeSource.public float getDeltaTime()
public void setDeltaTime(float deltaTime)
deltaTime
- the change in time value.public final float getInterpolation()
public final boolean isInit()
public int currentLight()
public int newLight()
public void resetLight()
public int lastEnabledLight()
public void setLastEnabledLight(int light)
light
- the light number.public TextureManager getTextureManager()
public void setTextureManager(TextureManager textures)
textures
- the TextureManager.public final java.awt.Rectangle getDrawingArea()
public final float getAspectRatio()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |