Panda3D
|
A class object that manages a single asynchronous model load request. More...
#include "modelLoadRequest.h"
Public Member Functions | |
ModelLoadRequest (const string &name, const Filename &filename, const LoaderOptions &options, Loader *loader) | |
Create a new ModelLoadRequest, and add it to the loader via load_async(), to begin an asynchronous load. | |
virtual TypeHandle | force_init_type () |
const Filename & | get_filename () const |
Returns the filename associated with this asynchronous ModelLoadRequest. | |
Loader * | get_loader () const |
Returns the Loader object associated with this asynchronous ModelLoadRequest. | |
PandaNode * | get_model () const |
Returns the model that was loaded asynchronously, if any, or NULL if there was an error. | |
const LoaderOptions & | get_options () const |
Returns the LoaderOptions associated with this asynchronous ModelLoadRequest. | |
virtual TypeHandle | get_type () const |
bool | is_ready () const |
Returns true if this request has completed, false if it is still pending. | |
Static Public Member Functions | |
static TypeHandle | get_class_type () |
static void | init_type () |
Protected Member Functions | |
virtual DoneStatus | do_task () |
Performs the task: that is, loads the one model. |
A class object that manages a single asynchronous model load request.
Create a new ModelLoadRequest, and add it to the loader via load_async(), to begin an asynchronous load.
Definition at line 34 of file modelLoadRequest.h.
ModelLoadRequest::ModelLoadRequest | ( | const string & | name, |
const Filename & | filename, | ||
const LoaderOptions & | options, | ||
Loader * | loader | ||
) |
Create a new ModelLoadRequest, and add it to the loader via load_async(), to begin an asynchronous load.
Definition at line 28 of file modelLoadRequest.cxx.
AsyncTask::DoneStatus ModelLoadRequest::do_task | ( | ) | [protected, virtual] |
Performs the task: that is, loads the one model.
Reimplemented from AsyncTask.
Reimplemented in BindAnimRequest.
Definition at line 45 of file modelLoadRequest.cxx.
References Thread::sleep().
const Filename & ModelLoadRequest::get_filename | ( | ) | const [inline] |
Returns the filename associated with this asynchronous ModelLoadRequest.
Definition at line 23 of file modelLoadRequest.I.
Loader * ModelLoadRequest::get_loader | ( | ) | const [inline] |
Returns the Loader object associated with this asynchronous ModelLoadRequest.
Definition at line 45 of file modelLoadRequest.I.
PandaNode * ModelLoadRequest::get_model | ( | ) | const [inline] |
Returns the model that was loaded asynchronously, if any, or NULL if there was an error.
It is an error to call this unless is_ready() returns true.
Definition at line 69 of file modelLoadRequest.I.
Referenced by BindAnimRequest::do_task().
const LoaderOptions & ModelLoadRequest::get_options | ( | ) | const [inline] |
Returns the LoaderOptions associated with this asynchronous ModelLoadRequest.
Definition at line 34 of file modelLoadRequest.I.
bool ModelLoadRequest::is_ready | ( | ) | const [inline] |
Returns true if this request has completed, false if it is still pending.
When this returns true, you may retrieve the model loaded by calling get_model().
Definition at line 57 of file modelLoadRequest.I.