animControl.I 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // Filename: animControl.I
  2. // Created by: drose (19Feb99)
  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: AnimControl::get_anim
  20. // Access: Published
  21. // Description: Returns the AnimBundle bound in with this
  22. // AnimControl.
  23. ////////////////////////////////////////////////////////////////////
  24. INLINE AnimBundle *AnimControl::
  25. get_anim() const {
  26. return _anim;
  27. }
  28. ////////////////////////////////////////////////////////////////////
  29. // Function: AnimControl::get_channel_index
  30. // Access: Published
  31. // Description: Returns the particular channel index associated with
  32. // this AnimControl. This channel index is the slot on
  33. // which each AnimGroup is bound to its associated
  34. // PartGroup, for each joint in the animation.
  35. //
  36. // It will be true that
  37. // get_part()->find_child("n")->get_bound(get_channel_index())
  38. // == get_anim()->find_child("n"), for each joint "n".
  39. ////////////////////////////////////////////////////////////////////
  40. INLINE int AnimControl::
  41. get_channel_index() const {
  42. return _channel_index;
  43. }
  44. ////////////////////////////////////////////////////////////////////
  45. // Function: AnimControl::get_bound_joints
  46. // Access: Published
  47. // Description: Returns the subset of joints controlled by this
  48. // AnimControl. Most of the time, this will be
  49. // BitArray::all_on(), for a normal full-body animation.
  50. // For a subset animation, however, this will be just a
  51. // subset of those bits, corresponding to the set of
  52. // joints and sliders actually bound (as enumerated by
  53. // bind_hierarchy() in depth-first LIFO order).
  54. ////////////////////////////////////////////////////////////////////
  55. INLINE const BitArray &AnimControl::
  56. get_bound_joints() const {
  57. return _bound_joints;
  58. }