selectiveChildNode.I 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Filename: selectiveChildNode.I
  2. // Created by: drose (06Mar02)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://etc.cmu.edu/panda3d/docs/license/ .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. ////////////////////////////////////////////////////////////////////
  19. // Function: SelectiveChildNode::Constructor
  20. // Access: Public
  21. // Description:
  22. ////////////////////////////////////////////////////////////////////
  23. INLINE SelectiveChildNode::
  24. SelectiveChildNode(const string &name) :
  25. PandaNode(name),
  26. _selected_child(0)
  27. {
  28. }
  29. ////////////////////////////////////////////////////////////////////
  30. // Function: SelectiveChildNode::Copy Constructor
  31. // Access: Protected
  32. // Description:
  33. ////////////////////////////////////////////////////////////////////
  34. INLINE SelectiveChildNode::
  35. SelectiveChildNode(const SelectiveChildNode &copy) :
  36. PandaNode(copy),
  37. _selected_child(copy._selected_child)
  38. {
  39. }
  40. ////////////////////////////////////////////////////////////////////
  41. // Function: SelectiveChildNode::select_child
  42. // Access: Protected
  43. // Description: Selects the indicated child for rendering. This is
  44. // normally called during the cull_callback() method,
  45. // but it may be called at any time.
  46. ////////////////////////////////////////////////////////////////////
  47. INLINE void SelectiveChildNode::
  48. select_child(int n) {
  49. _selected_child = n;
  50. }