SceneMesh.js 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. function SceneMesh() {
  2. Object.defineProperties(this, {
  3. 'lineWidth': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_lineWidth, set: SceneMesh.prototype.__set_lineWidth},
  4. 'lineSmooth': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_lineSmooth, set: SceneMesh.prototype.__set_lineSmooth},
  5. 'pointSmooth': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_pointSmooth, set: SceneMesh.prototype.__set_pointSmooth},
  6. 'ownsMesh': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_ownsMesh, set: SceneMesh.prototype.__set_ownsMesh},
  7. 'ownsSkeleton': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_ownsSkeleton, set: SceneMesh.prototype.__set_ownsSkeleton},
  8. 'useGeometryHitDetection': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_useGeometryHitDetection, set: SceneMesh.prototype.__set_useGeometryHitDetection},
  9. 'alphaTest': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_alphaTest, set: SceneMesh.prototype.__set_alphaTest},
  10. 'backfaceCulled': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_backfaceCulled, set: SceneMesh.prototype.__set_backfaceCulled},
  11. 'sendBoneMatricesToMaterial': { enumerable: true, configurable: true, get: SceneMesh.prototype.__get_sendBoneMatricesToMaterial, set: SceneMesh.prototype.__set_sendBoneMatricesToMaterial}
  12. })
  13. }
  14. SceneMesh.prototype.__get_lineWidth = function() {
  15. return Polycode.SceneMesh__get_lineWidth(this.__ptr)
  16. }
  17. SceneMesh.prototype.__set_lineWidth = function(val) {
  18. Polycode.SceneMesh__set_lineWidth(this.__ptr, val)
  19. }
  20. SceneMesh.prototype.__get_lineSmooth = function() {
  21. return Polycode.SceneMesh__get_lineSmooth(this.__ptr)
  22. }
  23. SceneMesh.prototype.__set_lineSmooth = function(val) {
  24. Polycode.SceneMesh__set_lineSmooth(this.__ptr, val)
  25. }
  26. SceneMesh.prototype.__get_pointSmooth = function() {
  27. return Polycode.SceneMesh__get_pointSmooth(this.__ptr)
  28. }
  29. SceneMesh.prototype.__set_pointSmooth = function(val) {
  30. Polycode.SceneMesh__set_pointSmooth(this.__ptr, val)
  31. }
  32. SceneMesh.prototype.__get_ownsMesh = function() {
  33. return Polycode.SceneMesh__get_ownsMesh(this.__ptr)
  34. }
  35. SceneMesh.prototype.__set_ownsMesh = function(val) {
  36. Polycode.SceneMesh__set_ownsMesh(this.__ptr, val)
  37. }
  38. SceneMesh.prototype.__get_ownsSkeleton = function() {
  39. return Polycode.SceneMesh__get_ownsSkeleton(this.__ptr)
  40. }
  41. SceneMesh.prototype.__set_ownsSkeleton = function(val) {
  42. Polycode.SceneMesh__set_ownsSkeleton(this.__ptr, val)
  43. }
  44. SceneMesh.prototype.__get_useGeometryHitDetection = function() {
  45. return Polycode.SceneMesh__get_useGeometryHitDetection(this.__ptr)
  46. }
  47. SceneMesh.prototype.__set_useGeometryHitDetection = function(val) {
  48. Polycode.SceneMesh__set_useGeometryHitDetection(this.__ptr, val)
  49. }
  50. SceneMesh.prototype.__get_alphaTest = function() {
  51. return Polycode.SceneMesh__get_alphaTest(this.__ptr)
  52. }
  53. SceneMesh.prototype.__set_alphaTest = function(val) {
  54. Polycode.SceneMesh__set_alphaTest(this.__ptr, val)
  55. }
  56. SceneMesh.prototype.__get_backfaceCulled = function() {
  57. return Polycode.SceneMesh__get_backfaceCulled(this.__ptr)
  58. }
  59. SceneMesh.prototype.__set_backfaceCulled = function(val) {
  60. Polycode.SceneMesh__set_backfaceCulled(this.__ptr, val)
  61. }
  62. SceneMesh.prototype.__get_sendBoneMatricesToMaterial = function() {
  63. return Polycode.SceneMesh__get_sendBoneMatricesToMaterial(this.__ptr)
  64. }
  65. SceneMesh.prototype.__set_sendBoneMatricesToMaterial = function(val) {
  66. Polycode.SceneMesh__set_sendBoneMatricesToMaterial(this.__ptr, val)
  67. }
  68. SceneMesh.prototype.Render = function(buffer) {
  69. Polycode.SceneMesh_Render(this.__ptr, buffer)
  70. }
  71. SceneMesh.prototype.getShaderPass = function(index) {
  72. var retVal = new ShaderPass()
  73. retVal.__ptr = Polycode.SceneMesh_getShaderPass(this.__ptr, index)
  74. return retVal
  75. }
  76. SceneMesh.prototype.getNumShaderPasses = function() {
  77. return Polycode.SceneMesh_getNumShaderPasses(this.__ptr)
  78. }
  79. SceneMesh.prototype.addShaderPass = function(pass) {
  80. Polycode.SceneMesh_addShaderPass(this.__ptr, pass)
  81. }
  82. SceneMesh.prototype.removeShaderPass = function(shaderIndex) {
  83. Polycode.SceneMesh_removeShaderPass(this.__ptr, shaderIndex)
  84. }
  85. SceneMesh.prototype.getMesh = function() {
  86. var retVal = new Mesh()
  87. retVal.__ptr = Polycode.SceneMesh_getMesh(this.__ptr)
  88. return retVal
  89. }
  90. SceneMesh.prototype.getMaterial = function() {
  91. var retVal = new Material()
  92. retVal.__ptr = Polycode.SceneMesh_getMaterial(this.__ptr)
  93. return retVal
  94. }
  95. SceneMesh.prototype.loadSkeleton = function(fileName) {
  96. var retVal = new Skeleton()
  97. retVal.__ptr = Polycode.SceneMesh_loadSkeleton(this.__ptr, fileName)
  98. return retVal
  99. }
  100. SceneMesh.prototype.clearMaterial = function() {
  101. Polycode.SceneMesh_clearMaterial(this.__ptr)
  102. }
  103. SceneMesh.prototype.setMaterial = function(material) {
  104. Polycode.SceneMesh_setMaterial(this.__ptr, material)
  105. }
  106. SceneMesh.prototype.setMaterialByName = function(materialName,resourcePool) {
  107. Polycode.SceneMesh_setMaterialByName(this.__ptr, materialName,resourcePool)
  108. }
  109. SceneMesh.prototype.setMesh = function(mesh) {
  110. Polycode.SceneMesh_setMesh(this.__ptr, mesh)
  111. }
  112. SceneMesh.prototype.setSkeleton = function(skeleton) {
  113. Polycode.SceneMesh_setSkeleton(this.__ptr, skeleton)
  114. }
  115. SceneMesh.prototype.getSkeleton = function() {
  116. var retVal = new Skeleton()
  117. retVal.__ptr = Polycode.SceneMesh_getSkeleton(this.__ptr)
  118. return retVal
  119. }
  120. SceneMesh.prototype.applySkeletonLocally = function() {
  121. Polycode.SceneMesh_applySkeletonLocally(this.__ptr)
  122. }
  123. SceneMesh.prototype.setLineWidth = function(newWidth) {
  124. Polycode.SceneMesh_setLineWidth(this.__ptr, newWidth)
  125. }
  126. SceneMesh.prototype.getFilename = function() {
  127. return Polycode.SceneMesh_getFilename(this.__ptr)
  128. }
  129. SceneMesh.prototype.setFilename = function(fileName) {
  130. Polycode.SceneMesh_setFilename(this.__ptr, fileName)
  131. }
  132. SceneMesh.prototype.loadFromFile = function(fileName) {
  133. Polycode.SceneMesh_loadFromFile(this.__ptr, fileName)
  134. }
  135. SceneMesh.prototype.customHitDetection = function(ray) {
  136. return Polycode.SceneMesh_customHitDetection(this.__ptr, ray)
  137. }
  138. SceneMesh.prototype.setForceMaterial = function(forceMaterial) {
  139. Polycode.SceneMesh_setForceMaterial(this.__ptr, forceMaterial)
  140. }
  141. SceneMesh.prototype.getForceMaterial = function() {
  142. return Polycode.SceneMesh_getForceMaterial(this.__ptr)
  143. }
  144. SceneMesh.prototype.Clone = function(deepClone,ignoreEditorOnly) {
  145. var retVal = new Entity()
  146. retVal.__ptr = Polycode.SceneMesh_Clone(this.__ptr, deepClone,ignoreEditorOnly)
  147. return retVal
  148. }
  149. SceneMesh.prototype.applyClone = function(clone,deepClone,ignoreEditorOnly) {
  150. Polycode.SceneMesh_applyClone(this.__ptr, clone,deepClone,ignoreEditorOnly)
  151. }