SimpleTreeCreator.hpp 1.0 KB

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