Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.vrspace.vrmlclient
Class MovementManager  view MovementManager download MovementManager.java

java.lang.Object
  extended byorg.vrspace.vrmlclient.MovementManager
All Implemented Interfaces:
vrml.external.field.EventOutObserver, java.lang.Runnable

public class MovementManager
extends java.lang.Object
implements vrml.external.field.EventOutObserver, java.lang.Runnable

Traces user movement and sends the data to the server


Nested Class Summary
(package private)  class MovementManager.ListenerThread
           
(package private)  class MovementManager.Movement
          Movement event
 
Field Summary
(package private)  boolean active
           
(package private)  float angle
           
(package private)  double angle_resolution
           
(package private)  double angular_speed
           
(package private)  VRSpace applet
           
(package private)  boolean canMove
           
(package private)  boolean constant_speed
           
(package private)  float dangle
           
(package private)  float drotx
           
(package private)  float droty
           
(package private)  float drotz
           
(package private)  float dx
           
(package private)  float dy
           
(package private)  float dz
           
(package private)  float fps
           
(package private)  java.util.Vector fpsListeners
           
(package private)  long fpsSentTime
           
(package private)  java.util.Vector listeners
           
(package private)  MovementManager.ListenerThread listenerThread
           
(package private)  float maxSpeed
           
(package private)  float maxVisibility
           
(package private)  float minFrameRate
           
(package private)  float minVisibility
           
(package private)  boolean moving
           
(package private)  float old_angle
           
(package private)  float old_dx
           
(package private)  float old_dy
           
(package private)  float old_dz
           
(package private)  float old_rotx
           
(package private)  float old_roty
           
(package private)  float old_rotz
           
(package private)  float old_x
           
(package private)  float old_y
           
(package private)  float old_z
           
(package private)  org.vrspace.util.Queue queue
           
(package private)  float[] rotations
           
(package private)  float rotx
           
(package private)  float roty
           
(package private)  float rotz
           
(package private)  double speed
           
(package private)  double speed_resolution
           
(package private)  long sync_time
           
(package private)  float visibilityRange
           
(package private)  float x
           
(package private)  float y
           
(package private)  float z
           
 
Constructor Summary
MovementManager(VRSpace applet)
           
 
Method Summary
(package private)  void addFrameRateListener(FrameRateListener l)
           
(package private)  void addListener(MovementListener l)
           
 void callback(vrml.external.field.EventOut ev, double time, java.lang.Object userdata)
          EventOutObserver interface.
 void checkMovement()
          Check if movement is allowed, and set NavigationInfo.type field
 void checkVisibility()
          unsafe to run from another thread - browser may unload
(package private)  void removeFrameRateListener(FrameRateListener l)
           
(package private)  void removeListener(MovementListener l)
           
 void run()
          Runnable interface.
(package private)  void send(java.lang.String line)
           
 void setMovement(boolean allowed)
           
 void setSync(long time)
          set sync time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

applet

VRSpace applet

visibilityRange

float visibilityRange

maxVisibility

float maxVisibility

minVisibility

float minVisibility

minFrameRate

float minFrameRate

maxSpeed

float maxSpeed

x

float x

y

float y

z

float z

dx

float dx

dy

float dy

dz

float dz

old_x

float old_x

old_y

float old_y

old_z

float old_z

old_dx

float old_dx

old_dy

float old_dy

old_dz

float old_dz

speed

double speed

rotations

float[] rotations

rotx

float rotx

roty

float roty

rotz

float rotz

angle

float angle

drotx

float drotx

droty

float droty

drotz

float drotz

dangle

float dangle

old_rotx

float old_rotx

old_roty

float old_roty

old_rotz

float old_rotz

old_angle

float old_angle

angular_speed

double angular_speed

speed_resolution

double speed_resolution

angle_resolution

double angle_resolution

constant_speed

boolean constant_speed

moving

boolean moving

sync_time

long sync_time

fpsSentTime

long fpsSentTime

fps

float fps

canMove

boolean canMove

active

boolean active

listeners

java.util.Vector listeners

fpsListeners

java.util.Vector fpsListeners

queue

org.vrspace.util.Queue queue

listenerThread

MovementManager.ListenerThread listenerThread
Constructor Detail

MovementManager

public MovementManager(VRSpace applet)
Method Detail

addListener

void addListener(MovementListener l)

removeListener

void removeListener(MovementListener l)

addFrameRateListener

void addFrameRateListener(FrameRateListener l)

removeFrameRateListener

void removeFrameRateListener(FrameRateListener l)

callback

public void callback(vrml.external.field.EventOut ev,
                     double time,
                     java.lang.Object userdata)
EventOutObserver interface. Process the movement, depending on userdata:
"translation" -> ev is EventOutSFVec3f containing user position
"rotation" -> ev is EventOutSFRotation containing user orientation

Specified by:
callback in interface vrml.external.field.EventOutObserver

send

void send(java.lang.String line)

checkMovement

public void checkMovement()
Check if movement is allowed, and set NavigationInfo.type field


setMovement

public void setMovement(boolean allowed)

checkVisibility

public void checkVisibility()
unsafe to run from another thread - browser may unload


run

public void run()
Runnable interface. Sends the data to the server if movement happened.

Specified by:
run in interface java.lang.Runnable

setSync

public void setSync(long time)
set sync time