SceneMesh.js 5.8 KB

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