|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjarp.View
public class View
Top-level Java ARP avatar view class -- each instance of this class maintains its own GLCanvas for which it acts as the GLEventListener
Field Summary | |
---|---|
static int |
CAM_NONE
|
static int |
CAM_PANNING
|
static int |
CAM_PANNING_H
|
static int |
CAM_PANNING_V
|
static int |
CAM_ROTATING
|
static int |
CAM_ZOOMING
|
Constructor Summary | |
---|---|
View(AvatarEventHandler aehdlr,
JAOptions jopts,
JACanvasEmbedder embedder)
Constructor -- creates the GLCanvas, but defers the rest of the work until the init() event. |
Method Summary | |
---|---|
void |
display(javax.media.opengl.GLAutoDrawable gld)
JOGL EventListener method: renders the current state of
this avatar view's character onto its GLCanvas -- which
is identical to the given drawable. |
void |
displayChanged(javax.media.opengl.GLAutoDrawable drawable,
boolean modeChanged,
boolean deviceChanged)
JOGL EventListener method: accepts notification of the
given changes to the characteristics of the display supporting
this avatar view's OpenGL canvas. |
void |
getCamClipPlanes(float[] clipnf)
|
void |
getCamFacing(float[] facexyz)
|
float |
getCamFOV()
|
void |
getCamLocation(float[] locxyz)
|
void |
getCamUp(float[] upxyz)
|
void |
init(javax.media.opengl.GLAutoDrawable gld)
JOGL EventListener method: initialises the newly established
GL drawing context for this avatar view. |
void |
onLeftMouseDown(int x,
int y)
|
void |
onMouseMove(int x,
int y)
|
void |
onMouseUp()
|
void |
onRightMouseDown(int x,
int y)
|
void |
playOneFrame(CASFrame FRAME,
int F)
Generates and plays one frame, often but not necessarily as part of an animation sequence, given the frame data and its index number. |
void |
playOneFrame(CASFrame FRAME,
int F,
float SPEED_UP,
boolean T_DISPLAY)
Generates and plays one frame, often but not necessarily as part of an animation sequence, given the frame data, its index number, the current speed-up factor (for use in performance statistics collection), with running performance data logging output controlled by the given flag. |
void |
requestSwitchAvatar(java.lang.String avatar,
java.lang.String nonstddef)
Requests that this view initiates a switch to the use of the given avatar, by loading its definition from its standard location, or using the given non-standard file if that argument is non-null; the avatar itself maybe null , which is interpreted as
a request to unload the current avatar (in which case the second
argument is ignored). |
void |
reshape(javax.media.opengl.GLAutoDrawable gld,
int x,
int y,
int w,
int h)
JOGL EventListener method: accepts notification of the
given changes to the location and/or dimensions of this avatar view's
OpenGL canvas. |
void |
saveAvatarIfRequested()
Checks whether the conditions for the saving of a newly loaded avatar definition or of its texture are satisifed, and if so performs the appropriate save operations. |
void |
setCamClipPlanes(float znear,
float zfar)
|
void |
setCamExternal(javax.swing.event.MouseInputListener extmil)
|
void |
setCamFacing(float[] facingxyz)
|
void |
setCamFacing(float x,
float y,
float z)
|
void |
setCamFOV(float fov)
|
void |
setCamInternal()
|
void |
setCamLocation(float[] locxyz)
|
void |
setCamLocation(float x,
float y,
float z)
|
void |
setCamUp(float[] upxyz)
|
void |
setCamUp(float x,
float y,
float z)
|
void |
setPlayerStats(JAPlayerStats ps)
Sets the player performance statistics gatherer for this avatar view. |
void |
setRenderMode(int mode)
|
void |
startAnimation()
Registers the start of a new animation, that is, the performance of a sequence of (frame generation and) frame display operations. |
void |
stopAnimation()
Registers the completion of an animation sequence. |
void |
terminateView()
Performs final termination for this avatar view, assuming that an earlier call has been made to #terminateViewDisplay(). |
ThreadCompletionChecker |
terminateViewDisplay()
Terminates the display for this avatar view, and returns the completion checker for this view's display scheduler thread. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int CAM_NONE
public static final int CAM_ROTATING
public static final int CAM_ZOOMING
public static final int CAM_PANNING
public static final int CAM_PANNING_V
public static final int CAM_PANNING_H
Constructor Detail |
---|
public View(AvatarEventHandler aehdlr, JAOptions jopts, JACanvasEmbedder embedder)
Method Detail |
---|
public ThreadCompletionChecker terminateViewDisplay()
public void terminateView()
public void requestSwitchAvatar(java.lang.String avatar, java.lang.String nonstddef)
null
, which is interpreted as
a request to unload the current avatar (in which case the second
argument is ignored).
public void init(javax.media.opengl.GLAutoDrawable gld)
EventListener
method: initialises the newly established
GL drawing context for this avatar view.
init
in interface javax.media.opengl.GLEventListener
public void display(javax.media.opengl.GLAutoDrawable gld)
EventListener
method: renders the current state of
this avatar view's character onto its GLCanvas
-- which
is identical to the given drawable.
display
in interface javax.media.opengl.GLEventListener
public void reshape(javax.media.opengl.GLAutoDrawable gld, int x, int y, int w, int h)
EventListener
method: accepts notification of the
given changes to the location and/or dimensions of this avatar view's
OpenGL canvas.
reshape
in interface javax.media.opengl.GLEventListener
public void displayChanged(javax.media.opengl.GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged)
EventListener
method: accepts notification of the
given changes to the characteristics of the display supporting
this avatar view's OpenGL canvas.
displayChanged
in interface javax.media.opengl.GLEventListener
public void setRenderMode(int mode)
public void saveAvatarIfRequested()
public void setPlayerStats(JAPlayerStats ps)
public void startAnimation()
public void stopAnimation()
public void playOneFrame(CASFrame FRAME, int F) throws java.lang.InterruptedException, JAException
java.lang.InterruptedException
JAException
public void playOneFrame(CASFrame FRAME, int F, float SPEED_UP, boolean T_DISPLAY) throws java.lang.InterruptedException, JAException
java.lang.InterruptedException
JAException
public void setCamInternal()
public void setCamExternal(javax.swing.event.MouseInputListener extmil)
public void onLeftMouseDown(int x, int y)
public void onRightMouseDown(int x, int y)
public void onMouseMove(int x, int y)
public void onMouseUp()
public void setCamLocation(float[] locxyz)
public void setCamLocation(float x, float y, float z)
public void setCamFacing(float[] facingxyz)
public void setCamFacing(float x, float y, float z)
public void setCamUp(float[] upxyz)
public void setCamUp(float x, float y, float z)
public void setCamClipPlanes(float znear, float zfar)
public void setCamFOV(float fov)
public void getCamLocation(float[] locxyz)
public void getCamFacing(float[] facexyz)
public void getCamUp(float[] upxyz)
public void getCamClipPlanes(float[] clipnf)
public float getCamFOV()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |