linearVectorForce.I 971 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 linearVectorForce.I
  10. * @author charles
  11. * @date 2000-06-21
  12. */
  13. /**
  14. * encapsulating wrapper
  15. */
  16. INLINE void LinearVectorForce::
  17. set_vector(const LVector3& v) {
  18. _fvec = v;
  19. }
  20. /**
  21. * piecewise encapsulating wrapper
  22. */
  23. INLINE void LinearVectorForce::
  24. set_vector(PN_stdfloat x, PN_stdfloat y, PN_stdfloat z) {
  25. _fvec.set(x, y, z);
  26. }
  27. /**
  28. *
  29. */
  30. INLINE LVector3 LinearVectorForce::
  31. get_local_vector() const {
  32. return _fvec;
  33. }
  34. /**
  35. * Performs a memberwise addition between two LinearVectorForces.
  36. */
  37. LinearVectorForce& LinearVectorForce::
  38. operator += (const LinearVectorForce &other) {
  39. _fvec+=other._fvec;
  40. // Should something happen with _amplitude?
  41. return *this;
  42. }