Ray.js 771 B

1234567891011121314151617181920212223242526
  1. function Ray() {
  2. }
  3. Ray.prototype.boxIntersect = function(box,transformMatrix,near,far) {
  4. Polycode.Ray_boxIntersect(this.__ptr, box,transformMatrix,near,far)
  5. }
  6. Ray.prototype.planeIntersectPoint = function(planeNormal,planeDistance) {
  7. Polycode.Ray_planeIntersectPoint(this.__ptr, planeNormal,planeDistance)
  8. }
  9. Ray.prototype.tranformByMatrix = function(matrix) {
  10. Polycode.Ray_tranformByMatrix(this.__ptr, matrix)
  11. }
  12. Ray.prototype.closestPointOnRay = function(point) {
  13. Polycode.Ray_closestPointOnRay(this.__ptr, point)
  14. }
  15. Ray.prototype.closestPointsBetween = function(ray2,point1,point2) {
  16. Polycode.Ray_closestPointsBetween(this.__ptr, ray2,point1,point2)
  17. }
  18. Ray.prototype.polygonIntersect = function(v1,v2,v3) {
  19. Polycode.Ray_polygonIntersect(this.__ptr, v1,v2,v3)
  20. }