odeBoxGeom.I 943 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * PANDA 3D SOFTWARE
  3. * Copyright (c) Carnegie Mellon University. All rights reserved.
  4. *
  5. * All use of this software is subject to the terms of the revised BSD
  6. * license. You should have received a copy of this license along
  7. * with this source code in a file named "LICENSE."
  8. *
  9. * @file odeBoxGeom.I
  10. * @author joswilso
  11. * @date 2006-12-27
  12. */
  13. INLINE void OdeBoxGeom::
  14. set_lengths(dReal lx, dReal ly, dReal lz) {
  15. dGeomBoxSetLengths(_id, lx, ly, lz);
  16. }
  17. INLINE void OdeBoxGeom::
  18. set_lengths(const LVecBase3f &size) {
  19. set_lengths(size[0], size[1], size[2]);
  20. }
  21. INLINE LVecBase3f OdeBoxGeom::
  22. get_lengths() {
  23. dVector3 res;
  24. dGeomBoxGetLengths(_id, res);
  25. return LVecBase3f(res[0], res[1], res[2]);
  26. }
  27. INLINE dReal OdeBoxGeom::
  28. get_point_depth(dReal x, dReal y, dReal z) {
  29. return dGeomBoxPointDepth(_id, x, y, z);
  30. }
  31. INLINE dReal OdeBoxGeom::
  32. get_point_depth(const LPoint3f &p) {
  33. return get_point_depth(p[0], p[1], p[2]);
  34. }