Camera.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. function Camera() {
  2. }
  3. Camera.prototype.buildFrustumPlanes = function() {
  4. Polycode.Camera_buildFrustumPlanes(this.__ptr)
  5. }
  6. Camera.prototype.isSphereInFrustum = function(pos,fRadius) {
  7. Polycode.Camera_isSphereInFrustum(this.__ptr, pos,fRadius)
  8. }
  9. Camera.prototype.isAABBInFrustum = function(aabb) {
  10. Polycode.Camera_isAABBInFrustum(this.__ptr, aabb)
  11. }
  12. Camera.prototype.setOrthoMode = function(mode) {
  13. Polycode.Camera_setOrthoMode(this.__ptr, mode)
  14. }
  15. Camera.prototype.setOrthoSize = function(orthoSizeX,orthoSizeY) {
  16. Polycode.Camera_setOrthoSize(this.__ptr, orthoSizeX,orthoSizeY)
  17. }
  18. Camera.prototype.setFrustumMode = function(left,right,bottom,top,front,back) {
  19. Polycode.Camera_setFrustumMode(this.__ptr, left,right,bottom,top,front,back)
  20. }
  21. Camera.prototype.getOrthoMode = function() {
  22. Polycode.Camera_getOrthoMode(this.__ptr)
  23. }
  24. Camera.prototype.getOrthoSizeX = function() {
  25. Polycode.Camera_getOrthoSizeX(this.__ptr)
  26. }
  27. Camera.prototype.getOrthoSizeY = function() {
  28. Polycode.Camera_getOrthoSizeY(this.__ptr)
  29. }
  30. Camera.prototype.setFOV = function(fov) {
  31. Polycode.Camera_setFOV(this.__ptr, fov)
  32. }
  33. Camera.prototype.getFOV = function() {
  34. Polycode.Camera_getFOV(this.__ptr)
  35. }
  36. Camera.prototype.setClippingPlanes = function(nearClipPlane,farClipPlane) {
  37. Polycode.Camera_setClippingPlanes(this.__ptr, nearClipPlane,farClipPlane)
  38. }
  39. Camera.prototype.getNearClippingPlane = function() {
  40. Polycode.Camera_getNearClippingPlane(this.__ptr)
  41. }
  42. Camera.prototype.getFarClippingPlane = function() {
  43. Polycode.Camera_getFarClippingPlane(this.__ptr)
  44. }
  45. Camera.prototype.setParentScene = function(parentScene) {
  46. Polycode.Camera_setParentScene(this.__ptr, parentScene)
  47. }
  48. Camera.prototype.getParentScene = function() {
  49. Polycode.Camera_getParentScene(this.__ptr)
  50. }
  51. Camera.prototype.createProjectionMatrix = function() {
  52. Polycode.Camera_createProjectionMatrix(this.__ptr)
  53. }
  54. Camera.prototype.hasFilterShader = function() {
  55. Polycode.Camera_hasFilterShader(this.__ptr)
  56. }
  57. Camera.prototype.drawFilter = function(targetBuffer) {
  58. Polycode.Camera_drawFilter(this.__ptr, targetBuffer)
  59. }
  60. Camera.prototype.setPostFilter = function(material) {
  61. Polycode.Camera_setPostFilter(this.__ptr, material)
  62. }
  63. Camera.prototype.setPostFilterByName = function(shaderName) {
  64. Polycode.Camera_setPostFilterByName(this.__ptr, shaderName)
  65. }
  66. Camera.prototype.removePostFilter = function() {
  67. Polycode.Camera_removePostFilter(this.__ptr)
  68. }
  69. Camera.prototype.getScreenShaderMaterial = function() {
  70. Polycode.Camera_getScreenShaderMaterial(this.__ptr)
  71. }
  72. Camera.prototype.Clone = function(deepClone,ignoreEditorOnly) {
  73. Polycode.Camera_Clone(this.__ptr, deepClone,ignoreEditorOnly)
  74. }
  75. Camera.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
  76. Polycode.Camera_applyClone(this.__ptr, clone,deepClone,ignoreEditorOnly)
  77. }
  78. Camera.prototype.getProjectionMatrix = function() {
  79. Polycode.Camera_getProjectionMatrix(this.__ptr)
  80. }
  81. Camera.prototype.setCustomProjectionMatrix = function(matrix) {
  82. Polycode.Camera_setCustomProjectionMatrix(this.__ptr, matrix)
  83. }
  84. Camera.prototype.getViewport = function() {
  85. Polycode.Camera_getViewport(this.__ptr)
  86. }
  87. Camera.prototype.setViewport = function(viewport) {
  88. Polycode.Camera_setViewport(this.__ptr, viewport)
  89. }
  90. Camera.prototype.setOrthoSizeMode = function(orthoSizeMode) {
  91. Polycode.Camera_setOrthoSizeMode(this.__ptr, orthoSizeMode)
  92. }
  93. Camera.prototype.getOrthoSizeMode = function() {
  94. Polycode.Camera_getOrthoSizeMode(this.__ptr)
  95. }
  96. Camera.prototype.setProjectionMode = function(mode) {
  97. Polycode.Camera_setProjectionMode(this.__ptr, mode)
  98. }
  99. Camera.prototype.getProjectionMode = function() {
  100. Polycode.Camera_getProjectionMode(this.__ptr)
  101. }
  102. Camera.prototype.projectRayFrom2DCoordinate = function(coordinate,viewport) {
  103. Polycode.Camera_projectRayFrom2DCoordinate(this.__ptr, coordinate,viewport)
  104. }
  105. Camera.prototype.renderFullScreenQuad = function(drawBuffer,shaderPass) {
  106. Polycode.Camera_renderFullScreenQuad(this.__ptr, drawBuffer,shaderPass)
  107. }
  108. Camera.prototype.getShaderPass = function(index) {
  109. Polycode.Camera_getShaderPass(this.__ptr, index)
  110. }
  111. Camera.prototype.getNumShaderPasses = function() {
  112. Polycode.Camera_getNumShaderPasses(this.__ptr)
  113. }