Panda3D
Public Member Functions | Static Public Member Functions | Protected Member Functions

ModelFlattenRequest Class Reference

This class object manages a single asynchronous request to flatten a model. More...

#include "modelFlattenRequest.h"

Inheritance diagram for ModelFlattenRequest:
AsyncTask AsyncTaskBase TypedReferenceCount Namable TypedObject ReferenceCount MemoryBase MemoryBase MemoryBase

List of all members.

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 ()
PandaNodeget_model () const
 Returns the flattened copy of the model.
PandaNodeget_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.

Detailed Description

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.


Constructor & Destructor Documentation

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.


Member Function Documentation

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.


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