BezierCurve.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. function BezierCurve() {
  2. }
  3. BezierCurve.prototype.getControlPoint = function(index) {
  4. Polycode.BezierCurve_getControlPoint(this.__ptr, index)
  5. }
  6. BezierCurve.prototype.getNumControlPoints = function() {
  7. Polycode.BezierCurve_getNumControlPoints(this.__ptr)
  8. }
  9. BezierCurve.prototype.addControlPoint = function(p1x,p1y,p1z,p2x,p2y,p2z,p3x,p3y,p3z) {
  10. Polycode.BezierCurve_addControlPoint(this.__ptr, p1x,p1y,p1z,p2x,p2y,p2z,p3x,p3y,p3z)
  11. }
  12. BezierCurve.prototype.addControlPoint3dWithHandles = function(p1x,p1y,p1z,p2x,p2y,p2z,p3x,p3y,p3z) {
  13. Polycode.BezierCurve_addControlPoint3dWithHandles(this.__ptr, p1x,p1y,p1z,p2x,p2y,p2z,p3x,p3y,p3z)
  14. }
  15. BezierCurve.prototype.addControlPoint3d = function(x,y,z) {
  16. Polycode.BezierCurve_addControlPoint3d(this.__ptr, x,y,z)
  17. }
  18. BezierCurve.prototype.addControlPoint2dWithHandles = function(p1x,p1y,p2x,p2y,p3x,p3y) {
  19. Polycode.BezierCurve_addControlPoint2dWithHandles(this.__ptr, p1x,p1y,p2x,p2y,p3x,p3y)
  20. }
  21. BezierCurve.prototype.addControlPoint2d = function(x,y) {
  22. Polycode.BezierCurve_addControlPoint2d(this.__ptr, x,y)
  23. }
  24. BezierCurve.prototype.getPointAt = function(a) {
  25. Polycode.BezierCurve_getPointAt(this.__ptr, a)
  26. }
  27. BezierCurve.prototype.getPointBetween = function(a,bp1,bp2) {
  28. Polycode.BezierCurve_getPointBetween(this.__ptr, a,bp1,bp2)
  29. }
  30. BezierCurve.prototype.clearControlPoints = function() {
  31. Polycode.BezierCurve_clearControlPoints(this.__ptr)
  32. }
  33. BezierCurve.prototype.getYValueAtX = function(x) {
  34. Polycode.BezierCurve_getYValueAtX(this.__ptr, x)
  35. }
  36. BezierCurve.prototype.getTValueAtX = function(x) {
  37. Polycode.BezierCurve_getTValueAtX(this.__ptr, x)
  38. }
  39. BezierCurve.prototype.removePoint = function(point) {
  40. Polycode.BezierCurve_removePoint(this.__ptr, point)
  41. }
  42. BezierCurve.prototype.setHeightCacheResolution = function(resolution) {
  43. Polycode.BezierCurve_setHeightCacheResolution(this.__ptr, resolution)
  44. }
  45. BezierCurve.prototype.rebuildHeightCache = function() {
  46. Polycode.BezierCurve_rebuildHeightCache(this.__ptr)
  47. }
  48. BezierCurve.prototype.recalculateDistances = function() {
  49. Polycode.BezierCurve_recalculateDistances(this.__ptr)
  50. }