odeBoxGeom.I 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Filename: odeBoxGeom.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 void OdeBoxGeom::
  15. set_lengths(dReal lx, dReal ly, dReal lz) {
  16. dGeomBoxSetLengths(_id, lx, ly, lz);
  17. }
  18. INLINE void OdeBoxGeom::
  19. set_lengths(const LVecBase3f &size) {
  20. set_lengths(size[0], size[1], size[2]);
  21. }
  22. INLINE LVecBase3f OdeBoxGeom::
  23. get_lengths() {
  24. dVector3 res;
  25. dGeomBoxGetLengths(_id, res);
  26. return LVecBase3f(res[0], res[1], res[2]);
  27. }
  28. INLINE dReal OdeBoxGeom::
  29. get_point_depth(dReal x, dReal y, dReal z) {
  30. return dGeomBoxPointDepth(_id, x, y, z);
  31. }
  32. INLINE dReal OdeBoxGeom::
  33. get_point_depth(const LPoint3f &p) {
  34. return get_point_depth(p[0], p[1], p[2]);
  35. }