Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

GESTURE Class Reference

#include <gesture.H>

Inheritance diagram for GESTURE:

Inheritance graph
[legend]
Collaboration diagram for GESTURE:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ref_img_t {
  REF_IMG_NONE = 0, REF_IMG_ID = 1, REF_IMG_COLOR = 2, REF_IMG_COLOR_2 = 4,
  REF_IMG_ID_PRE1 = 8, REF_IMG_ID_PRE2 = 16, REF_IMG_ID_PRE3 = 32, REF_IMG_ID_PRE4 = 64,
  REF_IMG_TEX_MEM = 128
}

Public Member Functions

 GESTURE (GEST_INT *gi, int index, mlib::CPIXEL &p, double pressure, GestureDrawer *drawer=0, CEvent &down=Event())
 GESTURE (CGESTURE &gest)
 DEFINE_RTTI_METHODS3 ("GESTURE", GESTURE *, GEL, CDATA_ITEM *)
void init (mlib::CPIXEL &p, CEvent &down, double pressure)
void add (mlib::CPIXEL &p, double min_dist, double pressure)
void complete (mlib::CPIXEL &p, CEvent &up=Event())
void trim ()
GestureDrawerdrawer ()
void set_drawer (GestureDrawer *drawer)
void set_command (CCOMMANDptr &u)
void undo ()
const mlib::PIXEL_listpts () const
 pixel locations:
mlib::PIXEL start () const
 first pixel in the gesture
mlib::PIXEL end () const
 last pixel in the gesture
mlib::PIXEL center () const
 centroid of the gesture computed as the average
mlib::VEXEL endpt_vec () const
 vector from starting point to endpoint
mlib::PIXEL endpt_midpt () const
 mid point of line segment between start and end points in pixel space
double length () const
 length of the gesture along its curve(s)
double endpoint_dist () const
 straight-line pixel distance between start and end points
double dist (CGESTUREptr &g) const
 pixel-space distance between this gesture and the one provided, computed as distance between centers
bool complete () const
void smooth_points ()
 run a single pass of smoothing on the point list:
void smooth_points (int n)
 run n passes of smoothing on the point list:
double spread () const
 max distance to center
void reflect_points (const mlib::PIXELline &l)
 reflect points about a line
void fix_endpoints (mlib::CPIXEL &a, mlib::CPIXEL &b)
mlib::PIXELline endpt_line () const
mlib::PIXEL_list endpt_seg () const
bool self_intersects () const
 does gesture intersect itself?
bool intersects_line (const mlib::PIXELline &l) const
 does gesture intersect the line provided?
bool intersects_seg (const mlib::PIXELline &l) const
 does gesture intersect the line segment provided?
bool below_min_length () const
 is the gesture length less than the minimum gesture length?
bool below_min_spread () const
 is the gesture length below the minimum allowed spread (max distance to center)
CARRAY< double > & timing () const
double start_time () const
 time at which first pixel was drawn
double end_time () const
 time at which last pixel was drawn
double elapsed_time () const
 time that elapsed between first and last pixels drawn
double elapsed_time (int i) const
 time that elapsed between the drawing of the first pixel and pixel whose index is given
double remaining_time (int i) const
 time that elapsed between the drawing of the pixel whose index is given, and the last pixel in the gesture
double elapsed_time (CGESTUREptr &g) const
 time that elapsed between the completion of this gesture and the start of the gesture provided
double between_time (CGESTUREptr &g) const
double age () const
CARRAY< double > & pressures () const
void set_pressure (int i, double p)
double radius () const
 avg distance to center
double speed () const
 length divided by elapsed time
double startup_time (double dist_thresh=Config::get_var_dbl("GEST_STARTUP_DIST_THRESH", 10.0, true)) const
double remaining_time (double dist_thresh=Config::get_var_dbl("GEST_STARTUP_DIST_THRESH", 10.0, true)) const
double straightness () const
 how straight is the gesture? returns 1 for straight and tends to zero as curvature increases
double winding (bool do_trim=1, bool abs=0) const
double winding_abs (bool do_trim=1) const
int index () const
void set_index (int k)
GESTUREptr prev (int k=1) const
bool is_corner (int i) const
int num_corners () const
ARRAY< int > corners () const
virtual bool is_stroke () const
virtual bool is_line (double min_straightness, double min_len) const
virtual bool is_line () const
virtual bool is_tap () const
virtual bool is_double_tap () const
virtual bool is_slash () const
 quick, short, straight stroke
virtual bool is_dslash () const
 delayed slash (starts w/ pause)
virtual bool is_tslash () const
 tap-slash (tap, then slash)
virtual bool is_slash_tap () const
 slash/tap
virtual bool is_dot () const
 small, tight spiral
virtual bool is_scribble () const
 used for crossing out stuff
virtual bool is_zip_zap () const
 forward/back slash
virtual bool is_arc () const
 slightly curving stroke
virtual bool is_small_arc () const
 a small arc (eg under 60 pixels long)
virtual bool is_closed () const
virtual bool is_loop () const
virtual bool is_lasso () const
virtual bool is_circle (double max_ratio=1.25) const
virtual bool is_small_circle (double max_ratio=1.25) const
virtual bool is_ellipse (mlib::PIXEL &center, mlib::VEXEL &axis, double &r1, double &r2, double err_mult=1) const
virtual bool is_almost_ellipse (mlib::PIXEL &center, mlib::VEXEL &axis, double &r1, double &r2) const
virtual bool is_ellipse () const
virtual bool is_n_line () const
virtual bool is_e_line () const
virtual bool is_s_line () const
virtual bool is_w_line () const
virtual bool is_ne_line () const
virtual bool is_se_line () const
virtual bool is_sw_line () const
virtual bool is_nw_line () const
virtual bool is_x () const
virtual bool is_click_hold () const
virtual bool is_press_hold () const
void print_stats () const
void print_types () const
virtual int draw (CVIEWptr &v)
virtual int draw_final (CVIEWptr &v)
virtual bool needs_blend () const
virtual BBOX bbox (int) const
virtual BBOXpix pix_bbox () const
virtual DATA_ITEMdup () const
 DEFINE_RTTI_METHODS3 ("GEL", GEL *, DATA_ITEM, CDATA_ITEM *)
virtual CTAGlist & tags () const
virtual RAYhitintersect (RAYhit &r, mlib::CWtransf &m=mlib::Identity, int uv=0) const
virtual RAYnearnearest (RAYnear &r, mlib::CWtransf &m=mlib::Identity) const
virtual bool inside (mlib::CXYpt_list &) const
virtual bool cull (const VIEW *) const
virtual bool is_3D () const
virtual bool can_do_halo () const
virtual Cstr_ptr & name () const
virtual ostream & print (ostream &s) const
void Own () const
void Free () const
int Lock ()
void Unlock ()
int Unique () const
virtual void add_tags () const
virtual STDdstreamformat (STDdstream &d) const
virtual STDdstreamdecode (STDdstream &d)
virtual void recompute ()
virtual STAT_STR_RET class_name () const =0
virtual int is_of_type (Cstr_ptr &t) const
virtual int draw_id_ref ()
virtual int draw_id_ref_pre1 ()
virtual int draw_id_ref_pre2 ()
virtual int draw_id_ref_pre3 ()
virtual int draw_id_ref_pre4 ()
virtual int draw_color_ref ()
virtual int draw_color_ref_2 ()
virtual int draw_tex_mem_ref ()
virtual ref_img_t use_ref_image ()
virtual int draw_vis_ref ()
virtual int draw_ref_img (ref_img_t t)

Static Public Member Functions

static STAT_STR_RET static_name ()
static STAT_STR_RET static_name ()
static int add_decoder (Cstr_ptr &d, DATA_ITEM *di, int copy=-1)
static void set_default_decoder (DATA_ITEM *(*d)(STDdstream &, Cstr_ptr &, DATA_ITEM *))
static DATA_ITEMDecode (STDdstream &d, int DelayDecoding=0)
static DATA_ITEMlookup (Cstr_ptr &d)
static HASHdi_hash ()

Protected Member Functions

mlib::VEXEL vec (int i) const
mlib::VEXEL vecn (int i) const
double angle (int i) const

Protected Attributes

GEST_INT_gest_int
 owner of this
int _index
 index of this in owner's list
mlib::PIXEL_list _pts
 pixel trail
ARRAY< double > _times
 times for each pixel added
ARRAY< double > _pressures
 pressures recorded for each pixel
int _start_frame
 frame number of down event
double _end_frame
 frame number of up event
Event _down
Event _up
 down and up events
GestureDrawer_drawer
 thing that can draw this
COMMANDptr _cmd
 how to undo previous result of this
BBOX _bbox
BBOXpix _pix_bbox
bool _complete
 if complete() was called...
int _copy
TAGlist _DEFINERtags

Static Protected Attributes

static TAGlist_gel_tags = 0

Detailed Description

*************************************************************** GESTURE

Class that defines a gesture -- a pixel trail drawn by the user, with timing info and ability to "recognize" certain meanings, like a tap, a straight line, a circle, a dot, etc.

Definition at line 36 of file gesture.H.


Member Enumeration Documentation

enum RefImageClient::ref_img_t [inherited]
 

Enumerator:
REF_IMG_NONE 
REF_IMG_ID 
REF_IMG_COLOR 
REF_IMG_COLOR_2 
REF_IMG_ID_PRE1 
REF_IMG_ID_PRE2 
REF_IMG_ID_PRE3 
REF_IMG_ID_PRE4 
REF_IMG_TEX_MEM 

Definition at line 25 of file ref_img_client.H.


Constructor & Destructor Documentation

GESTURE::GESTURE GEST_INT gi,
int  index,
mlib::CPIXEL p,
double  pressure,
GestureDrawer drawer = 0,
CEvent down = Event()
[inline]
 

Definition at line 42 of file gesture.H.

References init().

GESTURE::GESTURE CGESTURE gest  )  [inline]
 

Definition at line 49 of file gesture.H.


Member Function Documentation

void GESTURE::add mlib::CPIXEL p,
double  min_dist,
double  pressure
 

Definition at line 25 of file gesture.C.

References _bbox, _end_frame, _pix_bbox, _pressures, _pts, _times, ARRAY< T >::empty(), ARRAY< T >::last(), VIEW::stamp(), stop_watch::sys_time(), BBOXpix::update(), BBOX::update(), and mlib::Pointlist< L, P, V, S >::update_length().

Referenced by complete(), and init().

int DATA_ITEM::add_decoder Cstr_ptr &  d,
DATA_ITEM di,
int  copy = -1
[static, inherited]
 

Definition at line 41 of file data_item.C.

References DATA_ITEM::_hash, and HASH::add().

Referenced by JOTvar< OBJ, TYPE >::check_inst_name(), FUNC_ITEM::FUNC_ITEM(), hashdist::hashdist(), JOTvar< OBJ, TYPE >::JOTvar(), and DISTRIB::notify_exist().

virtual void DATA_ITEM::add_tags  )  const [inline, virtual, inherited]
 

Definition at line 205 of file data_item.H.

double GESTURE::age  )  const [inline]
 

Definition at line 165 of file gesture.H.

References end_time(), and stop_watch::sys_time().

double GESTURE::angle int  i  )  const [inline, protected]
 

Definition at line 315 of file gesture.H.

References mlib::Acos(), and vecn().

Referenced by is_corner(), trim(), and winding().

virtual BBOX GESTURE::bbox int   )  const [inline, virtual]
 

Reimplemented from GEL.

Definition at line 281 of file gesture.H.

References _bbox.

bool GESTURE::below_min_length  )  const [inline]
 

is the gesture length less than the minimum gesture length?

Definition at line 142 of file gesture.H.

References length(), and MIN_GESTURE_LENGTH.

bool GESTURE::below_min_spread  )  const [inline]
 

is the gesture length below the minimum allowed spread (max distance to center)

Definition at line 144 of file gesture.H.

References length(), and MIN_GESTURE_SPREAD.

double GESTURE::between_time CGESTUREptr g  )  const [inline]
 

Definition at line 162 of file gesture.H.

References start_time().

virtual bool GEL::can_do_halo  )  const [inline, virtual, inherited]
 

Reimplemented in GEOM.

Definition at line 127 of file gel.H.

mlib::PIXEL GESTURE::center  )  const [inline]
 

centroid of the gesture computed as the average

Definition at line 93 of file gesture.H.

References _pts, and mlib::Pointlist< L, P, V, S >::average().

Referenced by dist(), is_circle(), is_dot(), is_ellipse(), is_x(), and radius().

virtual STAT_STR_RET DATA_ITEM::class_name  )  const [pure virtual, inherited]
 

Implemented in hashdist, JOTvar< OBJ, TYPE >, TDI< T >, and FUNC_ITEM.

Referenced by DATA_ITEM::decode(), DATA_ITEM::Decode(), GLSLShader::draw(), DATA_ITEM::format(), GLSLShader::get_uniform_loc(), GLSLShader::init(), DISTRIB::interpret(), BaseJOTappConfig::load(), next_texture(), GEOM::print(), DEFINER::print(), BMESH::print(), print_gel(), Patch::put_textures(), BMESH::read_jot_stream(), GTexture::type(), SolidColorTexture::write_stream(), and GTexture::write_stream().

bool GESTURE::complete  )  const [inline]
 

Definition at line 104 of file gesture.H.

References _complete.

void GESTURE::complete mlib::CPIXEL p,
CEvent up = Event()
 

Definition at line 70 of file gesture.C.

References _complete, _pressures, _pts, _up, add(), Config::get_var_int(), ARRAY< T >::last(), ARRAY< T >::num(), smooth_points(), and trim().

ARRAY< int > GESTURE::corners  )  const
 

Definition at line 315 of file gesture.C.

References _pts, is_corner(), and ARRAY< T >::num().

Referenced by is_zip_zap(), and num_corners().

virtual bool GEL::cull const VIEW  )  const [inline, virtual, inherited]
 

Reimplemented in GELset, and GEOM.

Definition at line 123 of file gel.H.

DATA_ITEM * DATA_ITEM::Decode STDdstream d,
int  DelayDecoding = 0
[static, inherited]
 

Definition at line 57 of file data_item.C.

References DATA_ITEM::_copy, DATA_ITEM::_decode_unknown, DATA_ITEM::class_name(), DATA_ITEM::decode(), DATA_ITEM::dup(), Config::get_var_bool(), and DATA_ITEM::lookup().

Referenced by JOThash::get(), DISTRIB::interpret(), and operator>>().

STDdstream & DATA_ITEM::decode STDdstream d  )  [virtual, inherited]
 

Reimplemented in JOTsend_geom, and BMESH.

Definition at line 145 of file data_item.C.

References DATA_ITEM::class_name(), COMMENT::decode(), j, COMMENT::name(), TAGformat::read_end_id(), TAGformat::read_id(), DATA_ITEM::recompute(), and DATA_ITEM::tags().

Referenced by DATA_ITEM::Decode(), BMESH::decode(), JOTio::get(), BMESH::get_patches(), Patch::get_texture(), VIEW::get_view_animator(), and VIEW::get_view_data_file().

GEL::DEFINE_RTTI_METHODS3 "GEL"  ,
GEL ,
DATA_ITEM  ,
CDATA_ITEM * 
[inherited]
 

GESTURE::DEFINE_RTTI_METHODS3 "GESTURE"  ,
GESTURE ,
GEL  ,
CDATA_ITEM * 
 

static HASH* DATA_ITEM::di_hash  )  [inline, static, inherited]
 

Definition at line 225 of file data_item.H.

References DATA_ITEM::_hash.

double GESTURE::dist CGESTUREptr g  )  const [inline]
 

pixel-space distance between this gesture and the one provided, computed as distance between centers

Definition at line 103 of file gesture.H.

References center(), and mlib::Point2< P, V >::dist().

Referenced by is_dot(), is_double_tap(), is_tslash(), is_zip_zap(), and trim().

int GESTURE::draw CVIEWptr &  v  )  [virtual]
 

Reimplemented from GEL.

Definition at line 1281 of file gesture.C.

virtual int RefImageClient::draw_color_ref  )  [inline, virtual, inherited]
 

Reimplemented in GELset.

Definition at line 55 of file ref_img_client.H.

Referenced by RefImageClient::draw_ref_img(), and RefImageClient::draw_tex_mem_ref().

virtual int RefImageClient::draw_color_ref_2  )  [inline, virtual, inherited]
 

Reimplemented in GELset.

Definition at line 56 of file ref_img_client.H.

Referenced by RefImageClient::draw_ref_img().

int GESTURE::draw_final CVIEWptr &  v  )  [virtual]
 

Reimplemented from RefImageClient.

Definition at line 1287 of file gesture.C.

References _drawer, and GestureDrawer::draw().

virtual int RefImageClient::draw_id_ref  )  [inline, virtual, inherited]
 

Reimplemented in GELset, and OGLTexture.

Definition at line 50 of file ref_img_client.H.

Referenced by RefImageClient::draw_ref_img().

virtual int RefImageClient::draw_id_ref_pre1  )  [inline, virtual, inherited]
 

Reimplemented in GELset.

Definition at line 51 of file ref_img_client.H.

Referenced by RefImageClient::draw_ref_img().

virtual int RefImageClient::draw_id_ref_pre2  )  [inline, virtual, inherited]
 

Reimplemented in GELset.

Definition at line 52 of file ref_img_client.H.

Referenced by RefImageClient::draw_ref_img().

virtual int RefImageClient::draw_id_ref_pre3  )  [inline, virtual, inherited]
 

Reimplemented in GELset.

Definition at line 53 of file ref_img_client.H.

Referenced by RefImageClient::draw_ref_img().

virtual int RefImageClient::draw_id_ref_pre4  )  [inline, virtual, inherited]
 

Reimplemented in GELset.

Definition at line 54 of file ref_img_client.H.

Referenced by RefImageClient::draw_ref_img().

virtual int RefImageClient::draw_ref_img ref_img_t  t  )  [inline, virtual, inherited]
 

Definition at line 82 of file ref_img_client.H.

References brcase, brdefault, RefImageClient::draw_color_ref(), RefImageClient::draw_color_ref_2(), RefImageClient::draw_id_ref(), RefImageClient::draw_id_ref_pre1(), RefImageClient::draw_id_ref_pre2(), RefImageClient::draw_id_ref_pre3(), RefImageClient::draw_id_ref_pre4(), RefImageClient::draw_tex_mem_ref(), RefImageClient::REF_IMG_COLOR, RefImageClient::REF_IMG_COLOR_2, RefImageClient::REF_IMG_ID, RefImageClient::REF_IMG_ID_PRE1, RefImageClient::REF_IMG_ID_PRE2, RefImageClient::REF_IMG_ID_PRE3, RefImageClient::REF_IMG_ID_PRE4, and RefImageClient::REF_IMG_TEX_MEM.

Referenced by Patch::draw_ref_img().

virtual int RefImageClient::draw_tex_mem_ref  )  [inline, virtual, inherited]
 

Reimplemented in DotsShader, DotsShader_EX, GLSLHatching, HalftoneShader, HalftoneShaderEx, and MSLDShader.

Definition at line 57 of file ref_img_client.H.

References RefImageClient::draw_color_ref().

Referenced by RefImageClient::draw_ref_img().

virtual int RefImageClient::draw_vis_ref  )  [inline, virtual, inherited]
 

Reimplemented in GELset, GEOM, LINE3D, OGLTexture, ControlFrameTexture, ControlLineTexture, SilFrameTexture, SilsTexture, WireframeTexture, ZcrossFrameTexture, ZcrossTexture, CAMwidget_anchor, CAMwidget_anchor, BMESH, Patch, BALLwidget_anchor, and GRIDwidget_anchor.

Definition at line 68 of file ref_img_client.H.

Referenced by Patch::draw_vis_ref().

GestureDrawer* GESTURE::drawer  )  [inline]
 

Definition at line 69 of file gesture.H.

References _drawer.

virtual DATA_ITEM* GESTURE::dup  )  const [inline, virtual]
 

Implements GEL.

Definition at line 286 of file gesture.H.

double GESTURE::elapsed_time CGESTUREptr g  )  const [inline]
 

time that elapsed between the completion of this gesture and the start of the gesture provided

Definition at line 159 of file gesture.H.

References end_time().

double GESTURE::elapsed_time int  i  )  const [inline]
 

time that elapsed between the drawing of the first pixel and pixel whose index is given

Definition at line 155 of file gesture.H.

References _times, and start_time().

double GESTURE::elapsed_time  )  const [inline]
 

time that elapsed between first and last pixels drawn

Definition at line 153 of file gesture.H.

References end_time(), and start_time().

Referenced by is_click_hold(), is_double_tap(), is_press_hold(), is_slash_tap(), is_tap(), is_tslash(), remaining_time(), speed(), and startup_time().

mlib::PIXEL GESTURE::end  )  const [inline]
 

last pixel in the gesture

Definition at line 91 of file gesture.H.

References _pts, and ARRAY< T >::last().

Referenced by endpoint_dist(), endpt_line(), endpt_midpt(), endpt_seg(), endpt_vec(), and is_zip_zap().

double GESTURE::end_time  )  const [inline]
 

time at which last pixel was drawn

Definition at line 151 of file gesture.H.

References _times, and ARRAY< T >::last().

Referenced by age(), elapsed_time(), is_x(), and remaining_time().

double GESTURE::endpoint_dist  )  const [inline]
 

straight-line pixel distance between start and end points

Definition at line 101 of file gesture.H.

References mlib::Point2< P, V >::dist(), end(), and start().

Referenced by is_closed(), is_scribble(), and straightness().

mlib::PIXELline GESTURE::endpt_line  )  const [inline]
 

Definition at line 122 of file gesture.H.

References end(), and start().

mlib::PIXEL GESTURE::endpt_midpt  )  const [inline]
 

mid point of line segment between start and end points in pixel space

Definition at line 97 of file gesture.H.

References end(), and start().

mlib::PIXEL_list GESTURE::endpt_seg  )  const [inline]
 

Definition at line 123 of file gesture.H.

References end(), and start().

mlib::VEXEL GESTURE::endpt_vec  )  const [inline]
 

vector from starting point to endpoint

Definition at line 95 of file gesture.H.

References end(), and start().

Referenced by is_e_line(), is_n_line(), is_ne_line(), is_nw_line(), is_s_line(), is_se_line(), is_sw_line(), is_w_line(), and is_x().

void GESTURE::fix_endpoints mlib::CPIXEL a,
mlib::CPIXEL b
[inline]
 

Definition at line 118 of file gesture.H.

References _pts, and mlib::Point2list< L, P, V, S >::fix_endpoints().

STDdstream & DATA_ITEM::format STDdstream d  )  const [virtual, inherited]
 

Reimplemented in Animator, JOTdone, JOTsend_geom, and BMESH.

Definition at line 194 of file data_item.C.

References DATA_ITEM::class_name(), TAGformat::end_id(), Config::get_var_bool(), TAGformat::id(), DATA_ITEM::tags(), and STDdstream::write_newline().

Referenced by JOTdone::format(), BMESH::format(), Animator::format(), JOTio::put(), and VIEW::put_view_data_file().

void REFcounter::Free  )  const [inline, inherited]
 

Definition at line 76 of file ref.H.

References REFcounter::_mutex, REFcounter::_u, and REF_ME.

int GESTURE::index  )  const [inline]
 

Definition at line 196 of file gesture.H.

References _index.

void GESTURE::init mlib::CPIXEL p,
CEvent down,
double  pressure
 

Definition at line 15 of file gesture.C.

References _bbox, _down, _pix_bbox, _start_frame, add(), BBOXpix::set(), BBOX::set(), and VIEW::stamp().

Referenced by GESTURE().

virtual bool GEL::inside mlib::CXYpt_list  )  const [inline, virtual, inherited]
 

Reimplemented in TEXT2D.

Definition at line 120 of file gel.H.

virtual RAYhit& GEL::intersect RAYhit r,
mlib::CWtransf m = mlib::Identity,
int  uv = 0
const [virtual, inherited]
 

Reimplemented in GELset, GEOM, ICON2D, LINE3D, and TEXT2D.

bool GESTURE::intersects_line const mlib::PIXELline l  )  const [inline]
 

does gesture intersect the line provided?

Definition at line 131 of file gesture.H.

References _pts, and mlib::Point2list< L, P, V, S >::intersects_line().

bool GESTURE::intersects_seg const mlib::PIXELline l  )  const [inline]
 

does gesture intersect the line segment provided?

Definition at line 136 of file gesture.H.

References _pts, and mlib::Point2list< L, P, V, S >::intersects_seg().

virtual bool GEL::is_3D  )  const [inline, virtual, inherited]
 

Reimplemented in GEOM.

Definition at line 126 of file gel.H.

virtual bool GESTURE::is_almost_ellipse mlib::PIXEL center,
mlib::VEXEL axis,
double &  r1,
double &  r2
const [inline, virtual]
 

Definition at line 243 of file gesture.H.

References Config::get_var_dbl(), and is_ellipse().

bool GESTURE::is_arc  )  const [virtual]
 

slightly curving stroke

Definition at line 430 of file gesture.C.

References is_stroke(), length(), straightness(), winding(), and winding_abs().

Referenced by is_small_arc().

bool GESTURE::is_circle double  max_ratio = 1.25  )  const [virtual]
 

Definition at line 510 of file gesture.C.

References center(), debug, err_adv(), Config::get_var_bool(), and is_ellipse().

Referenced by print_types().

bool GESTURE::is_click_hold  )  const [virtual]
 

Definition at line 571 of file gesture.C.

References Evd::_d, _down, _up, elapsed_time(), and length().

Referenced by print_types().

bool GESTURE::is_closed  )  const [virtual]
 

Definition at line 331 of file gesture.C.

References endpoint_dist(), is_stroke(), length(), and max().

Referenced by print_types().

bool GESTURE::is_corner int  i  )  const
 

Definition at line 296 of file gesture.C.

References _pts, angle(), Config::get_var_int(), ARRAY< T >::num(), mlib::rad2deg(), and ARRAY< T >::valid_index().

Referenced by corners().

bool GESTURE::is_dot  )  const [virtual]
 

small, tight spiral

Definition at line 455 of file gesture.C.

References _pts, center(), dist(), is_stroke(), length(), ARRAY< T >::num(), straightness(), and winding().

Referenced by print_types().

bool GESTURE::is_double_tap  )  const [virtual]
 

Definition at line 364 of file gesture.C.

References dist(), elapsed_time(), is_tap(), and prev().

Referenced by print_types().

bool GESTURE::is_dslash  )  const [virtual]
 

delayed slash (starts w/ pause)

Definition at line 373 of file gesture.C.

References is_stroke(), length(), remaining_time(), startup_time(), and straightness().

Referenced by print_types().

bool GESTURE::is_e_line  )  const [virtual]
 

Definition at line 627 of file gesture.C.

References endpt_vec(), is_line(), and mlib::Vec2< V >::normalized().

Referenced by print_types().

virtual bool GESTURE::is_ellipse  )  const [inline, virtual]
 

Definition at line 250 of file gesture.H.

References center().

Referenced by is_almost_ellipse(), is_circle(), and print_types().

bool GESTURE::is_ellipse mlib::PIXEL center,
mlib::VEXEL axis,
double &  r1,
double &  r2,
double  err_mult = 1
const [virtual]
 

Definition at line 1011 of file gesture.C.

References _pts, mlib::Pointlist< L, P, V, S >::average(), debug, ellipse_max_err(), err_adv(), Config::get_var_bool(), mlib::Mat4< M, P, V, L, Q >::inverse(), is_loop(), mlib::Vec2< V >::is_null(), j, mlib::Vec2< V >::length(), mlib::Vec2< V >::normalized(), ARRAY< T >::num(), sqr(), swap(), and trim_endpt_overlap().

bool GESTURE::is_lasso  )  const [virtual]
 

Definition at line 497 of file gesture.C.

References is_stroke(), length(), speed(), straightness(), and winding().

Referenced by print_types().

bool GESTURE::is_line  )  const [virtual]
 

Definition at line 592 of file gesture.C.

References Config::get_var_dbl().

Referenced by is_e_line(), is_n_line(), is_ne_line(), is_nw_line(), is_s_line(), is_se_line(), is_sw_line(), is_w_line(), is_x(), and print_types().

bool GESTURE::is_line double  min_straightness,
double  min_len
const [virtual]
 

Definition at line 582 of file gesture.C.

References is_stroke(), length(), and straightness().

bool GESTURE::is_loop  )  const [virtual]
 

Definition at line 485 of file gesture.C.

References is_stroke(), length(), straightness(), and winding().

Referenced by is_ellipse(), and print_types().

bool GESTURE::is_n_line  )  const [virtual]
 

Definition at line 614 of file gesture.C.

References endpt_vec(), is_line(), and mlib::Vec2< V >::normalized().

Referenced by print_types().

bool GESTURE::is_ne_line  )  const [virtual]
 

Definition at line 666 of file gesture.C.

References endpt_vec(), is_line(), and mlib::Vec2< V >::normalized().

Referenced by print_types().

bool GESTURE::is_nw_line  )  const [virtual]
 

Definition at line 705 of file gesture.C.

References endpt_vec(), is_line(), and mlib::Vec2< V >::normalized().

Referenced by print_types().

virtual int DATA_ITEM::is_of_type Cstr_ptr &  t  )  const [inline, virtual, inherited]
 

Definition at line 214 of file data_item.H.

References IS.

Referenced by BMESH::operator=().

bool GESTURE::is_press_hold  )  const [virtual]
 

Definition at line 354 of file gesture.C.

References elapsed_time(), is_stroke(), and length().

Referenced by print_types().

bool GESTURE::is_s_line  )  const [virtual]
 

Definition at line 640 of file gesture.C.

References endpt_vec(), is_line(), and mlib::Vec2< V >::normalized().

Referenced by print_types().

bool GESTURE::is_scribble  )  const [virtual]
 

used for crossing out stuff

Definition at line 472 of file gesture.C.

References endpoint_dist(), is_stroke(), length(), speed(), straightness(), and winding().

Referenced by print_types().

bool GESTURE::is_se_line  )  const [virtual]
 

Definition at line 679 of file gesture.C.

References endpt_vec(), is_line(), and mlib::Vec2< V >::normalized().

Referenced by print_types().

bool GESTURE::is_slash  )  const [virtual]
 

quick, short, straight stroke

Definition at line 602 of file gesture.C.

References is_stroke(), length(), speed(), and straightness().

Referenced by is_tslash(), and print_types().

bool GESTURE::is_slash_tap  )  const [virtual]
 

slash/tap

Definition at line 399 of file gesture.C.

References elapsed_time(), is_tap(), and prev().

bool GESTURE::is_small_arc  )  const [virtual]
 

a small arc (eg under 60 pixels long)

Definition at line 447 of file gesture.C.

References is_arc(), and length().

Referenced by print_types().

bool GESTURE::is_small_circle double  max_ratio = 1.25  )  const [virtual]
 

Definition at line 535 of file gesture.C.

References debug, err_adv(), Config::get_var_bool(), is_stroke(), length(), spread(), straightness(), and winding().

Referenced by print_types().

bool GESTURE::is_stroke  )  const [virtual]
 

Definition at line 325 of file gesture.C.

References Evd::_d, _down, _pts, _up, and ARRAY< T >::num().

Referenced by is_arc(), is_closed(), is_dot(), is_dslash(), is_lasso(), is_line(), is_loop(), is_press_hold(), is_scribble(), is_slash(), is_small_circle(), is_tap(), is_zip_zap(), print_types(), and startup_time().

bool GESTURE::is_sw_line  )  const [virtual]
 

Definition at line 692 of file gesture.C.

References endpt_vec(), is_line(), and mlib::Vec2< V >::normalized().

Referenced by print_types().

bool GESTURE::is_tap  )  const [virtual]
 

Definition at line 344 of file gesture.C.

References elapsed_time(), is_stroke(), and length().

Referenced by is_double_tap(), is_slash_tap(), and print_types().

bool GESTURE::is_tslash  )  const [virtual]
 

tap-slash (tap, then slash)

Definition at line 388 of file gesture.C.

References dist(), elapsed_time(), is_slash(), and prev().

Referenced by print_types().

bool GESTURE::is_w_line  )  const [virtual]
 

Definition at line 653 of file gesture.C.

References endpt_vec(), is_line(), and mlib::Vec2< V >::normalized().

Referenced by print_types().

bool GESTURE::is_x  )  const [virtual]
 

Definition at line 718 of file gesture.C.

References center(), mlib::Point2< P, V >::dist(), end_time(), endpt_vec(), is_line(), length(), max(), and prev().

Referenced by print_types().

bool GESTURE::is_zip_zap  )  const [virtual]
 

forward/back slash

Definition at line 409 of file gesture.C.

References _pts, corners(), dist(), end(), is_stroke(), length(), ARRAY< T >::num(), start(), and straightness().

Referenced by print_types().

double GESTURE::length  )  const [inline]
 

length of the gesture along its curve(s)

Definition at line 99 of file gesture.H.

References _pts, and mlib::Pointlist< L, P, V, S >::length().

Referenced by below_min_length(), below_min_spread(), ellipse_max_err(), is_arc(), is_click_hold(), is_closed(), is_dot(), is_dslash(), is_lasso(), is_line(), is_loop(), is_press_hold(), is_scribble(), is_slash(), is_small_arc(), is_small_circle(), is_tap(), is_x(), is_zip_zap(), print_stats(), speed(), startup_time(), straightness(), and trim().

int REFcounter::Lock  )  [inline, inherited]
 

Definition at line 105 of file ref.H.

References REFcounter::_mutex, and REFcounter::_u.

Referenced by REFlock::REFlock().

static DATA_ITEM* DATA_ITEM::lookup Cstr_ptr &  d  )  [inline, static, inherited]
 

Definition at line 222 of file data_item.H.

References DATA_ITEM::_hash, and HASH::find().

Referenced by DATA_ITEM::Decode(), FUNC_ITEM::FUNC_ITEM(), Patch::get_tex(), and BMESH::read_jot_stream().

virtual Cstr_ptr& GEL::name  )  const [inline, virtual, inherited]
 

Reimplemented in GEOM.

Definition at line 129 of file gel.H.

References GEL::_name.

Referenced by operator<<().

virtual RAYnear& GEL::nearest RAYnear r,
mlib::CWtransf m = mlib::Identity
const [virtual, inherited]
 

Reimplemented in GEOM.

virtual bool GESTURE::needs_blend  )  const [inline, virtual]
 

Reimplemented from GEL.

Definition at line 279 of file gesture.H.

int GESTURE::num_corners  )  const [inline]
 

Definition at line 206 of file gesture.H.

References corners(), and ARRAY< T >::num().

void REFcounter::Own  )  const [inline, inherited]
 

Definition at line 59 of file ref.H.

References REFcounter::_mutex, REFcounter::_u, and REF_ME.

virtual BBOXpix GESTURE::pix_bbox  )  const [inline, virtual]
 

Definition at line 282 of file gesture.H.

References _pix_bbox.

CARRAY<double>& GESTURE::pressures  )  const [inline]
 

Definition at line 168 of file gesture.H.

References _pressures.

Referenced by GestureDrawer::draw().

GESTUREptr GESTURE::prev int  k = 1  )  const
 

Definition at line 158 of file gesture.C.

References _gest_int, _index, and GEST_INT::gesture().

Referenced by is_double_tap(), is_slash_tap(), is_tslash(), and is_x().

virtual ostream& GEL::print ostream &  s  )  const [inline, virtual, inherited]
 

Reimplemented in GEOM.

Definition at line 131 of file gel.H.

Referenced by operator<<().

void GESTURE::print_stats  )  const
 

Definition at line 1225 of file gesture.C.

References err_msg(), length(), speed(), straightness(), winding(), and winding_abs().

void GESTURE::print_types  )  const
 

Definition at line 1243 of file gesture.C.

References is_circle(), is_click_hold(), is_closed(), is_dot(), is_double_tap(), is_dslash(), is_e_line(), is_ellipse(), is_lasso(), is_line(), is_loop(), is_n_line(), is_ne_line(), is_nw_line(), is_press_hold(), is_s_line(), is_scribble(), is_se_line(), is_slash(), is_small_arc(), is_small_circle(), is_stroke(), is_sw_line(), is_tap(), is_tslash(), is_w_line(), is_x(), and is_zip_zap().

const mlib::PIXEL_list& GESTURE::pts  )  const [inline]
 

pixel locations:

Definition at line 87 of file gesture.H.

References _pts.

Referenced by GestureBoxDrawer::draw(), and GestureDrawer::draw().

double GESTURE::radius  )  const
 

avg distance to center

Definition at line 206 of file gesture.C.

References _pts, center(), mlib::Pointlist< L, P, V, S >::dist(), ARRAY< T >::empty(), and ARRAY< T >::num().

virtual void DATA_ITEM::recompute  )  [inline, virtual, inherited]
 

Reimplemented in Patch.

Definition at line 208 of file data_item.H.

Referenced by DATA_ITEM::decode().

void GESTURE::reflect_points const mlib::PIXELline l  ) 
 

reflect points about a line

Definition at line 60 of file gesture.C.

References _pts, ARRAY< T >::num(), and mlib::Line< L, P, V >::reflection().

double GESTURE::remaining_time double  dist_thresh = Config::get_var_dbl("GEST_STARTUP_DIST_THRESH",10.0,true)  )  const [inline]
 

Definition at line 181 of file gesture.H.

References elapsed_time(), and startup_time().

double GESTURE::remaining_time int  i  )  const [inline]
 

time that elapsed between the drawing of the pixel whose index is given, and the last pixel in the gesture

Definition at line 157 of file gesture.H.

References _times, and end_time().

Referenced by is_dslash().

bool GESTURE::self_intersects  )  const [inline]
 

does gesture intersect itself?

Definition at line 128 of file gesture.H.

References _pts, and mlib::Pointlist< L, P, V, S >::self_intersects().

void GESTURE::set_command CCOMMANDptr u  )  [inline]
 

Definition at line 78 of file gesture.H.

References _cmd.

static void DATA_ITEM::set_default_decoder DATA_ITEM *(*)(STDdstream &, Cstr_ptr &, DATA_ITEM *)  d  )  [inline, static, inherited]
 

Definition at line 218 of file data_item.H.

References DATA_ITEM::_decode_unknown.

void GESTURE::set_drawer GestureDrawer drawer  )  [inline]
 

Definition at line 70 of file gesture.H.

References _drawer.

void GESTURE::set_index int  k  )  [inline]
 

Definition at line 197 of file gesture.H.

References _index.

void GESTURE::set_pressure int  i,
double  p
[inline]
 

Definition at line 169 of file gesture.H.

References _pressures, and ARRAY< T >::num().

void GESTURE::smooth_points int  n  ) 
 

run n passes of smoothing on the point list:

Definition at line 53 of file gesture.C.

References smooth_points().

void GESTURE::smooth_points  ) 
 

run a single pass of smoothing on the point list:

Definition at line 42 of file gesture.C.

References _pts, and ARRAY< T >::num().

Referenced by complete(), and smooth_points().

double GESTURE::speed  )  const
 

length divided by elapsed time

Definition at line 167 of file gesture.C.

References elapsed_time(), and length().

Referenced by ellipse_max_err(), is_lasso(), is_scribble(), is_slash(), and print_stats().

double GESTURE::spread  )  const [inline]
 

max distance to center

Definition at line 113 of file gesture.H.

References _pts, and mlib::Pointlist< L, P, V, S >::spread().

Referenced by is_small_circle(), and trim().

mlib::PIXEL GESTURE::start  )  const [inline]
 

first pixel in the gesture

Definition at line 89 of file gesture.H.

References _pts.

Referenced by endpoint_dist(), endpt_line(), endpt_midpt(), endpt_seg(), endpt_vec(), and is_zip_zap().

double GESTURE::start_time  )  const [inline]
 

time at which first pixel was drawn

Definition at line 149 of file gesture.H.

References _times.

Referenced by between_time(), and elapsed_time().

double GESTURE::startup_time double  dist_thresh = Config::get_var_dbl("GEST_STARTUP_DIST_THRESH", 10.0, true)  )  const
 

Time spent within the given threshold distance of the 1st point. Used to measure a gesture that begins w/ a pause.

Definition at line 176 of file gesture.C.

References _pts, _times, elapsed_time(), err_msg(), mlib::Pointlist< L, P, V, S >::interpolate(), is_stroke(), length(), and ARRAY< T >::valid_index().

Referenced by is_dslash(), and remaining_time().

static STAT_STR_RET RefImageClient::static_name  )  [inline, static, inherited]
 

Definition at line 44 of file ref_img_client.H.

References RET_STAT_STR.

Referenced by BMESH::operator=().

STAT_STR_RET DATA_ITEM::static_name  )  [static, inherited]
 

Definition at line 31 of file data_item.C.

References RET_STAT_STR.

Referenced by BALLwidget_anchor::BALLwidget_anchor(), CAMwidget_anchor::CAMwidget_anchor(), Patch::cur_tex(), OGLTexture::draw_id_ref(), OGLTexture::draw_id_triangles(), OGLTexture::draw_vis_ref(), VIEW::get_view_animator(), GRIDwidget_anchor::GRIDwidget_anchor(), and toggle_sil_frame().

double GESTURE::straightness  )  const [inline]
 

how straight is the gesture? returns 1 for straight and tends to zero as curvature increases

Definition at line 190 of file gesture.H.

References endpoint_dist(), and length().

Referenced by is_arc(), is_dot(), is_dslash(), is_lasso(), is_line(), is_loop(), is_scribble(), is_slash(), is_small_circle(), is_zip_zap(), and print_stats().

virtual CTAGlist& GEL::tags  )  const [inline, virtual, inherited]
 

Reimplemented from DATA_ITEM.

Reimplemented in GEOM.

Definition at line 113 of file gel.H.

References GEL::_gel_tags.

Referenced by GEOM::tags().

CARRAY<double>& GESTURE::timing  )  const [inline]
 

Definition at line 147 of file gesture.H.

References _times.

void GESTURE::trim  ) 
 

Definition at line 100 of file gesture.C.

References _pressures, _pts, _times, angle(), clip_tip(), debug, mlib::deg2rad(), dist(), err_adv(), Config::get_var_bool(), Config::get_var_dbl(), length(), ARRAY< T >::num(), spread(), and ARRAY< T >::truncate().

Referenced by complete(), and winding().

void GESTURE::undo  )  [inline]
 

Definition at line 79 of file gesture.H.

References _cmd.

int REFcounter::Unique  )  const [inline, inherited]
 

Definition at line 115 of file ref.H.

References REFcounter::_mutex, and REFcounter::_u.

void REFcounter::Unlock  )  [inline, inherited]
 

Definition at line 111 of file ref.H.

References REFcounter::_mutex, and REFcounter::_u.

Referenced by REFlock::~REFlock().

virtual ref_img_t RefImageClient::use_ref_image  )  [inline, virtual, inherited]
 

Reimplemented in GEOM, DotsShader, DotsShader_EX, GLSLHatching, HalftoneShader, HalftoneShaderEx, MSLDShader, BMESH, and Patch.

Definition at line 60 of file ref_img_client.H.

References RefImageClient::REF_IMG_NONE.

Referenced by OGLTexture::draw_id_ref(), and Patch::use_ref_image().

mlib::VEXEL GESTURE::vec int  i  )  const [inline, protected]
 

Definition at line 313 of file gesture.H.

References _pts.

Referenced by vecn().

mlib::VEXEL GESTURE::vecn int  i  )  const [inline, protected]
 

Definition at line 314 of file gesture.H.

References mlib::Vec2< V >::normalized(), and vec().

Referenced by angle().

double GESTURE::winding bool  do_trim = 1,
bool  abs = 0
const
 

Definition at line 247 of file gesture.C.

References _pts, angle(), debug, err_adv(), Config::get_var_bool(), mlib::Pointlist< L, P, V, S >::interpolate_length(), mlib::Pointlist< L, P, V, S >::length(), max(), min(), ARRAY< T >::num(), and trim().

Referenced by is_arc(), is_dot(), is_lasso(), is_loop(), is_scribble(), is_small_circle(), print_stats(), and winding_abs().

double GESTURE::winding_abs bool  do_trim = 1  )  const [inline]
 

Definition at line 194 of file gesture.H.

References winding().

Referenced by is_arc(), and print_stats().


Member Data Documentation

BBOX GESTURE::_bbox [protected]
 

Definition at line 306 of file gesture.H.

Referenced by add(), bbox(), and init().

COMMANDptr GESTURE::_cmd [protected]
 

how to undo previous result of this

Definition at line 305 of file gesture.H.

Referenced by set_command(), and undo().

bool GESTURE::_complete [protected]
 

if complete() was called...

Definition at line 308 of file gesture.H.

Referenced by complete().

int DATA_ITEM::_copy [protected, inherited]
 

Definition at line 197 of file data_item.H.

Referenced by DATA_ITEM::Decode().

TAGlist DATA_ITEM::_DEFINERtags [protected, inherited]
 

Definition at line 198 of file data_item.H.

Referenced by DATA_ITEM::tags().

Event GESTURE::_down [protected]
 

Definition at line 303 of file gesture.H.

Referenced by init(), is_click_hold(), and is_stroke().

GestureDrawer* GESTURE::_drawer [protected]
 

thing that can draw this

Definition at line 304 of file gesture.H.

Referenced by draw_final(), drawer(), and set_drawer().

double GESTURE::_end_frame [protected]
 

frame number of up event

Definition at line 302 of file gesture.H.

Referenced by add().

TAGlist * GEL::_gel_tags = 0 [static, protected, inherited]
 

Definition at line 138 of file gel.H.

Referenced by GEL::tags().

GEST_INT* GESTURE::_gest_int [protected]
 

owner of this

Definition at line 296 of file gesture.H.

Referenced by prev().

int GESTURE::_index [protected]
 

index of this in owner's list

Definition at line 297 of file gesture.H.

Referenced by index(), prev(), and set_index().

BBOXpix GESTURE::_pix_bbox [protected]
 

Definition at line 307 of file gesture.H.

Referenced by add(), init(), and pix_bbox().

ARRAY<double> GESTURE::_pressures [protected]
 

pressures recorded for each pixel

Definition at line 300 of file gesture.H.

Referenced by add(), complete(), pressures(), set_pressure(), and trim().

mlib::PIXEL_list GESTURE::_pts [protected]
 

pixel trail

Definition at line 298 of file gesture.H.

Referenced by add(), center(), complete(), corners(), end(), fix_endpoints(), intersects_line(), intersects_seg(), is_corner(), is_dot(), is_ellipse(), is_stroke(), is_zip_zap(), length(), pts(), radius(), reflect_points(), self_intersects(), smooth_points(), spread(), start(), startup_time(), trim(), vec(), and winding().

int GESTURE::_start_frame [protected]
 

frame number of down event

Definition at line 301 of file gesture.H.

Referenced by init().

ARRAY<double> GESTURE::_times [protected]
 

times for each pixel added

Definition at line 299 of file gesture.H.

Referenced by add(), elapsed_time(), end_time(), remaining_time(), start_time(), startup_time(), timing(), and trim().

Event GESTURE::_up [protected]
 

down and up events

Definition at line 303 of file gesture.H.

Referenced by complete(), is_click_hold(), and is_stroke().


The documentation for this class was generated from the following files:
Generated on Mon Sep 18 11:45:34 2006 for jot by  doxygen 1.4.4