15 #include "pandaFramework.h" 16 #include "pandaSystem.h" 18 #include "texturePool.h" 19 #include "multitexReducer.h" 20 #include "sceneGraphReducer.h" 21 #include "partGroup.h" 22 #include "cardMaker.h" 24 #include "virtualFileSystem.h" 30 #include "checkPandaVersion.h" 32 int main(
int argc,
char **argv) {
40 int hierarchy_match_flags = PartGroup::HMF_ok_part_extra |
41 PartGroup::HMF_ok_anim_extra;
55 loading->set_text_color(1.0f, 1.0f, 1.0f, 1.0f);
56 loading->set_shadow_color(0.0f, 0.0f, 0.0f, 1.0f);
57 loading->set_shadow(0.04, 0.04);
58 loading->set_align(TextNode::A_center);
59 loading->set_text(
"Loading...");
void loop_animations(int hierarchy_match_flags=PartGroup::HMF_ok_part_extra|PartGroup::HMF_ok_anim_extra)
Looks for characters and their matching animation files in the scene graph; binds and loops any match...
void enable_default_keys()
Sets callbacks on the event handler to handle all of the normal viewer keys, like t to toggle texture...
NodePath & get_models()
Returns the root of the scene graph normally reserved for parenting models and such.
NodePath get_render()
Returns the root of the 3-d scene graph.
void close_framework()
Should be called at the end of an application to close Panda.
NodePath get_aspect_2d()
Returns the node under the 2-d scene graph that is scaled to suit the window's aspect ratio...
GraphicsOutput * get_graphics_output() const
Returns a pointer to the underlying GraphicsOutput object.
void set_scale(PN_stdfloat scale)
Sets the scale component of the transform, leaving translation and rotation untouched.
This encapsulates the data that is normally associated with a single window, or with a single display...
void set_anim_controls(bool enable)
Creates an onscreen animation slider for frame-stepping through the animations.
NodePath instance_to(const NodePath &other, int sort=0, Thread *current_thread=Thread::get_current_thread()) const
Adds the referenced node of the NodePath as a child of the referenced node of the indicated other Nod...
static Thread * get_current_thread()
Returns a pointer to the currently-executing Thread object.
void prepare_scene(GraphicsStateGuardianBase *gsg)
Walks through the scene graph beginning at the bottom node, and does whatever initialization is requi...
NodePath load_model(const NodePath &parent, Filename filename)
Loads up the indicated model and returns the new NodePath, or the empty NodePath if the model could n...
NodePath attach_new_node(PandaNode *node, int sort=0, Thread *current_thread=Thread::get_current_thread()) const
Attaches a new node, with or without existing parents, to the scene graph below the referenced node o...
void center_trackball(const NodePath &object)
Centers the trackball on the indicated object, and scales the trackball motion suitably.
void main_loop()
Called to yield control to the panda framework.
void enable_keyboard()
Creates a ButtonThrower to listen to button presses and throw them as events.
WindowFramework * open_window()
Opens a window on the default graphics pipe.
void open_framework(int &argc, char **&argv)
Should be called once at the beginning of the application to initialize Panda (and the framework) for...
GraphicsStateGuardian * get_gsg() const
Returns the GSG that is associated with this window.
A thread; that is, a lightweight process.
void remove_node(Thread *current_thread=Thread::get_current_thread())
Disconnects the referenced node from the scene graph.
The primary interface to this module.
void report_frame_rate(ostream &out) const
Reports the currently measured average frame rate to the indicated ostream.
void set_window_title(const string &title)
Specifies the title that is set for all subsequently created windows.
This class serves to provide a high-level framework for basic applications that use Panda in simple w...
void setup_trackball()
Sets up the mouse to trackball around the camera.
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
virtual bool do_frame(Thread *current_thread)
Renders one frame and performs all associated processing.