stTree.I 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Filename: stTree.I
  2. // Created by: drose (06Oct10)
  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: STTree::get_fullpath
  16. // Access: Published
  17. // Description: Returns the full pathname to the SRT file that was
  18. // loaded for this tree, as passed to the constructor.
  19. ////////////////////////////////////////////////////////////////////
  20. INLINE const Filename &STTree::
  21. get_fullpath() const {
  22. return _fullpath;
  23. }
  24. ////////////////////////////////////////////////////////////////////
  25. // Function: STTree::is_valid
  26. // Access: Published
  27. // Description: Returns true if the tree was successfully loaded and
  28. // is ready to be used, false otherwise.
  29. ////////////////////////////////////////////////////////////////////
  30. INLINE bool STTree::
  31. is_valid() const {
  32. return _is_valid;
  33. }
  34. ////////////////////////////////////////////////////////////////////
  35. // Function: STTree::get_tree
  36. // Access: Public
  37. // Description: Returns a const pointer to the internal SpeedTree
  38. // object.
  39. ////////////////////////////////////////////////////////////////////
  40. INLINE const SpeedTree::CTreeRender *STTree::
  41. get_tree() const {
  42. return &_tree;
  43. }
  44. ////////////////////////////////////////////////////////////////////
  45. // Function: STTree::modify_tree
  46. // Access: Public
  47. // Description: Returns a modifiable pointer to the internal SpeedTree
  48. // object.
  49. ////////////////////////////////////////////////////////////////////
  50. INLINE SpeedTree::CTreeRender *STTree::
  51. modify_tree() {
  52. return &_tree;
  53. }