BezierPoint.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. function BezierPoint(p1x,p1y,p1z,p2x,p2y,p2z,p3x,p3y,p3z) {
  2. if(arguments[0] != "__skip_ptr__") {
  3. this.__ptr = Polycode.BezierPoint(p1x,p1y,p1z,p2x,p2y,p2z,p3x,p3y,p3z)
  4. }
  5. Object.defineProperties(this, {
  6. 'p1': { enumerable: true, configurable: true, get: BezierPoint.prototype.__get_p1, set: BezierPoint.prototype.__set_p1},
  7. 'p2': { enumerable: true, configurable: true, get: BezierPoint.prototype.__get_p2, set: BezierPoint.prototype.__set_p2},
  8. 'p3': { enumerable: true, configurable: true, get: BezierPoint.prototype.__get_p3, set: BezierPoint.prototype.__set_p3}
  9. })
  10. }
  11. BezierPoint.prototype.__get_p1 = function() {
  12. var retVal = new Vector3("__skip_ptr__")
  13. retVal.__ptr = Polycode.BezierPoint__get_p1(this.__ptr)
  14. return retVal
  15. }
  16. BezierPoint.prototype.__set_p1 = function(val) {
  17. Polycode.BezierPoint__set_p1(this.__ptr, val.__ptr)
  18. }
  19. BezierPoint.prototype.__get_p2 = function() {
  20. var retVal = new Vector3("__skip_ptr__")
  21. retVal.__ptr = Polycode.BezierPoint__get_p2(this.__ptr)
  22. return retVal
  23. }
  24. BezierPoint.prototype.__set_p2 = function(val) {
  25. Polycode.BezierPoint__set_p2(this.__ptr, val.__ptr)
  26. }
  27. BezierPoint.prototype.__get_p3 = function() {
  28. var retVal = new Vector3("__skip_ptr__")
  29. retVal.__ptr = Polycode.BezierPoint__get_p3(this.__ptr)
  30. return retVal
  31. }
  32. BezierPoint.prototype.__set_p3 = function(val) {
  33. Polycode.BezierPoint__set_p3(this.__ptr, val.__ptr)
  34. }
  35. Duktape.fin(BezierPoint.prototype, function (x) {
  36. if (x === BezierPoint.prototype) {
  37. return;
  38. }
  39. Polycode.BezierPoint__delete(x.__ptr)
  40. })