Panda3D
 All Classes Functions Variables Enumerations
modelSaveRequest.I
1 // Filename: modelSaveRequest.I
2 // Created by: drose (19Dec12)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: ModelSaveRequest::get_filename
18 // Access: Published
19 // Description: Returns the filename associated with this
20 // asynchronous ModelSaveRequest.
21 ////////////////////////////////////////////////////////////////////
22 INLINE const Filename &ModelSaveRequest::
23 get_filename() const {
24  return _filename;
25 }
26 
27 ////////////////////////////////////////////////////////////////////
28 // Function: ModelSaveRequest::get_options
29 // Access: Published
30 // Description: Returns the LoaderOptions associated with this
31 // asynchronous ModelSaveRequest.
32 ////////////////////////////////////////////////////////////////////
34 get_options() const {
35  return _options;
36 }
37 
38 ////////////////////////////////////////////////////////////////////
39 // Function: ModelSaveRequest::get_node
40 // Access: Published
41 // Description: Returns the node that was passed to the constructor.
42 ////////////////////////////////////////////////////////////////////
44 get_node() const {
45  return _node;
46 }
47 
48 ////////////////////////////////////////////////////////////////////
49 // Function: ModelSaveRequest::get_loader
50 // Access: Published
51 // Description: Returns the Loader object associated with this
52 // asynchronous ModelSaveRequest.
53 ////////////////////////////////////////////////////////////////////
55 get_loader() const {
56  return _loader;
57 }
58 
59 ////////////////////////////////////////////////////////////////////
60 // Function: ModelSaveRequest::is_ready
61 // Access: Published
62 // Description: Returns true if this request has completed, false if
63 // it is still pending. When this returns true, you may
64 // retrieve the success flag with get_success().
65 ////////////////////////////////////////////////////////////////////
66 INLINE bool ModelSaveRequest::
67 is_ready() const {
68  return _is_ready;
69 }
70 
71 ////////////////////////////////////////////////////////////////////
72 // Function: ModelSaveRequest::get_success
73 // Access: Published
74 // Description: Returns the true if the model was saved successfully,
75 // false otherwise. It is an error to call this unless
76 // is_ready() returns true.
77 ////////////////////////////////////////////////////////////////////
78 INLINE bool ModelSaveRequest::
79 get_success() const {
80  nassertr(_is_ready, false);
81  return _success;
82 }
A basic node of the scene graph or data graph.
Definition: pandaNode.h:72
bool is_ready() const
Returns true if this request has completed, false if it is still pending.
Specifies parameters that may be passed to the loader.
Definition: loaderOptions.h:26
A convenient class for loading models from disk, in bam or egg format (or any of a number of other fo...
Definition: loader.h:47
const LoaderOptions & get_options() const
Returns the LoaderOptions associated with this asynchronous ModelSaveRequest.
bool get_success() const
Returns the true if the model was saved successfully, false otherwise.
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:44
PandaNode * get_node() const
Returns the node that was passed to the constructor.
const Filename & get_filename() const
Returns the filename associated with this asynchronous ModelSaveRequest.
Loader * get_loader() const
Returns the Loader object associated with this asynchronous ModelSaveRequest.