odeContact.I 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Filename: odeContact.I
  2. // Created by: joswilso (27Dec06)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) Carnegie Mellon University. All rights reserved.
  8. //
  9. // All use of this software is subject to the terms of the revised BSD
  10. // license. You should have received a copy of this license along
  11. // with this source code in a file named "LICENSE."
  12. //
  13. ////////////////////////////////////////////////////////////////////
  14. INLINE OdeSurfaceParameters OdeContact::
  15. get_surface() const {
  16. return OdeSurfaceParameters(_contact.surface);
  17. }
  18. INLINE OdeContactGeom OdeContact::
  19. get_geom() {
  20. return OdeContactGeom(_contact.geom);
  21. }
  22. INLINE LVecBase3f OdeContact::
  23. get_fdir1() const {
  24. return LVecBase3f(_contact.fdir1[0],
  25. _contact.fdir1[1],
  26. _contact.fdir1[2]);
  27. }
  28. INLINE void OdeContact::
  29. set_surface(const OdeSurfaceParameters &surface_parameters) {
  30. _contact.surface = *(surface_parameters.get_surface_parameters_ptr());
  31. }
  32. INLINE void OdeContact::
  33. set_geom(const OdeContactGeom &contact_geom) {
  34. _contact.geom = *(contact_geom.get_contact_geom_ptr());
  35. }
  36. INLINE void OdeContact::
  37. set_fdir1(const LVecBase3f &fdir1) {
  38. _contact.fdir1[0] = fdir1[0];
  39. _contact.fdir1[1] = fdir1[1];
  40. _contact.fdir1[2] = fdir1[2];
  41. }