JointGroup.cpp 633 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #include "StdAfx.h"
  2. #include <ode/ode.h>
  3. #include "jointgroup.h"
  4. namespace ODEManaged
  5. {
  6. //Constructors
  7. JointGroup::JointGroup(void)
  8. {
  9. _id=0;
  10. }
  11. JointGroup::JointGroup (int maxSize)
  12. {
  13. _id = dJointGroupCreate(maxSize);
  14. }
  15. //Destructor
  16. JointGroup::~JointGroup(void)
  17. {
  18. dJointGroupDestroy(this->_id);
  19. }
  20. //Methods
  21. //ID
  22. dJointGroupID JointGroup::Id()
  23. {
  24. return _id;
  25. }
  26. //Create
  27. void JointGroup::Create (int maxSize)
  28. {
  29. if(_id) dJointGroupDestroy(_id);
  30. _id = dJointGroupCreate(maxSize);
  31. }
  32. //Empty
  33. void JointGroup::Empty (void)
  34. {
  35. dJointGroupEmpty(this->_id);
  36. }
  37. }