Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions
ModelLoadRequest Class Reference

A class object that manages a single asynchronous model load request. More...

#include "modelLoadRequest.h"

Inheritance diagram for ModelLoadRequest:
AsyncTask AsyncTaskBase TypedReferenceCount Namable TypedObject ReferenceCount MemoryBase MemoryBase MemoryBase BindAnimRequest

List of all members.

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 Filenameget_filename () const
 Returns the filename associated with this asynchronous ModelLoadRequest.
Loaderget_loader () const
 Returns the Loader object associated with this asynchronous ModelLoadRequest.
PandaNodeget_model () const
 Returns the model that was loaded asynchronously, if any, or NULL if there was an error.
const LoaderOptionsget_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.

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations