Panda3D
|
This class object manages a single asynchronous request to flatten a model. More...
#include "modelFlattenRequest.h"
Public Member Functions | |
ModelFlattenRequest (PandaNode *orig) | |
Create a new ModelFlattenRequest, and add it to the loader via load_async(), to begin an asynchronous load. | |
virtual TypeHandle | force_init_type () |
PandaNode * | get_model () const |
Returns the flattened copy of the model. | |
PandaNode * | get_orig () const |
Returns the original, unflattened node. | |
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, copies and flattens the model. |
This class object manages a single asynchronous request to flatten a model.
The model will be duplicated and flattened in a sub-thread (if threading is available), without affecting the original model; and when the result is done it may be retrieved from this object.
Definition at line 33 of file modelFlattenRequest.h.
ModelFlattenRequest::ModelFlattenRequest | ( | PandaNode * | orig | ) | [inline] |
Create a new ModelFlattenRequest, and add it to the loader via load_async(), to begin an asynchronous load.
Definition at line 23 of file modelFlattenRequest.I.
AsyncTask::DoneStatus ModelFlattenRequest::do_task | ( | ) | [protected, virtual] |
Performs the task: that is, copies and flattens the model.
Reimplemented from AsyncTask.
Definition at line 27 of file modelFlattenRequest.cxx.
References NodePath::attach_new_node(), NodePath::flatten_strong(), NodePath::get_child(), and NodePath::node().
PandaNode * ModelFlattenRequest::get_model | ( | ) | const [inline] |
Returns the flattened copy of the model.
It is an error to call this unless is_ready() returns true.
Definition at line 59 of file modelFlattenRequest.I.
PandaNode * ModelFlattenRequest::get_orig | ( | ) | const [inline] |
Returns the original, unflattened node.
Definition at line 36 of file modelFlattenRequest.I.
bool ModelFlattenRequest::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_result().
Definition at line 48 of file modelFlattenRequest.I.