SimpleTreeCreator.hpp 973 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef SIMPLETREECREATOR_HPP_
  2. #define SIMPLETREECREATOR_HPP_
  3. #include "MultiBodyTreeCreator.hpp"
  4. namespace btInverseDynamics
  5. {
  6. /// minimal "tree" (chain)
  7. class SimpleTreeCreator : public MultiBodyTreeCreator
  8. {
  9. public:
  10. /// ctor
  11. /// @param dim number of bodies
  12. SimpleTreeCreator(int dim);
  13. // dtor
  14. ~SimpleTreeCreator() {}
  15. ///\copydoc MultiBodyTreeCreator::getNumBodies
  16. int getNumBodies(int* num_bodies) const;
  17. ///\copydoc MultiBodyTreeCreator::getBody
  18. int getBody(const int body_index, int* parent_index, JointType* joint_type,
  19. vec3* parent_r_parent_body_ref, mat33* body_T_parent_ref, vec3* body_axis_of_motion,
  20. idScalar* mass, vec3* body_r_body_com, mat33* body_I_body, int* user_int,
  21. void** user_ptr) const;
  22. private:
  23. int m_num_bodies;
  24. idScalar m_mass;
  25. mat33 m_body_T_parent_ref;
  26. vec3 m_parent_r_parent_body_ref;
  27. vec3 m_body_r_body_com;
  28. mat33 m_body_I_body;
  29. vec3 m_axis;
  30. };
  31. } // namespace btInverseDynamics
  32. #endif // SIMPLETREECREATOR_HPP_