SceneMesh.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. require('Polycode/Entity')
  2. function SceneMesh() {
  3. if(arguments[0] != "__skip_ptr__") {
  4. this.__ptr = Polycode.SceneMesh()
  5. }
  6. Object.defineProperties(this, {
  7. 'lineWidth': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_lineWidth, set: SceneMesh.prototype.__set_lineWidth},
  8. 'lineSmooth': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_lineSmooth, set: SceneMesh.prototype.__set_lineSmooth},
  9. 'pointSmooth': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_pointSmooth, set: SceneMesh.prototype.__set_pointSmooth},
  10. 'useGeometryHitDetection': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_useGeometryHitDetection, set: SceneMesh.prototype.__set_useGeometryHitDetection},
  11. 'backfaceCulled': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_backfaceCulled, set: SceneMesh.prototype.__set_backfaceCulled},
  12. 'sendBoneMatricesToMaterial': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_sendBoneMatricesToMaterial, set: SceneMesh.prototype.__set_sendBoneMatricesToMaterial}
  13. })
  14. }
  15. SceneMesh.prototype = Object.create(Entity.prototype)
  16. SceneMesh.prototype.__get_lineWidth = function() {
  17. return Polycode.SceneMesh__get_lineWidth(this.__ptr)
  18. }
  19. SceneMesh.prototype.__set_lineWidth = function(val) {
  20. Polycode.SceneMesh__set_lineWidth(this.__ptr, val)
  21. }
  22. SceneMesh.prototype.__get_lineSmooth = function() {
  23. return Polycode.SceneMesh__get_lineSmooth(this.__ptr)
  24. }
  25. SceneMesh.prototype.__set_lineSmooth = function(val) {
  26. Polycode.SceneMesh__set_lineSmooth(this.__ptr, val)
  27. }
  28. SceneMesh.prototype.__get_pointSmooth = function() {
  29. return Polycode.SceneMesh__get_pointSmooth(this.__ptr)
  30. }
  31. SceneMesh.prototype.__set_pointSmooth = function(val) {
  32. Polycode.SceneMesh__set_pointSmooth(this.__ptr, val)
  33. }
  34. SceneMesh.prototype.__get_useGeometryHitDetection = function() {
  35. return Polycode.SceneMesh__get_useGeometryHitDetection(this.__ptr)
  36. }
  37. SceneMesh.prototype.__set_useGeometryHitDetection = function(val) {
  38. Polycode.SceneMesh__set_useGeometryHitDetection(this.__ptr, val)
  39. }
  40. SceneMesh.prototype.__get_backfaceCulled = function() {
  41. return Polycode.SceneMesh__get_backfaceCulled(this.__ptr)
  42. }
  43. SceneMesh.prototype.__set_backfaceCulled = function(val) {
  44. Polycode.SceneMesh__set_backfaceCulled(this.__ptr, val)
  45. }
  46. SceneMesh.prototype.__get_sendBoneMatricesToMaterial = function() {
  47. return Polycode.SceneMesh__get_sendBoneMatricesToMaterial(this.__ptr)
  48. }
  49. SceneMesh.prototype.__set_sendBoneMatricesToMaterial = function(val) {
  50. Polycode.SceneMesh__set_sendBoneMatricesToMaterial(this.__ptr, val)
  51. }
  52. SceneMesh.prototype.getShaderPass = function(index) {
  53. var retVal = new ShaderPass("__skip_ptr__")
  54. retVal.__ptr = Polycode.SceneMesh_getShaderPass(this.__ptr, index)
  55. return retVal
  56. }
  57. SceneMesh.prototype.getNumShaderPasses = function() {
  58. return Polycode.SceneMesh_getNumShaderPasses(this.__ptr)
  59. }
  60. SceneMesh.prototype.addShaderPass = function(pass) {
  61. Polycode.SceneMesh_addShaderPass(this.__ptr, pass)
  62. }
  63. SceneMesh.prototype.removeShaderPass = function(shaderIndex) {
  64. Polycode.SceneMesh_removeShaderPass(this.__ptr, shaderIndex)
  65. }
  66. SceneMesh.prototype.getMesh = function() {
  67. var retVal = new Mesh("__skip_ptr__")
  68. retVal.__ptr = Polycode.SceneMesh_getMesh(this.__ptr)
  69. return retVal
  70. }
  71. SceneMesh.prototype.getMaterial = function() {
  72. var retVal = new Material("__skip_ptr__")
  73. retVal.__ptr = Polycode.SceneMesh_getMaterial(this.__ptr)
  74. return retVal
  75. }
  76. SceneMesh.prototype.clearMaterial = function() {
  77. Polycode.SceneMesh_clearMaterial(this.__ptr)
  78. }
  79. SceneMesh.prototype.setMaterial = function(material) {
  80. Polycode.SceneMesh_setMaterial(this.__ptr, material)
  81. }
  82. SceneMesh.prototype.setMesh = function(mesh) {
  83. Polycode.SceneMesh_setMesh(this.__ptr, mesh)
  84. }
  85. SceneMesh.prototype.setSkeleton = function(skeleton) {
  86. Polycode.SceneMesh_setSkeleton(this.__ptr, skeleton)
  87. }
  88. SceneMesh.prototype.getSkeleton = function() {
  89. var retVal = new Skeleton("__skip_ptr__")
  90. retVal.__ptr = Polycode.SceneMesh_getSkeleton(this.__ptr)
  91. return retVal
  92. }
  93. SceneMesh.prototype.setLineWidth = function(newWidth) {
  94. Polycode.SceneMesh_setLineWidth(this.__ptr, newWidth)
  95. }
  96. SceneMesh.prototype.getFilename = function() {
  97. return Polycode.SceneMesh_getFilename(this.__ptr)
  98. }
  99. SceneMesh.prototype.setFilename = function(fileName) {
  100. Polycode.SceneMesh_setFilename(this.__ptr, fileName)
  101. }
  102. SceneMesh.prototype.customHitDetection = function(ray) {
  103. return Polycode.SceneMesh_customHitDetection(this.__ptr, ray)
  104. }
  105. SceneMesh.prototype.setForceMaterial = function(forceMaterial) {
  106. Polycode.SceneMesh_setForceMaterial(this.__ptr, forceMaterial)
  107. }
  108. SceneMesh.prototype.getForceMaterial = function() {
  109. return Polycode.SceneMesh_getForceMaterial(this.__ptr)
  110. }