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

PandaFramework Class Reference

#include <pandaFramework.h>

List of all members.

Public Member Functions

 PandaFramework ()
virtual ~PandaFramework ()
void open_framework (int &argc, char **&argv)
void close_framework ()
GraphicsPipeget_default_pipe ()
INLINE GraphicsEngineget_graphics_engine ()
INLINE const NodePathget_data_root () const
INLINE EventHandlerget_event_handler ()
INLINE void set_window_title (const string &title)
virtual void get_default_window_props (WindowProperties &props)
WindowFrameworkopen_window (GraphicsPipe *pipe=NULL)
WindowFrameworkopen_window (const WindowProperties &props, GraphicsPipe *pipe=NULL)
INLINE int get_num_windows () const
INLINE WindowFrameworkget_window (int n) const
int find_window (const GraphicsWindow *win) const
int find_window (const WindowFramework *wf) const
void close_window (int n)
INLINE void close_window (WindowFramework *wf)
void close_all_windows ()
bool all_windows_closed () const
const NodePathget_models ()
void report_frame_rate (ostream &out) const
void reset_frame_rate ()
void set_wireframe (bool enable)
void set_texture (bool enable)
void set_two_sided (bool enable)
void set_lighting (bool enable)
void set_background_type (WindowFramework::BackgroundType type)
INLINE bool get_wireframe () const
INLINE bool get_texture () const
INLINE bool get_two_sided () const
INLINE bool get_lighting () const
INLINE WindowFramework::BackgroundType get_background_type () const
void set_highlight (const NodePath &node)
void clear_highlight ()
INLINE bool has_highlight () const
INLINE const NodePathget_highlight () const
void enable_default_keys ()
virtual bool do_frame ()
void main_loop ()
INLINE void set_exit_flag ()
INLINE void clear_exit_flag ()

Static Public Member Functions

int hide_collision_solids (NodePath node)
int show_collision_solids (NodePath node)

Protected Member Functions

virtual PT (WindowFramework) make_window_framework()
virtual void make_default_pipe ()
virtual void do_enable_default_keys ()

Static Protected Member Functions

void event_esc (CPT_Event, void *data)
void event_f (CPT_Event, void *data)
void event_w (CPT_Event, void *data)
void event_t (CPT_Event, void *data)
void event_b (CPT_Event, void *data)
void event_i (CPT_Event, void *data)
void event_l (CPT_Event, void *data)
void event_c (CPT_Event, void *data)
void event_C (CPT_Event, void *data)
void event_B (CPT_Event, void *data)
void event_L (CPT_Event, void *data)
void event_h (CPT_Event, void *data)
void event_arrow_up (CPT_Event, void *data)
void event_arrow_down (CPT_Event, void *data)
void event_arrow_left (CPT_Event, void *data)
void event_arrow_right (CPT_Event, void *data)
void event_S (CPT_Event, void *data)
void event_comma (CPT_Event, void *data)
void event_window_event (CPT_Event, void *data)

Private Types

typedef pvector< PT(WindowFrameworkWindows )

Private Member Functions

 PT (GraphicsPipe) _default_pipe

Private Attributes

bool _is_open
bool _made_default_pipe
string _window_title
GraphicsEngine _engine
NodePath _data_root
EventHandler _event_handler
Windows _windows
NodePath _models
double _start_time
int _frame_count
bool _wireframe_enabled
bool _texture_enabled
bool _two_sided_enabled
bool _lighting_enabled
WindowFramework::BackgroundType _background_type
NodePath _highlight
bool _default_keys_enabled
bool _exit_flag


Member Typedef Documentation

typedef pvector< PT(WindowFramework) PandaFramework::Windows) [private]
 

Definition at line 141 of file pandaFramework.h.


Constructor & Destructor Documentation

PandaFramework::PandaFramework  ) 
 

Definition at line 34 of file pandaFramework.cxx.

References _background_type, _data_root, _default_keys_enabled, _exit_flag, _frame_count, _is_open, _lighting_enabled, _made_default_pipe, _start_time, _texture_enabled, _two_sided_enabled, _window_title, _wireframe_enabled, and WindowFramework::BT_gray.

PandaFramework::~PandaFramework  )  [virtual]
 

Definition at line 58 of file pandaFramework.cxx.

References close_framework().


Member Function Documentation

bool PandaFramework::all_windows_closed  )  const
 

Definition at line 301 of file pandaFramework.cxx.

References _windows, WindowFramework::get_graphics_window(), WindowProperties::get_open(), and GraphicsWindow::get_properties().

Referenced by event_window_event().

INLINE void PandaFramework::clear_exit_flag  ) 
 

void PandaFramework::clear_highlight  ) 
 

Definition at line 515 of file pandaFramework.cxx.

References _highlight, NodePath::hide_bounds(), and NodePath::is_empty().

Referenced by event_h(), and set_highlight().

void PandaFramework::close_all_windows  ) 
 

Definition at line 278 of file pandaFramework.cxx.

References _engine, _windows, WindowFramework::close_window(), WindowFramework::get_graphics_window(), NULL, GraphicsEngine::remove_window(), and win.

Referenced by close_framework().

void PandaFramework::close_framework  ) 
 

Definition at line 92 of file pandaFramework.cxx.

References _default_keys_enabled, _engine, _event_handler, _exit_flag, _frame_count, _is_open, _lighting_enabled, _made_default_pipe, _start_time, _two_sided_enabled, _wireframe_enabled, close_all_windows(), EventHandler::remove_all_hooks(), and GraphicsEngine::remove_all_windows().

Referenced by ~PandaFramework().

INLINE void PandaFramework::close_window WindowFramework wf  ) 
 

void PandaFramework::close_window int  n  ) 
 

Definition at line 258 of file pandaFramework.cxx.

References _engine, _windows, WindowFramework::close_window(), WindowFramework::get_graphics_window(), n, NULL, GraphicsEngine::remove_window(), and win.

Referenced by event_esc().

void PandaFramework::do_enable_default_keys  )  [protected, virtual]
 

Definition at line 607 of file pandaFramework.cxx.

References _event_handler, EventHandler::add_hook(), event_arrow_down(), event_arrow_left(), event_arrow_right(), event_arrow_up(), event_B(), event_b(), event_C(), event_c(), event_comma(), event_esc(), event_f(), event_h(), event_i(), event_L(), event_l(), event_S(), event_t(), event_w(), and event_window_event().

Referenced by enable_default_keys().

bool PandaFramework::do_frame  )  [virtual]
 

Definition at line 546 of file pandaFramework.cxx.

References _data_root, _engine, _event_handler, _exit_flag, _is_open, NodePath::node(), EventHandler::process_events(), GraphicsEngine::render_frame(), and DataGraphTraverser::traverse().

Referenced by main(), and main_loop().

void PandaFramework::enable_default_keys  ) 
 

Definition at line 530 of file pandaFramework.cxx.

References _default_keys_enabled, and do_enable_default_keys().

Referenced by main().

void PandaFramework::event_arrow_down CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 871 of file pandaFramework.cxx.

References data, NodePath::get_child(), get_highlight(), NodePath::get_num_children(), has_highlight(), and set_highlight().

Referenced by do_enable_default_keys().

void PandaFramework::event_arrow_left CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 890 of file pandaFramework.cxx.

References data, PandaNode::find_child(), PandaNode::get_child(), get_highlight(), get_models(), NodePath::get_parent(), has_highlight(), NodePath::has_parent(), index, NodePath::node(), and set_highlight().

Referenced by do_enable_default_keys().

void PandaFramework::event_arrow_right CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 915 of file pandaFramework.cxx.

References data, PandaNode::find_child(), PandaNode::get_child(), get_highlight(), get_models(), PandaNode::get_num_children(), NodePath::get_parent(), has_highlight(), NodePath::has_parent(), index, NodePath::node(), and set_highlight().

Referenced by do_enable_default_keys().

void PandaFramework::event_arrow_up CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 853 of file pandaFramework.cxx.

References data, get_highlight(), get_models(), NodePath::get_parent(), has_highlight(), NodePath::has_parent(), and set_highlight().

Referenced by do_enable_default_keys().

void PandaFramework::event_B CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 799 of file pandaFramework.cxx.

References data, get_highlight(), get_models(), and NodePath::is_empty().

Referenced by do_enable_default_keys().

void PandaFramework::event_b CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 706 of file pandaFramework.cxx.

References DCAST_INTO_V, WindowFramework::get_two_sided(), param, and WindowFramework::set_two_sided().

Referenced by do_enable_default_keys().

void PandaFramework::event_C CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 778 of file pandaFramework.cxx.

References data, get_highlight(), get_models(), hide_collision_solids(), NodePath::is_empty(), and show_collision_solids().

Referenced by do_enable_default_keys().

void PandaFramework::event_c CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 755 of file pandaFramework.cxx.

References WindowFramework::center_trackball(), data, DCAST_INTO_V, get_highlight(), get_models(), NodePath::is_empty(), and param.

Referenced by do_enable_default_keys().

void PandaFramework::event_comma CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 954 of file pandaFramework.cxx.

References WindowFramework::BackgroundType, WindowFramework::BT_default, WindowFramework::BT_none, WindowFramework::BT_other, DCAST_INTO_V, WindowFramework::get_background_type(), param, and WindowFramework::set_background_type().

Referenced by do_enable_default_keys().

void PandaFramework::event_esc CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 638 of file pandaFramework.cxx.

References _exit_flag, _windows, close_window(), data, DCAST_INTO_V, and param.

Referenced by do_enable_default_keys().

void PandaFramework::event_f CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 661 of file pandaFramework.cxx.

References data, report_frame_rate(), and reset_frame_rate().

Referenced by do_enable_default_keys().

void PandaFramework::event_h CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 836 of file pandaFramework.cxx.

References clear_highlight(), data, get_models(), has_highlight(), and set_highlight().

Referenced by do_enable_default_keys().

void PandaFramework::event_i CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 722 of file pandaFramework.cxx.

References DCAST_INTO_V, WindowFramework::get_one_sided_reverse(), param, and WindowFramework::set_one_sided_reverse().

Referenced by do_enable_default_keys().

void PandaFramework::event_L CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 817 of file pandaFramework.cxx.

References data, get_highlight(), get_models(), NodePath::is_empty(), and NodePath::ls().

Referenced by do_enable_default_keys().

void PandaFramework::event_l CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 738 of file pandaFramework.cxx.

References DCAST_INTO_V, WindowFramework::get_lighting(), param, and WindowFramework::set_lighting().

Referenced by do_enable_default_keys().

void PandaFramework::event_S CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 939 of file pandaFramework.cxx.

Referenced by do_enable_default_keys().

void PandaFramework::event_t CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 689 of file pandaFramework.cxx.

References DCAST_INTO_V, WindowFramework::get_texture(), param, and WindowFramework::set_texture().

Referenced by do_enable_default_keys().

void PandaFramework::event_w CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 673 of file pandaFramework.cxx.

References DCAST_INTO_V, WindowFramework::get_wireframe(), param, and WindowFramework::set_wireframe().

Referenced by do_enable_default_keys().

void PandaFramework::event_window_event CPT_Event  ,
void *  data
[static, protected]
 

Definition at line 981 of file pandaFramework.cxx.

References _exit_flag, all_windows_closed(), data, DCAST_INTO_V, find_window(), WindowProperties::get_open(), GraphicsWindow::get_properties(), param, and win.

Referenced by do_enable_default_keys().

int PandaFramework::find_window const WindowFramework wf  )  const
 

Definition at line 240 of file pandaFramework.cxx.

References _windows, and n.

int PandaFramework::find_window const GraphicsWindow win  )  const
 

Definition at line 221 of file pandaFramework.cxx.

References _windows, n, and win.

Referenced by event_window_event().

INLINE WindowFramework::BackgroundType PandaFramework::get_background_type  )  const
 

Referenced by open_window().

INLINE const NodePath& PandaFramework::get_data_root  )  const
 

Referenced by WindowFramework::get_mouse().

GraphicsPipe * PandaFramework::get_default_pipe  ) 
 

Definition at line 131 of file pandaFramework.cxx.

References _is_open, _made_default_pipe, make_default_pipe(), and NULL.

Referenced by open_window().

void PandaFramework::get_default_window_props WindowProperties props  )  [virtual]
 

Definition at line 148 of file pandaFramework.cxx.

References _window_title, cursor_hidden, fullscreen, WindowProperties::set_cursor_hidden(), WindowProperties::set_fullscreen(), WindowProperties::set_open(), WindowProperties::set_size(), WindowProperties::set_title(), WindowProperties::set_undecorated(), undecorated, win_height, and win_width.

Referenced by open_window().

INLINE EventHandler& PandaFramework::get_event_handler  ) 
 

Referenced by main().

INLINE GraphicsEngine* PandaFramework::get_graphics_engine  ) 
 

INLINE const NodePath& PandaFramework::get_highlight  )  const
 

Referenced by event_arrow_down(), event_arrow_left(), event_arrow_right(), event_arrow_up(), event_B(), event_C(), event_c(), and event_L().

INLINE bool PandaFramework::get_lighting  )  const
 

Referenced by open_window().

const NodePath & PandaFramework::get_models  ) 
 

Definition at line 322 of file pandaFramework.cxx.

References _models, and NodePath::is_empty().

Referenced by event_arrow_left(), event_arrow_right(), event_arrow_up(), event_B(), event_C(), event_c(), event_h(), event_L(), event_T(), event_W(), and main().

INLINE int PandaFramework::get_num_windows  )  const
 

INLINE bool PandaFramework::get_texture  )  const
 

Referenced by open_window().

INLINE bool PandaFramework::get_two_sided  )  const
 

Referenced by open_window().

INLINE WindowFramework* PandaFramework::get_window int  n  )  const
 

Referenced by event_T().

INLINE bool PandaFramework::get_wireframe  )  const
 

Referenced by open_window().

INLINE bool PandaFramework::has_highlight  )  const
 

Referenced by event_arrow_down(), event_arrow_left(), event_arrow_right(), event_arrow_up(), and event_h().

int PandaFramework::hide_collision_solids NodePath  node  )  [static]
 

Definition at line 448 of file pandaFramework.cxx.

References NodePath::get_child(), CollisionNode::get_class_type(), NodePath::get_num_children(), NodePath::hide(), NodePath::is_hidden(), TypedObject::is_of_type(), and NodePath::node().

Referenced by event_C().

void PandaFramework::main_loop  ) 
 

Definition at line 564 of file pandaFramework.cxx.

References do_frame().

Referenced by main().

void PandaFramework::make_default_pipe  )  [protected, virtual]
 

Definition at line 588 of file pandaFramework.cxx.

References GraphicsPipeSelection::get_global_ptr(), NULL, and GraphicsPipeSelection::print_pipe_types().

Referenced by get_default_pipe().

void PandaFramework::open_framework int &  argc,
char **&  argv
 

Definition at line 74 of file pandaFramework.cxx.

References _is_open, and reset_frame_rate().

Referenced by main().

WindowFramework * PandaFramework::open_window const WindowProperties props,
GraphicsPipe pipe = NULL
 

Definition at line 185 of file pandaFramework.cxx.

References _engine, _is_open, _windows, get_background_type(), get_default_pipe(), get_lighting(), get_texture(), get_two_sided(), get_wireframe(), NULL, GraphicsWindow::open_window(), PT(), and win.

WindowFramework * PandaFramework::open_window GraphicsPipe pipe = NULL  ) 
 

Definition at line 165 of file pandaFramework.cxx.

References _is_open, get_default_window_props(), and NULL.

Referenced by event_W(), and main().

PandaFramework::PT GraphicsPipe   )  [private]
 

virtual PandaFramework::PT WindowFramework   )  [protected, virtual]
 

Referenced by open_window().

void PandaFramework::report_frame_rate ostream &  out  )  const
 

Definition at line 336 of file pandaFramework.cxx.

References _frame_count, _start_time, ClockObject::get_frame_count(), ClockObject::get_frame_time(), ClockObject::get_global_clock(), and num_frames.

Referenced by event_f(), and main().

void PandaFramework::reset_frame_rate  ) 
 

Definition at line 355 of file pandaFramework.cxx.

References _frame_count, _start_time, ClockObject::get_frame_count(), ClockObject::get_frame_time(), and ClockObject::get_global_clock().

Referenced by event_f(), and open_framework().

void PandaFramework::set_background_type WindowFramework::BackgroundType  type  ) 
 

Definition at line 430 of file pandaFramework.cxx.

References _background_type, _windows, WindowFramework::set_background_type(), and type.

INLINE void PandaFramework::set_exit_flag  ) 
 

void PandaFramework::set_highlight const NodePath node  ) 
 

Definition at line 500 of file pandaFramework.cxx.

References _highlight, clear_highlight(), NodePath::is_empty(), and NodePath::show_bounds().

Referenced by event_arrow_down(), event_arrow_left(), event_arrow_right(), event_arrow_up(), and event_h().

void PandaFramework::set_lighting bool  enable  ) 
 

Definition at line 414 of file pandaFramework.cxx.

References _lighting_enabled, _windows, and WindowFramework::set_lighting().

void PandaFramework::set_texture bool  enable  ) 
 

Definition at line 382 of file pandaFramework.cxx.

References _texture_enabled, _windows, and WindowFramework::set_texture().

void PandaFramework::set_two_sided bool  enable  ) 
 

Definition at line 398 of file pandaFramework.cxx.

References _two_sided_enabled, _windows, and WindowFramework::set_two_sided().

INLINE void PandaFramework::set_window_title const string &  title  ) 
 

Referenced by main().

void PandaFramework::set_wireframe bool  enable  ) 
 

Definition at line 366 of file pandaFramework.cxx.

References _windows, _wireframe_enabled, and WindowFramework::set_wireframe().

int PandaFramework::show_collision_solids NodePath  node  )  [static]
 

Definition at line 474 of file pandaFramework.cxx.

References NodePath::get_child(), CollisionNode::get_class_type(), NodePath::get_hidden_ancestor(), NodePath::get_num_children(), TypedObject::is_of_type(), NodePath::node(), and NodePath::show().

Referenced by event_C().


Member Data Documentation

WindowFramework::BackgroundType PandaFramework::_background_type [private]
 

Definition at line 154 of file pandaFramework.h.

Referenced by PandaFramework(), and set_background_type().

NodePath PandaFramework::_data_root [private]
 

Definition at line 138 of file pandaFramework.h.

Referenced by do_frame(), and PandaFramework().

bool PandaFramework::_default_keys_enabled [private]
 

Definition at line 158 of file pandaFramework.h.

Referenced by close_framework(), enable_default_keys(), and PandaFramework().

GraphicsEngine PandaFramework::_engine [private]
 

Definition at line 136 of file pandaFramework.h.

Referenced by close_all_windows(), close_framework(), close_window(), do_frame(), and open_window().

EventHandler PandaFramework::_event_handler [private]
 

Definition at line 139 of file pandaFramework.h.

Referenced by close_framework(), do_enable_default_keys(), and do_frame().

bool PandaFramework::_exit_flag [private]
 

Definition at line 160 of file pandaFramework.h.

Referenced by close_framework(), do_frame(), event_esc(), event_window_event(), and PandaFramework().

int PandaFramework::_frame_count [private]
 

Definition at line 148 of file pandaFramework.h.

Referenced by close_framework(), PandaFramework(), report_frame_rate(), and reset_frame_rate().

NodePath PandaFramework::_highlight [private]
 

Definition at line 156 of file pandaFramework.h.

Referenced by clear_highlight(), and set_highlight().

bool PandaFramework::_is_open [private]
 

Definition at line 130 of file pandaFramework.h.

Referenced by close_framework(), do_frame(), get_default_pipe(), open_framework(), open_window(), and PandaFramework().

bool PandaFramework::_lighting_enabled [private]
 

Definition at line 153 of file pandaFramework.h.

Referenced by close_framework(), PandaFramework(), and set_lighting().

bool PandaFramework::_made_default_pipe [private]
 

Definition at line 131 of file pandaFramework.h.

Referenced by close_framework(), get_default_pipe(), and PandaFramework().

NodePath PandaFramework::_models [private]
 

Definition at line 144 of file pandaFramework.h.

Referenced by get_models().

double PandaFramework::_start_time [private]
 

Definition at line 147 of file pandaFramework.h.

Referenced by close_framework(), PandaFramework(), report_frame_rate(), and reset_frame_rate().

bool PandaFramework::_texture_enabled [private]
 

Definition at line 151 of file pandaFramework.h.

Referenced by PandaFramework(), and set_texture().

bool PandaFramework::_two_sided_enabled [private]
 

Definition at line 152 of file pandaFramework.h.

Referenced by close_framework(), PandaFramework(), and set_two_sided().

string PandaFramework::_window_title [private]
 

Definition at line 133 of file pandaFramework.h.

Referenced by get_default_window_props(), and PandaFramework().

Windows PandaFramework::_windows [private]
 

Definition at line 142 of file pandaFramework.h.

Referenced by all_windows_closed(), close_all_windows(), close_window(), event_esc(), find_window(), open_window(), set_background_type(), set_lighting(), set_texture(), set_two_sided(), and set_wireframe().

bool PandaFramework::_wireframe_enabled [private]
 

Definition at line 150 of file pandaFramework.h.

Referenced by close_framework(), PandaFramework(), and set_wireframe().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:12:58 2003 for Panda by doxygen1.3