Panda3D
Loading...
Searching...
No Matches
modelSaveRequest.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file modelSaveRequest.I
10 * @author drose
11 * @date 2012-12-19
12 */
13
14/**
15 * Returns the filename associated with this asynchronous ModelSaveRequest.
16 */
17INLINE const Filename &ModelSaveRequest::
18get_filename() const {
19 return _filename;
20}
21
22/**
23 * Returns the LoaderOptions associated with this asynchronous
24 * ModelSaveRequest.
25 */
27get_options() const {
28 return _options;
29}
30
31/**
32 * Returns the node that was passed to the constructor.
33 */
35get_node() const {
36 return _node;
37}
38
39/**
40 * Returns the Loader object associated with this asynchronous
41 * ModelSaveRequest.
42 */
44get_loader() const {
45 return _loader;
46}
47
48/**
49 * Returns true if this request has completed, false if it is still pending.
50 * When this returns true, you may retrieve the success flag with
51 * get_success().
52 * Equivalent to `req.done() and not req.cancelled()`.
53 * @see done()
54 */
56is_ready() const {
57 return (FutureState)AtomicAdjust::get(_future_state) == FS_finished;
58}
59
60/**
61 * Returns the true if the model was saved successfully, false otherwise. It
62 * is an error to call this unless done() returns true.
63 */
65get_success() const {
66 nassertr_always(done(), false);
67 return _success;
68}
bool done() const
Returns true if the future is done or has been cancelled.
Definition asyncFuture.I:29
static Integer get(const Integer &var)
Atomically retrieves the snapshot value of the indicated variable.
The name of a file, such as a texture file or an Egg file.
Definition filename.h:44
Specifies parameters that may be passed to the loader.
A convenient class for loading models from disk, in bam or egg format (or any of a number of other fo...
Definition loader.h:42
get_options
Returns the LoaderOptions associated with this asynchronous ModelSaveRequest.
get_node
Returns the node that was passed to the constructor.
bool get_success() const
Returns the true if the model was saved successfully, false otherwise.
get_loader
Returns the Loader object associated with this asynchronous ModelSaveRequest.
bool is_ready() const
Returns true if this request has completed, false if it is still pending.
get_filename
Returns the filename associated with this asynchronous ModelSaveRequest.
A basic node of the scene graph or data graph.
Definition pandaNode.h:65