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

smview.C File Reference

#include "std/fstream.H"
#include "disp/animator.H"
#include "disp/recorder.H"
#include "geom/gl_util.H"
#include "geom/distrib.H"
#include "geom/recorder_ui.H"
#include "geom/texture.H"
#include "geom/world.H"
#include "gtex/ref_image.H"
#include "gtex/buffer_ref_image.H"
#include "gtex/curvature_ui.H"
#include "gtex/fader_texture.H"
#include "gtex/flat_shade.H"
#include "gtex/key_line.H"
#include "gtex/sil_frame.H"
#include "manip/cam_pz.H"
#include "manip/cam_fp.H"
#include "mesh/hybrid.H"
#include "mesh/lmesh.H"
#include "mesh/objreader.H"
#include "mesh/patch.H"
#include "mlib/points.H"
#include "std/run_avg.H"
#include "std/stop_watch.H"
#include "std/support.H"
#include "std/time.H"
#include "widgets/alert_box.H"
#include "widgets/file_select.H"
#include "widgets/fps.H"
#include "widgets/menu.H"
#include "base_jotapp/base_jotapp.H"

Include dependency graph for smview.C:

Go to the source code of this file.

Classes

class  SMVIEWapp
class  SMVIEWapp::WINDOWjot
class  BadEdgeFilter

Enumerations

enum  alert_cb_t { ALERT_CLEAR_CB = 0, ALERT_SAVE_JOT_OVERWRITE_CB, ALERT_SAVE_JOT_FAILED_CB, ALERT_LOAD_JOT_FAILED_CB }
enum  file_cb_t { FILE_SAVE_JOT_CB = 0, FILE_LOAD_JOT_CB }

Functions

int bk_camera (const Event &ev, State *&s)
int fwd_camera (const Event &ev, State *&s)
int next_texture (const Event &, State *&)
int rotate_camera (const Event &ev, State *&)
int toggle_buffer (const Event &, State *&)
int toggle_antialias (const Event &, State *&)
int next_antialias (const Event &, State *&)
int freeze_sils (const Event &, State *&)
int toggle_random_sils (const Event &, State *&)
int toggle_hidden_lines (const Event &, State *&)
int debug_cb (const Event &ev, State *&)
int clear_cb (const Event &, State *&)
void alert_cbs (void *ptr, void *dptr, int idx, int but_idx)
void do_clear ()
int save_cb (const Event &, State *&)
int load_cb (const Event &, State *&)
void file_cbs (void *ptr, int idx, int action, str_ptr path, str_ptr file)
void do_save (str_ptr fullpath)
void do_load (str_ptr fullpath)
int animation_keys (const Event &e, State *&s)
int render_mode (const Event &e, State *&s)
int toggle_recorder (const Event &, State *&)
int rec_play (const Event &, State *&)
int rec_rec (const Event &, State *&)
int rec_stop (const Event &, State *&)
int rec_pause (const Event &, State *&)
int toggle_repair (const Event &, State *&)
int undo_redo (const Event &e, State *&)
int quit (const Event &, State *&)
int refine (const Event &, State *&)
int cycle_subdiv_loc_calc (const Event &, State *&)
int clear_selections (const Event &, State *&)
int unrefine (const Event &, State *&)
int toggle_transp (const Event &e, State *&)
int write (const Event &, State *&)
int print_mesh (const Event &, State *&)
int write_xformed (const Event &, State *&)
int write_merged_meshes (const Event &, State *&)
int save_config (const Event &e, State *&)
int clear_creases (const Event &, State *&)
int toggle_no_text (const Event &, State *&)
int toggle_show_secondary_faces (const Event &, State *&)
int recreate_creases (const Event &, State *&)
int toggle_crease (const Event &, State *&)
int split_mesh (const Event &e, State *&)
int kill_component (const Event &, State *&)
int print_key_menu (const Event &, State *&)
int toggle_curvature_ui (const Event &, State *&)
int main (int argc, char **argv)
BMESHfind_mesh ()
BMESHfind_ctrl_mesh ()
bool is_sec (Bface *f)
Wpt map_centroid (CBface *f, CWpt &eye, CWvec &t)
double get_area (CBface *f)
double normalized_pix_area (CBface *f, CWpt &eye, CWvec &t, CWvec &x, CWvec &y)
double avg_bface_pix_area (BMESH *mesh)
bool print_edge_info (CBedge_list &edges)
void debug_vis_ref_img (CNDCpt &p)
int set_pen (const Event &ev, State *&)
BMESHptr control_mesh (CBMESHptr &m)
int toggle_sil_frame (const Event &, State *&)

Variables

bool draw_skin_only


Enumeration Type Documentation

enum alert_cb_t
 

Enumerator:
ALERT_CLEAR_CB 
ALERT_SAVE_JOT_OVERWRITE_CB 
ALERT_SAVE_JOT_FAILED_CB 
ALERT_LOAD_JOT_FAILED_CB 

Definition at line 308 of file smview.C.

enum file_cb_t
 

Enumerator:
FILE_SAVE_JOT_CB 
FILE_LOAD_JOT_CB 

Definition at line 315 of file smview.C.


Function Documentation

void alert_cbs void *  ptr,
void *  dptr,
int  idx,
int  but_idx
 

Definition at line 677 of file smview.C.

References ALERT_CLEAR_CB, ALERT_LOAD_JOT_FAILED_CB, ALERT_SAVE_JOT_FAILED_CB, ALERT_SAVE_JOT_OVERWRITE_CB, do_clear(), do_save(), and save_cb().

Referenced by clear_cb(), do_load(), do_save(), and file_cbs().

int animation_keys const Event e,
State *&  s
 

Definition at line 979 of file smview.C.

References Evd::_c, VIEW::peek(), rec_pause(), rec_play(), rec_rec(), rec_stop(), and toggle_recorder().

Referenced by SMVIEWapp::init_kbd().

double avg_bface_pix_area BMESH mesh  )  [inline]
 

Definition at line 580 of file smview.C.

References RunningAvg< T >::add(), BMESH::bf(), nfaces, normalized_pix_area(), VIEW::peek_cam(), and RunningAvg< T >::val().

int bk_camera const Event ev,
State *&  s
 

Definition at line 340 of file smview.C.

References Event::view().

int clear_cb const Event ,
State *& 
 

Definition at line 655 of file smview.C.

References AlertBox::add_button(), AlertBox::add_text(), alert_cbs(), ALERT_CLEAR_CB, AlertBox::display(), AlertBox::EXCLAMATION_ICON, VIEW::peek(), AlertBox::set_default(), AlertBox::set_icon(), and AlertBox::set_title().

Referenced by SMVIEWapp::init_kbd().

int clear_creases const Event ,
State *& 
 

Definition at line 1396 of file smview.C.

References BMESH::clear_creases(), and find_ctrl_mesh().

Referenced by SMVIEWapp::init_kbd().

int clear_selections const Event ,
State *& 
 

Definition at line 1255 of file smview.C.

References MeshGlobal::deselect_all_edges(), and MeshGlobal::deselect_all_faces().

BMESHptr control_mesh CBMESHptr m  )  [inline]
 

Definition at line 1276 of file smview.C.

int cycle_subdiv_loc_calc const Event ,
State *& 
 

Definition at line 1232 of file smview.C.

References find_ctrl_mesh(), SubdivCalc< T >::name(), LMESH::set_subdiv_loc_calc(), and LMESH::update().

Referenced by SMVIEWapp::init_kbd().

int debug_cb const Event ev,
State *& 
 

Definition at line 637 of file smview.C.

References Evd::_c, FlatShadeTexture::debug_uv(), and FlatShadeTexture::toggle_debug_uv().

Referenced by SMVIEWapp::init_kbd().

void debug_vis_ref_img CNDCpt p  )  [inline]
 

Definition at line 617 of file smview.C.

References RefImage::alpha(), RefImage::blue(), RefImage::green(), VisRefImage::lookup(), VisRefImage::need_update(), RefImage::red(), and Array2d< T >::val().

void do_clear  ) 
 

Definition at line 724 of file smview.C.

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

Referenced by alert_cbs(), and do_load().

void do_load str_ptr  fullpath  ) 
 

Definition at line 908 of file smview.C.

References AlertBox::add_button(), AlertBox::add_text(), alert_cbs(), ALERT_LOAD_JOT_FAILED_CB, NetStream::ascii_r, WINSYS::CURSOR_WAIT, AlertBox::display(), do_clear(), AlertBox::INFO_ICON, LOADobs::LOAD_ERROR_AUX, LOADobs::LOAD_ERROR_CWD, LOADobs::LOAD_ERROR_JOT, LOADobs::LOAD_ERROR_NONE, LOADobs::LOAD_ERROR_READ, LOADobs::LOAD_ERROR_STREAM, LOADobs::notify_load_obs(), VIEW::peek(), AlertBox::set_default(), AlertBox::set_icon(), AlertBox::set_title(), and AlertBox::WARNING_ICON.

Referenced by file_cbs().

void do_save str_ptr  fullpath  ) 
 

Definition at line 850 of file smview.C.

References AlertBox::add_button(), AlertBox::add_text(), alert_cbs(), ALERT_SAVE_JOT_FAILED_CB, NetStream::ascii_w, WINSYS::CURSOR_WAIT, AlertBox::display(), SAVEobs::notify_save_obs(), VIEW::peek(), SAVEobs::SAVE_ERROR_CWD, SAVEobs::SAVE_ERROR_NONE, SAVEobs::SAVE_ERROR_STREAM, SAVEobs::SAVE_ERROR_WRITE, AlertBox::set_default(), AlertBox::set_icon(), AlertBox::set_title(), and AlertBox::WARNING_ICON.

Referenced by alert_cbs(), and file_cbs().

void file_cbs void *  ptr,
int  idx,
int  action,
str_ptr  path,
str_ptr  file
 

Definition at line 794 of file smview.C.

References AlertBox::add_button(), AlertBox::add_text(), alert_cbs(), ALERT_SAVE_JOT_OVERWRITE_CB, AlertBox::display(), do_load(), do_save(), AlertBox::EXCLAMATION_ICON, FILE_LOAD_JOT_CB, FILE_SAVE_JOT_CB, int(), str_ptr::len(), FileSelect::OK_ACTION, VIEW::peek(), AlertBox::set_default(), AlertBox::set_icon(), and AlertBox::set_title().

Referenced by load_cb(), and save_cb().

BMESH* find_ctrl_mesh  )  [inline]
 

Definition at line 334 of file smview.C.

References find_mesh(), and get_ctrl_mesh().

Referenced by clear_creases(), cycle_subdiv_loc_calc(), recreate_creases(), refine(), toggle_sil_frame(), and unrefine().

BMESH* find_mesh  )  [inline]
 

Definition at line 327 of file smview.C.

References BMESH::center_of_interest(), and VisRefImage::get_mesh().

Referenced by find_ctrl_mesh(), print_mesh(), write(), and write_xformed().

int freeze_sils const Event ,
State *& 
 

Definition at line 483 of file smview.C.

References BMESH::_freeze_sils.

Referenced by SMVIEWapp::init_kbd().

int fwd_camera const Event ev,
State *&  s
 

Definition at line 347 of file smview.C.

References Event::view().

double get_area CBface f  )  [inline]
 

Definition at line 546 of file smview.C.

References Bface::area(), Bface::is_quad(), and Bface::quad_area().

Referenced by normalized_pix_area().

bool is_sec Bface f  )  [inline]
 

Definition at line 511 of file smview.C.

References Bface::is_secondary().

Referenced by BadEdgeFilter::accept().

int kill_component const Event ,
State *& 
 

int load_cb const Event ,
State *& 
 

Definition at line 772 of file smview.C.

References FileSelect::display(), file_cbs(), FILE_LOAD_JOT_CB, FileSelect::LOAD_ICON, VIEW::peek(), FileSelect::set_action(), FileSelect::set_file(), FileSelect::set_filter(), FileSelect::set_icon(), FileSelect::set_path(), and FileSelect::set_title().

Referenced by SMVIEWapp::init_kbd().

int main int  argc,
char **  argv
 

Definition at line 292 of file smview.C.

References SMVIEWapp::init(), and BaseJOTapp::Run().

Wpt map_centroid CBface f,
CWpt eye,
CWvec t
[inline]
 

Definition at line 534 of file smview.C.

References Bface::centroid(), mlib::Point3< P, V >::dist(), Bface::is_quad(), and Bface::quad_centroid().

Referenced by normalized_pix_area().

int next_antialias const Event ,
State *& 
 

Definition at line 461 of file smview.C.

References VIEW::get_jitter_mode_num(), VIEW::get_jitter_num(), and VIEW::peek().

Referenced by SMVIEWapp::init_kbd().

int next_texture const Event ,
State *& 
 

Definition at line 354 of file smview.C.

References DATA_ITEM::class_name(), Patch::cur_tex(), VisRefImage::get_ctrl_patch(), and Patch::next_texture().

Referenced by SMVIEWapp::init_kbd().

double normalized_pix_area CBface f,
CWpt eye,
CWvec t,
CWvec x,
CWvec y
[inline]
 

Definition at line 552 of file smview.C.

References get_area(), map_centroid(), and Bsimplex::mesh().

Referenced by avg_bface_pix_area().

bool print_edge_info CBedge_list edges  )  [inline]
 

Definition at line 599 of file smview.C.

References err_msg(), ARRAY< T >::num(), and GtexUtil::show().

int print_key_menu const Event ,
State *& 
 

int print_mesh const Event ,
State *& 
 

Definition at line 1338 of file smview.C.

References find_mesh(), and BMESH::print().

Referenced by SMVIEWapp::init_kbd().

int quit const Event ,
State *& 
 

Definition at line 1199 of file smview.C.

References err_msg(), Config::get_var_bool(), and STR::load_factor().

Referenced by REF_CLASS().

int rec_pause const Event ,
State *& 
 

Definition at line 1150 of file smview.C.

References VIEW::peek(), and Recorder::rec_pause().

Referenced by animation_keys().

int rec_play const Event ,
State *& 
 

Definition at line 1120 of file smview.C.

References VIEW::peek(), and Recorder::rec_play().

Referenced by animation_keys().

int rec_rec const Event ,
State *& 
 

Definition at line 1130 of file smview.C.

References VIEW::peek(), and Recorder::rec_record().

Referenced by animation_keys().

int rec_stop const Event ,
State *& 
 

Definition at line 1140 of file smview.C.

References VIEW::peek(), and Recorder::rec_stop().

Referenced by animation_keys().

int recreate_creases const Event ,
State *& 
 

Definition at line 1425 of file smview.C.

References BMESH::be(), BMESH::changed(), Bedge::compute_crease(), find_ctrl_mesh(), and BMESH::nedges().

Referenced by SMVIEWapp::init_kbd().

int refine const Event ,
State *& 
 

Definition at line 1210 of file smview.C.

References find_ctrl_mesh(), Config::get_var_bool(), LMESH::loc_calc(), SubdivCalc< T >::name(), LMESH::refine(), and LMESH::volume().

Referenced by SMVIEWapp::init_kbd().

int render_mode const Event e,
State *&  s
 

Definition at line 1076 of file smview.C.

References Evd::_c, VIEW::NORMAL_MODE, VIEW::OPAQUE_MODE, VIEW::peek(), and VIEW::TRANSPARENT_MODE.

Referenced by SMVIEWapp::init_kbd().

int rotate_camera const Event ev,
State *& 
 

Definition at line 368 of file smview.C.

References mlib::Acos(), Sign(), sqr(), and Event::view().

Referenced by SMVIEWapp::init_kbd().

int save_cb const Event ,
State *& 
 

Definition at line 746 of file smview.C.

References IOManager::basename(), FileSelect::display(), file_cbs(), FILE_SAVE_JOT_CB, NULL_STR, VIEW::peek(), FileSelect::SAVE_ICON, FileSelect::set_action(), FileSelect::set_file(), FileSelect::set_filter(), FileSelect::set_icon(), FileSelect::set_path(), and FileSelect::set_title().

Referenced by alert_cbs(), and SMVIEWapp::init_kbd().

int save_config const Event e,
State *& 
 

Definition at line 1374 of file smview.C.

References Config::JOT_ROOT(), and Config::save_config().

int set_pen const Event ev,
State *& 
 

Definition at line 1160 of file smview.C.

References Evd::_c, BaseJOTapp::instance(), BaseJOTapp::next_pen(), VIEW::peek(), and BaseJOTapp::prev_pen().

int split_mesh const Event e,
State *& 
 

int toggle_antialias const Event ,
State *& 
 

Definition at line 439 of file smview.C.

References VIEW::get_jitter_num(), and VIEW::peek().

Referenced by SMVIEWapp::init_kbd().

int toggle_buffer const Event ,
State *& 
 

Definition at line 418 of file smview.C.

References BufferRefImage::is_observing(), BufferRefImage::lookup(), BufferRefImage::observe(), BufferRefImage::unobserve(), and Event::view().

Referenced by SMVIEWapp::init_kbd().

int toggle_crease const Event ,
State *& 
 

Definition at line 1440 of file smview.C.

References BMESH::changed(), VisRefImage::get_cursor(), IDRefImage::intersect(), Bedge::is_crease(), VisRefImage::lookup(), Bsimplex::mesh(), Bface::opposite_edge(), VIEW::peek(), Bface::project_barycentric(), Bedge::set_crease(), VisRefImage::update(), and Bface::v().

int toggle_curvature_ui const Event ,
State *& 
 

Definition at line 1465 of file smview.C.

References CurvatureUISingleton::hide(), CurvatureUISingleton::Instance(), CurvatureUISingleton::is_vis(), VIEW::peek(), and CurvatureUISingleton::show().

Referenced by SMVIEWapp::init_kbd().

int toggle_hidden_lines const Event ,
State *& 
 

Definition at line 502 of file smview.C.

References KeyLineTexture::toggle_show_hidden_lines().

Referenced by SMVIEWapp::init_kbd().

int toggle_no_text const Event ,
State *& 
 

Definition at line 1410 of file smview.C.

References TEXT2D::toggle_suppress_draw().

Referenced by SMVIEWapp::init_kbd().

int toggle_random_sils const Event ,
State *& 
 

Definition at line 491 of file smview.C.

References BMESH::_random_sils, and BMESH::toggle_random_sils().

Referenced by SMVIEWapp::init_kbd().

int toggle_recorder const Event ,
State *& 
 

Definition at line 1101 of file smview.C.

References Recorder::activate(), Recorder::deactivate(), Recorder::get_ui(), Recorder::on(), VIEW::peek(), and Recorder::set_ui().

Referenced by animation_keys().

int toggle_repair const Event ,
State *& 
 

int toggle_show_secondary_faces const Event ,
State *& 
 

int toggle_sil_frame const Event ,
State *& 
 

Definition at line 1284 of file smview.C.

References find_ctrl_mesh(), DATA_ITEM::static_name(), and BMESH::toggle_render_style().

int toggle_transp const Event e,
State *& 
 

Definition at line 1297 of file smview.C.

References RAYhit::appear(), VisRefImage::get_cursor(), APPEAR::has_transp(), APPEAR::set_transp(), RAYhit::success(), APPEAR::unset_transp(), and Event::view().

int undo_redo const Event e,
State *& 
 

Definition at line 1178 of file smview.C.

References Evd::_c, and err_msg().

Referenced by SMVIEWapp::init_kbd().

int unrefine const Event ,
State *& 
 

Definition at line 1264 of file smview.C.

References find_ctrl_mesh().

Referenced by SMVIEWapp::init_kbd().

int write const Event ,
State *& 
 

Definition at line 1315 of file smview.C.

References find_mesh(), BMESH::print(), and BMESH::write_file().

Referenced by SMVIEWapp::init_kbd(), and NetStream::NetStream().

int write_merged_meshes const Event ,
State *& 
 

int write_xformed const Event ,
State *& 
 

Definition at line 1347 of file smview.C.

References find_mesh(), BMESH::inv_xform(), MOD::tick(), BMESH::transform(), BMESH::write_file(), and BMESH::xform().

Referenced by SMVIEWapp::init_kbd().


Variable Documentation

bool draw_skin_only
 


Generated on Mon Sep 18 11:43:17 2006 for jot by  doxygen 1.4.4