modelLoadRequest.I 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // Filename: modelLoadRequest.I
  2. // Created by: drose (29Aug06)
  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. // Function: ModelLoadRequest::get_filename
  16. // Access: Published
  17. // Description: Returns the filename associated with this
  18. // asynchronous ModelLoadRequest.
  19. ////////////////////////////////////////////////////////////////////
  20. INLINE const Filename &ModelLoadRequest::
  21. get_filename() const {
  22. return _filename;
  23. }
  24. ////////////////////////////////////////////////////////////////////
  25. // Function: ModelLoadRequest::get_options
  26. // Access: Published
  27. // Description: Returns the LoaderOptions associated with this
  28. // asynchronous ModelLoadRequest.
  29. ////////////////////////////////////////////////////////////////////
  30. INLINE const LoaderOptions &ModelLoadRequest::
  31. get_options() const {
  32. return _options;
  33. }
  34. ////////////////////////////////////////////////////////////////////
  35. // Function: ModelLoadRequest::get_loader
  36. // Access: Published
  37. // Description: Returns the Loader object associated with this
  38. // asynchronous ModelLoadRequest.
  39. ////////////////////////////////////////////////////////////////////
  40. INLINE Loader *ModelLoadRequest::
  41. get_loader() const {
  42. return _loader;
  43. }
  44. ////////////////////////////////////////////////////////////////////
  45. // Function: ModelLoadRequest::is_ready
  46. // Access: Published
  47. // Description: Returns true if this request has completed, false if
  48. // it is still pending. When this returns true, you may
  49. // retrieve the model loaded by calling get_model().
  50. ////////////////////////////////////////////////////////////////////
  51. INLINE bool ModelLoadRequest::
  52. is_ready() const {
  53. return _is_ready;
  54. }
  55. ////////////////////////////////////////////////////////////////////
  56. // Function: ModelLoadRequest::get_model
  57. // Access: Published
  58. // Description: Returns the model that was loaded asynchronously, if
  59. // any, or NULL if there was an error. It is an error
  60. // to call this unless is_ready() returns true.
  61. ////////////////////////////////////////////////////////////////////
  62. INLINE PandaNode *ModelLoadRequest::
  63. get_model() const {
  64. nassertr(_is_ready, NULL);
  65. return _model;
  66. }