Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Mobile Class Reference

UIObject subclass for mobile/wireless phone/tablet motion control. More...

#include <MobileInterface.h>

Inheritance diagram for Mobile:

UIObject List of all members.

Public Types

enum  MoveMode {
  OFF, MOVE, ANIMATE, TRACKER,
  USER
}
 enum for Mobile movement modes. More...

enum  TouchMode { ROTATE, TRANSLATE, SCALEROTZ }
 enum for multitouch motion mode. More...


Public Methods

 Mobile (VMDApp *)
 constructor. More...

virtual ~Mobile (void)
 destructor. More...

virtual void reset (void)
 reset the user interface (force update of all info displays). More...

virtual int act_on_command (int, Command *)
 command execute update. More...

virtual int check_event (void)
 check for and event, queue and return TRUE if one is found. More...

int get_port ()
 get the currently configured port number. More...

int get_APIsupported ()
 get the currently supported API level. More...

int get_move_mode ()
 get the currently configured mode. More...

void get_client_list (ResizeArray< JString * > *&nick, ResizeArray< JString * > *&ip, ResizeArray< bool > *&active)
 get the current list of connected clients. More...

int move_mode (MoveMode mm)
 set the Mobile move mode to the given state; return success. More...

int set_activeClient (const char *nick, const char *ip)
 set the active client, based on their nick and IP. More...

int sendMsgToClient (const char *nick, const char *ip, const char *msgType, const char *msg)
 send a message to a single client. More...

int network_port (int newport)
 set the incoming UDP port (closing the old one if needed). More...

void set_max_stride (int ms)
 set the maximum animation stride allowed. More...

void get_tracker_status (float &tx, float &ty, float &tz, float &rx, float &ry, float &rz, int &buttons)
 return the current orientation event data, used by the UIVR MobileTracker interface. More...

int addNewClient (JString *nick, JString *ip, const int port, const bool active)
 add a new client device connection, user nickname, IP, etc. More...

int removeClient (const int num)
 remove a connected client device. More...

void removeAllClients ()
 disconnect all client devices. More...


Static Public Methods

const char * get_mode_str (MoveMode mode)
 gets a string representing a mode's name. More...


Detailed Description

UIObject subclass for mobile/wireless phone/tablet motion control.

Definition at line 46 of file MobileInterface.h.


Member Enumeration Documentation

enum Mobile::MoveMode
 

enum for Mobile movement modes.

Enumeration values:
OFF 
MOVE 
ANIMATE 
TRACKER 
USER 

Definition at line 49 of file MobileInterface.h.

Referenced by VMDApp::mobile_set_mode, and text_cmd_mobile.

enum Mobile::TouchMode
 

enum for multitouch motion mode.

Enumeration values:
ROTATE 
TRANSLATE 
SCALEROTZ 

Definition at line 52 of file MobileInterface.h.


Constructor & Destructor Documentation

Mobile::Mobile VMDApp  
 

constructor.

Definition at line 546 of file MobileInterface.C.

References NULL, reset, ROTATE, wkf_timer_create, and wkf_timer_start.

Mobile::~Mobile void    [virtual]
 

destructor.

Definition at line 578 of file MobileInterface.C.

References mobile_listener_destroy, NULL, ResizeArray< JString * >::num, and wkf_timer_destroy.


Member Function Documentation

int Mobile::act_on_command int   ,
Command  
[virtual]
 

command execute update.

Reimplemented from UIObject.

Definition at line 726 of file MobileInterface.C.

int Mobile::addNewClient JString   nick,
JString   ip,
const int    port,
const bool    active
 

add a new client device connection, user nickname, IP, etc.

Definition at line 1243 of file MobileInterface.C.

References UIObject::active, ResizeArray< bool >::append, ResizeArray< int >::append, ResizeArray< JString * >::append, UIObject::runcommand, and SEND_ADDCLIENT.

int Mobile::check_event void    [virtual]
 

check for and event, queue and return TRUE if one is found.

Reimplemented from UIObject.

Definition at line 734 of file MobileInterface.C.

References Animation::ANIM_FORWARD1, Animation::ANIM_PAUSE, Animation::ANIM_REVERSE1, ANIMATE, VMDApp::animation_set_dir, VMDApp::animation_set_speed, VMDApp::animation_set_stride, UIObject::app, DisplayDevice::AUX, EVENT_COMMAND, EVENT_NON_TOUCH, EVENT_TOUCH_DOWN, EVENT_TOUCH_MOVE, EVENT_TOUCH_SOMEDOWN, EVENT_TOUCH_SOMEUP, EVENT_TOUCH_UP, DisplayDevice::EventCodes, mobile_listener_poll, MOVE, OFF, ROTATE, UIObject::runcommand, SCALEROTZ, VMDApp::scene_rotate_by, VMDApp::scene_scale_by, VMDApp::scene_translate_by, TRANSLATE, VMD_PI, DisplayDevice::WIN_KBD, wkf_timer_start, and wkf_timer_timenow.

int Mobile::get_APIsupported  
 

get the currently supported API level.

Definition at line 1029 of file MobileInterface.C.

References CURRENTAPIVERSION.

Referenced by VMDApp::mobile_get_APIsupported.

void Mobile::get_client_list ResizeArray< JString * > *&    nick,
ResizeArray< JString * > *&    ip,
ResizeArray< bool > *&    active
 

get the current list of connected clients.

Definition at line 1039 of file MobileInterface.C.

Referenced by VMDApp::mobile_get_client_list.

const char * Mobile::get_mode_str MoveMode    mode [static]
 

gets a string representing a mode's name.

Definition at line 1008 of file MobileInterface.C.

References ANIMATE, MOVE, OFF, TRACKER, and USER.

Referenced by text_cmd_mobile.

int Mobile::get_move_mode  
 

get the currently configured mode.

Definition at line 1034 of file MobileInterface.C.

Referenced by VMDApp::mobile_get_mode.

int Mobile::get_port  
 

get the currently configured port number.

Definition at line 1024 of file MobileInterface.C.

Referenced by VMDApp::mobile_get_network_port.

void Mobile::get_tracker_status float &    tx,
float &    ty,
float &    tz,
float &    rx,
float &    ry,
float &    rz,
int &    buttons
 

return the current orientation event data, used by the UIVR MobileTracker interface.

Definition at line 1164 of file MobileInterface.C.

Referenced by VMDApp::mobile_get_tracker_status.

int Mobile::move_mode MoveMode    mm
 

set the Mobile move mode to the given state; return success.

Definition at line 1179 of file MobileInterface.C.

References mobile_listener_create, mobile_listener_destroy, NULL, OFF, removeAllClients, UIObject::runcommand, SEND_SETMODE, and TRACKER.

Referenced by VMDApp::mobile_set_mode, and reset.

int Mobile::network_port int    newport
 

set the incoming UDP port (closing the old one if needed).

Definition at line 1216 of file MobileInterface.C.

References mobile_listener_create, mobile_listener_destroy, NULL, OFF, removeAllClients, and UIObject::runcommand.

Referenced by VMDApp::mobile_network_port.

void Mobile::removeAllClients  
 

disconnect all client devices.

Definition at line 1258 of file MobileInterface.C.

References ResizeArray< JString * >::num, and removeClient.

Referenced by move_mode, and network_port.

int Mobile::removeClient const int    num
 

remove a connected client device.

Definition at line 1266 of file MobileInterface.C.

References ResizeArray< bool >::num, num, ResizeArray< int >::remove, ResizeArray< bool >::remove, ResizeArray< JString * >::remove, UIObject::runcommand, and SEND_REMOVECLIENT.

Referenced by removeAllClients.

void Mobile::reset void    [virtual]
 

reset the user interface (force update of all info displays).

Reimplemented from UIObject.

Definition at line 705 of file MobileInterface.C.

References move_mode, OFF, and set_max_stride.

Referenced by Mobile.

int Mobile::sendMsgToClient const char *    nick,
const char *    ip,
const char *    msgType,
const char *    msg
 

send a message to a single client.

Definition at line 1048 of file MobileInterface.C.

References ResizeArray< JString * >::num.

Referenced by VMDApp::mobile_sendMsg.

int Mobile::set_activeClient const char *    nick,
const char *    ip
 

set the active client, based on their nick and IP.

Definition at line 1120 of file MobileInterface.C.

References ResizeArray< bool >::num, ResizeArray< JString * >::num, ROTATE, and SEND_SETACTIVECLIENT.

Referenced by VMDApp::mobile_set_activeClient.

void Mobile::set_max_stride int    ms [inline]
 

set the maximum animation stride allowed.

Definition at line 175 of file MobileInterface.h.

Referenced by reset.


The documentation for this class was generated from the following files:
Generated on Fri Apr 26 02:45:54 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002