Entity.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  1. require('Polycode/EventDispatcher')
  2. function Entity() {
  3. if(arguments[0] != "__skip_ptr__") {
  4. this.__ptr = Polycode.Entity()
  5. }
  6. Object.defineProperties(this, {
  7. 'ownsChildren': { enumerable: true, configurable: true, get: Entity.prototype.__get_ownsChildren, set: Entity.prototype.__set_ownsChildren},
  8. 'billboardMode': { enumerable: true, configurable: true, get: Entity.prototype.__get_billboardMode, set: Entity.prototype.__set_billboardMode},
  9. 'color': { enumerable: true, configurable: true, get: Entity.prototype.__get_color, set: Entity.prototype.__set_color},
  10. 'enabled': { enumerable: true, configurable: true, get: Entity.prototype.__get_enabled, set: Entity.prototype.__set_enabled},
  11. 'visible': { enumerable: true, configurable: true, get: Entity.prototype.__get_visible, set: Entity.prototype.__set_visible},
  12. 'depthWrite': { enumerable: true, configurable: true, get: Entity.prototype.__get_depthWrite, set: Entity.prototype.__set_depthWrite},
  13. 'depthTest': { enumerable: true, configurable: true, get: Entity.prototype.__get_depthTest, set: Entity.prototype.__set_depthTest},
  14. 'colorAffectsChildren': { enumerable: true, configurable: true, get: Entity.prototype.__get_colorAffectsChildren, set: Entity.prototype.__set_colorAffectsChildren},
  15. 'visibilityAffectsChildren': { enumerable: true, configurable: true, get: Entity.prototype.__get_visibilityAffectsChildren, set: Entity.prototype.__set_visibilityAffectsChildren},
  16. 'ignoreParentMatrix': { enumerable: true, configurable: true, get: Entity.prototype.__get_ignoreParentMatrix, set: Entity.prototype.__set_ignoreParentMatrix},
  17. 'enableScissor': { enumerable: true, configurable: true, get: Entity.prototype.__get_enableScissor, set: Entity.prototype.__set_enableScissor},
  18. 'scissorBox': { enumerable: true, configurable: true, get: Entity.prototype.__get_scissorBox, set: Entity.prototype.__set_scissorBox},
  19. 'editorOnly': { enumerable: true, configurable: true, get: Entity.prototype.__get_editorOnly, set: Entity.prototype.__set_editorOnly},
  20. 'id': { enumerable: true, configurable: true, get: Entity.prototype.__get_id, set: Entity.prototype.__set_id},
  21. 'collisionShapeType': { enumerable: true, configurable: true, get: Entity.prototype.__get_collisionShapeType, set: Entity.prototype.__set_collisionShapeType},
  22. 'processInputEvents': { enumerable: true, configurable: true, get: Entity.prototype.__get_processInputEvents, set: Entity.prototype.__set_processInputEvents},
  23. 'blockMouseInput': { enumerable: true, configurable: true, get: Entity.prototype.__get_blockMouseInput, set: Entity.prototype.__set_blockMouseInput},
  24. 'snapToPixels': { enumerable: true, configurable: true, get: Entity.prototype.__get_snapToPixels, set: Entity.prototype.__set_snapToPixels},
  25. 'mouseOver': { enumerable: true, configurable: true, get: Entity.prototype.__get_mouseOver, set: Entity.prototype.__set_mouseOver},
  26. 'rendererVis': { enumerable: true, configurable: true, get: Entity.prototype.__get_rendererVis, set: Entity.prototype.__set_rendererVis},
  27. 'layerID': { enumerable: true, configurable: true, get: Entity.prototype.__get_layerID, set: Entity.prototype.__set_layerID}
  28. })
  29. }
  30. Entity.prototype = Object.create(EventDispatcher.prototype)
  31. Entity.prototype.__get_ownsChildren = function() {
  32. return Polycode.Entity__get_ownsChildren(this.__ptr)
  33. }
  34. Entity.prototype.__set_ownsChildren = function(val) {
  35. Polycode.Entity__set_ownsChildren(this.__ptr, val)
  36. }
  37. Entity.prototype.__get_billboardMode = function() {
  38. return Polycode.Entity__get_billboardMode(this.__ptr)
  39. }
  40. Entity.prototype.__set_billboardMode = function(val) {
  41. Polycode.Entity__set_billboardMode(this.__ptr, val)
  42. }
  43. Entity.prototype.__get_color = function() {
  44. var retVal = new Color("__skip_ptr__")
  45. retVal.__ptr = Polycode.Entity__get_color(this.__ptr)
  46. return retVal
  47. }
  48. Entity.prototype.__set_color = function(val) {
  49. Polycode.Entity__set_color(this.__ptr, val.__ptr)
  50. }
  51. Entity.prototype.__get_enabled = function() {
  52. return Polycode.Entity__get_enabled(this.__ptr)
  53. }
  54. Entity.prototype.__set_enabled = function(val) {
  55. Polycode.Entity__set_enabled(this.__ptr, val)
  56. }
  57. Entity.prototype.__get_visible = function() {
  58. return Polycode.Entity__get_visible(this.__ptr)
  59. }
  60. Entity.prototype.__set_visible = function(val) {
  61. Polycode.Entity__set_visible(this.__ptr, val)
  62. }
  63. Entity.prototype.__get_depthWrite = function() {
  64. return Polycode.Entity__get_depthWrite(this.__ptr)
  65. }
  66. Entity.prototype.__set_depthWrite = function(val) {
  67. Polycode.Entity__set_depthWrite(this.__ptr, val)
  68. }
  69. Entity.prototype.__get_depthTest = function() {
  70. return Polycode.Entity__get_depthTest(this.__ptr)
  71. }
  72. Entity.prototype.__set_depthTest = function(val) {
  73. Polycode.Entity__set_depthTest(this.__ptr, val)
  74. }
  75. Entity.prototype.__get_colorAffectsChildren = function() {
  76. return Polycode.Entity__get_colorAffectsChildren(this.__ptr)
  77. }
  78. Entity.prototype.__set_colorAffectsChildren = function(val) {
  79. Polycode.Entity__set_colorAffectsChildren(this.__ptr, val)
  80. }
  81. Entity.prototype.__get_visibilityAffectsChildren = function() {
  82. return Polycode.Entity__get_visibilityAffectsChildren(this.__ptr)
  83. }
  84. Entity.prototype.__set_visibilityAffectsChildren = function(val) {
  85. Polycode.Entity__set_visibilityAffectsChildren(this.__ptr, val)
  86. }
  87. Entity.prototype.__get_ignoreParentMatrix = function() {
  88. return Polycode.Entity__get_ignoreParentMatrix(this.__ptr)
  89. }
  90. Entity.prototype.__set_ignoreParentMatrix = function(val) {
  91. Polycode.Entity__set_ignoreParentMatrix(this.__ptr, val)
  92. }
  93. Entity.prototype.__get_enableScissor = function() {
  94. return Polycode.Entity__get_enableScissor(this.__ptr)
  95. }
  96. Entity.prototype.__set_enableScissor = function(val) {
  97. Polycode.Entity__set_enableScissor(this.__ptr, val)
  98. }
  99. Entity.prototype.__get_scissorBox = function() {
  100. var retVal = new Rectangle("__skip_ptr__")
  101. retVal.__ptr = Polycode.Entity__get_scissorBox(this.__ptr)
  102. return retVal
  103. }
  104. Entity.prototype.__set_scissorBox = function(val) {
  105. Polycode.Entity__set_scissorBox(this.__ptr, val.__ptr)
  106. }
  107. Entity.prototype.__get_editorOnly = function() {
  108. return Polycode.Entity__get_editorOnly(this.__ptr)
  109. }
  110. Entity.prototype.__set_editorOnly = function(val) {
  111. Polycode.Entity__set_editorOnly(this.__ptr, val)
  112. }
  113. Entity.prototype.__get_id = function() {
  114. return Polycode.Entity__get_id(this.__ptr)
  115. }
  116. Entity.prototype.__set_id = function(val) {
  117. Polycode.Entity__set_id(this.__ptr, val)
  118. }
  119. Entity.prototype.__get_collisionShapeType = function() {
  120. var retVal = new char("__skip_ptr__")
  121. retVal.__ptr = Polycode.Entity__get_collisionShapeType(this.__ptr)
  122. return retVal
  123. }
  124. Entity.prototype.__set_collisionShapeType = function(val) {
  125. Polycode.Entity__set_collisionShapeType(this.__ptr, val.__ptr)
  126. }
  127. Entity.prototype.__get_processInputEvents = function() {
  128. return Polycode.Entity__get_processInputEvents(this.__ptr)
  129. }
  130. Entity.prototype.__set_processInputEvents = function(val) {
  131. Polycode.Entity__set_processInputEvents(this.__ptr, val)
  132. }
  133. Entity.prototype.__get_blockMouseInput = function() {
  134. return Polycode.Entity__get_blockMouseInput(this.__ptr)
  135. }
  136. Entity.prototype.__set_blockMouseInput = function(val) {
  137. Polycode.Entity__set_blockMouseInput(this.__ptr, val)
  138. }
  139. Entity.prototype.__get_snapToPixels = function() {
  140. return Polycode.Entity__get_snapToPixels(this.__ptr)
  141. }
  142. Entity.prototype.__set_snapToPixels = function(val) {
  143. Polycode.Entity__set_snapToPixels(this.__ptr, val)
  144. }
  145. Entity.prototype.__get_mouseOver = function() {
  146. return Polycode.Entity__get_mouseOver(this.__ptr)
  147. }
  148. Entity.prototype.__set_mouseOver = function(val) {
  149. Polycode.Entity__set_mouseOver(this.__ptr, val)
  150. }
  151. Entity.prototype.__get_rendererVis = function() {
  152. return Polycode.Entity__get_rendererVis(this.__ptr)
  153. }
  154. Entity.prototype.__set_rendererVis = function(val) {
  155. Polycode.Entity__set_rendererVis(this.__ptr, val)
  156. }
  157. Entity.prototype.__get_layerID = function() {
  158. var retVal = new char("__skip_ptr__")
  159. retVal.__ptr = Polycode.Entity__get_layerID(this.__ptr)
  160. return retVal
  161. }
  162. Entity.prototype.__set_layerID = function(val) {
  163. Polycode.Entity__set_layerID(this.__ptr, val.__ptr)
  164. }
  165. Entity.prototype.initEntity = function() {
  166. Polycode.Entity_initEntity(this.__ptr)
  167. }
  168. Entity.prototype.Update = function() {
  169. Polycode.Entity_Update(this.__ptr)
  170. }
  171. Entity.prototype.fixedUpdate = function() {
  172. Polycode.Entity_fixedUpdate(this.__ptr)
  173. }
  174. Entity.prototype.dirtyMatrix = function(val) {
  175. Polycode.Entity_dirtyMatrix(this.__ptr, val)
  176. }
  177. Entity.prototype.rebuildTransformMatrix = function() {
  178. Polycode.Entity_rebuildTransformMatrix(this.__ptr)
  179. }
  180. Entity.prototype.updateEntityMatrix = function() {
  181. Polycode.Entity_updateEntityMatrix(this.__ptr)
  182. }
  183. Entity.prototype.getTransformMatrix = function() {
  184. var retVal = new Matrix4("__skip_ptr__")
  185. retVal.__ptr = Polycode.Entity_getTransformMatrix(this.__ptr)
  186. return retVal
  187. }
  188. Entity.prototype.getConcatenatedMatrix = function() {
  189. var retVal = new Matrix4("__skip_ptr__")
  190. retVal.__ptr = Polycode.Entity_getConcatenatedMatrix(this.__ptr)
  191. return retVal
  192. }
  193. Entity.prototype.getAnchorAdjustedMatrix = function() {
  194. var retVal = new Matrix4("__skip_ptr__")
  195. retVal.__ptr = Polycode.Entity_getAnchorAdjustedMatrix(this.__ptr)
  196. return retVal
  197. }
  198. Entity.prototype.getConcatenatedRollMatrix = function() {
  199. var retVal = new Matrix4("__skip_ptr__")
  200. retVal.__ptr = Polycode.Entity_getConcatenatedRollMatrix(this.__ptr)
  201. return retVal
  202. }
  203. Entity.prototype.setTransformByMatrixPure = function(matrix) {
  204. Polycode.Entity_setTransformByMatrixPure(this.__ptr, matrix)
  205. }
  206. Entity.prototype.getLookAtMatrix = function(loc,upVector) {
  207. var retVal = new Matrix4("__skip_ptr__")
  208. retVal.__ptr = Polycode.Entity_getLookAtMatrix(this.__ptr, loc, upVector)
  209. return retVal
  210. }
  211. Entity.prototype.getNumChildren = function() {
  212. return Polycode.Entity_getNumChildren(this.__ptr)
  213. }
  214. Entity.prototype.setOwnsChildrenRecursive = function(val) {
  215. Polycode.Entity_setOwnsChildrenRecursive(this.__ptr, val)
  216. }
  217. Entity.prototype.getPosition = function() {
  218. var retVal = new Vector3("__skip_ptr__")
  219. retVal.__ptr = Polycode.Entity_getPosition(this.__ptr)
  220. return retVal
  221. }
  222. Entity.prototype.getPosition2D = function() {
  223. var retVal = new Vector2("__skip_ptr__")
  224. retVal.__ptr = Polycode.Entity_getPosition2D(this.__ptr)
  225. return retVal
  226. }
  227. Entity.prototype.getCombinedPosition = function() {
  228. var retVal = new Vector3("__skip_ptr__")
  229. retVal.__ptr = Polycode.Entity_getCombinedPosition(this.__ptr)
  230. return retVal
  231. }
  232. Entity.prototype.setPosition = function(x,y,z) {
  233. Polycode.Entity_setPosition(this.__ptr, x, y, z)
  234. }
  235. Entity.prototype.setPositionX = function(x) {
  236. Polycode.Entity_setPositionX(this.__ptr, x)
  237. }
  238. Entity.prototype.setPositionY = function(y) {
  239. Polycode.Entity_setPositionY(this.__ptr, y)
  240. }
  241. Entity.prototype.Translate = function(x,y,z) {
  242. Polycode.Entity_Translate(this.__ptr, x, y, z)
  243. }
  244. Entity.prototype.setPositionZ = function(z) {
  245. Polycode.Entity_setPositionZ(this.__ptr, z)
  246. }
  247. Entity.prototype.setScaleX = function(x) {
  248. Polycode.Entity_setScaleX(this.__ptr, x)
  249. }
  250. Entity.prototype.setScaleY = function(y) {
  251. Polycode.Entity_setScaleY(this.__ptr, y)
  252. }
  253. Entity.prototype.setScaleZ = function(z) {
  254. Polycode.Entity_setScaleZ(this.__ptr, z)
  255. }
  256. Entity.prototype.Scale = function(x,y,z) {
  257. Polycode.Entity_Scale(this.__ptr, x, y, z)
  258. }
  259. Entity.prototype.setScale = function(x,y,z) {
  260. Polycode.Entity_setScale(this.__ptr, x, y, z)
  261. }
  262. Entity.prototype.getCompoundScale = function() {
  263. var retVal = new Vector3("__skip_ptr__")
  264. retVal.__ptr = Polycode.Entity_getCompoundScale(this.__ptr)
  265. return retVal
  266. }
  267. Entity.prototype.getScale = function() {
  268. var retVal = new Vector3("__skip_ptr__")
  269. retVal.__ptr = Polycode.Entity_getScale(this.__ptr)
  270. return retVal
  271. }
  272. Entity.prototype.getRotationEuler = function() {
  273. var retVal = new Vector3("__skip_ptr__")
  274. retVal.__ptr = Polycode.Entity_getRotationEuler(this.__ptr)
  275. return retVal
  276. }
  277. Entity.prototype.getCombinedPitch = function() {
  278. return Polycode.Entity_getCombinedPitch(this.__ptr)
  279. }
  280. Entity.prototype.getCombinedYaw = function() {
  281. return Polycode.Entity_getCombinedYaw(this.__ptr)
  282. }
  283. Entity.prototype.getCombinedRoll = function() {
  284. return Polycode.Entity_getCombinedRoll(this.__ptr)
  285. }
  286. Entity.prototype.rebuildRotation = function() {
  287. Polycode.Entity_rebuildRotation(this.__ptr)
  288. }
  289. Entity.prototype.setRotationEuler = function(rotation) {
  290. Polycode.Entity_setRotationEuler(this.__ptr, rotation)
  291. }
  292. Entity.prototype.setPitch = function(pitch) {
  293. Polycode.Entity_setPitch(this.__ptr, pitch)
  294. }
  295. Entity.prototype.setYaw = function(yaw) {
  296. Polycode.Entity_setYaw(this.__ptr, yaw)
  297. }
  298. Entity.prototype.setRoll = function(roll) {
  299. Polycode.Entity_setRoll(this.__ptr, roll)
  300. }
  301. Entity.prototype.Roll = function(roll) {
  302. Polycode.Entity_Roll(this.__ptr, roll)
  303. }
  304. Entity.prototype.Yaw = function(yaw) {
  305. Polycode.Entity_Yaw(this.__ptr, yaw)
  306. }
  307. Entity.prototype.Pitch = function(pitch) {
  308. Polycode.Entity_Pitch(this.__ptr, pitch)
  309. }
  310. Entity.prototype.getPitch = function() {
  311. return Polycode.Entity_getPitch(this.__ptr)
  312. }
  313. Entity.prototype.getYaw = function() {
  314. return Polycode.Entity_getYaw(this.__ptr)
  315. }
  316. Entity.prototype.getRoll = function() {
  317. return Polycode.Entity_getRoll(this.__ptr)
  318. }
  319. Entity.prototype.getWidth = function() {
  320. return Polycode.Entity_getWidth(this.__ptr)
  321. }
  322. Entity.prototype.getHeight = function() {
  323. return Polycode.Entity_getHeight(this.__ptr)
  324. }
  325. Entity.prototype.getDepth = function() {
  326. return Polycode.Entity_getDepth(this.__ptr)
  327. }
  328. Entity.prototype.setWidth = function(width) {
  329. Polycode.Entity_setWidth(this.__ptr, width)
  330. }
  331. Entity.prototype.setHeight = function(height) {
  332. Polycode.Entity_setHeight(this.__ptr, height)
  333. }
  334. Entity.prototype.setDepth = function(depth) {
  335. Polycode.Entity_setDepth(this.__ptr, depth)
  336. }
  337. Entity.prototype.setRotationQuat = function(w,x,y,z) {
  338. Polycode.Entity_setRotationQuat(this.__ptr, w, x, y, z)
  339. }
  340. Entity.prototype.setRotationByQuaternion = function(quaternion) {
  341. Polycode.Entity_setRotationByQuaternion(this.__ptr, quaternion)
  342. }
  343. Entity.prototype.getRotationQuat = function() {
  344. var retVal = new Quaternion("__skip_ptr__")
  345. retVal.__ptr = Polycode.Entity_getRotationQuat(this.__ptr)
  346. return retVal
  347. }
  348. Entity.prototype.getConcatenatedQuat = function() {
  349. var retVal = new Quaternion("__skip_ptr__")
  350. retVal.__ptr = Polycode.Entity_getConcatenatedQuat(this.__ptr)
  351. return retVal
  352. }
  353. Entity.prototype.lookAt = function(loc,upVector) {
  354. Polycode.Entity_lookAt(this.__ptr, loc, upVector)
  355. }
  356. Entity.prototype.getCombinedColor = function() {
  357. var retVal = new Color("__skip_ptr__")
  358. retVal.__ptr = Polycode.Entity_getCombinedColor(this.__ptr)
  359. return retVal
  360. }
  361. Entity.prototype.setColor = function(r,g,b,a) {
  362. Polycode.Entity_setColor(this.__ptr, r, g, b, a)
  363. }
  364. Entity.prototype.setColorInt = function(r,g,b,a) {
  365. Polycode.Entity_setColorInt(this.__ptr, r, g, b, a)
  366. }
  367. Entity.prototype.setAnchorPoint = function(anchorPoint) {
  368. Polycode.Entity_setAnchorPoint(this.__ptr, anchorPoint)
  369. }
  370. Entity.prototype.getAnchorPoint = function() {
  371. var retVal = new Vector3("__skip_ptr__")
  372. retVal.__ptr = Polycode.Entity_getAnchorPoint(this.__ptr)
  373. return retVal
  374. }
  375. Entity.prototype.onMouseDown = function(ray,mouseButton,timestamp) {
  376. var retVal = new MouseEventResult("__skip_ptr__")
  377. retVal.__ptr = Polycode.Entity_onMouseDown(this.__ptr, ray, mouseButton, timestamp)
  378. return retVal
  379. }
  380. Entity.prototype.onMouseUp = function(ray,mouseButton,timestamp) {
  381. var retVal = new MouseEventResult("__skip_ptr__")
  382. retVal.__ptr = Polycode.Entity_onMouseUp(this.__ptr, ray, mouseButton, timestamp)
  383. return retVal
  384. }
  385. Entity.prototype.onMouseMove = function(ray,timestamp) {
  386. var retVal = new MouseEventResult("__skip_ptr__")
  387. retVal.__ptr = Polycode.Entity_onMouseMove(this.__ptr, ray, timestamp)
  388. return retVal
  389. }
  390. Entity.prototype.onMouseWheelUp = function(ray,timestamp) {
  391. var retVal = new MouseEventResult("__skip_ptr__")
  392. retVal.__ptr = Polycode.Entity_onMouseWheelUp(this.__ptr, ray, timestamp)
  393. return retVal
  394. }
  395. Entity.prototype.onMouseWheelDown = function(ray,timestamp) {
  396. var retVal = new MouseEventResult("__skip_ptr__")
  397. retVal.__ptr = Polycode.Entity_onMouseWheelDown(this.__ptr, ray, timestamp)
  398. return retVal
  399. }
  400. Entity.prototype.setDepthOnly = function(val) {
  401. Polycode.Entity_setDepthOnly(this.__ptr, val)
  402. }
  403. Entity.prototype.getDepthOnly = function() {
  404. return Polycode.Entity_getDepthOnly(this.__ptr)
  405. }
  406. Entity.prototype.setBlendingMode = function(newBlendingMode) {
  407. Polycode.Entity_setBlendingMode(this.__ptr, newBlendingMode)
  408. }
  409. Entity.prototype.getBlendingMode = function() {
  410. return Polycode.Entity_getBlendingMode(this.__ptr)
  411. }
  412. Entity.prototype.getEntityProp = function(propName) {
  413. return Polycode.Entity_getEntityProp(this.__ptr, propName)
  414. }
  415. Entity.prototype.setEntityProp = function(propName,propValue) {
  416. Polycode.Entity_setEntityProp(this.__ptr, propName, propValue)
  417. }
  418. Entity.prototype.setInverseY = function(val) {
  419. Polycode.Entity_setInverseY(this.__ptr, val)
  420. }
  421. Entity.prototype.getInverseY = function() {
  422. return Polycode.Entity_getInverseY(this.__ptr)
  423. }
  424. Entity.prototype.doUpdates = function() {
  425. Polycode.Entity_doUpdates(this.__ptr)
  426. }
  427. Entity.prototype.doFixedUpdates = function() {
  428. Polycode.Entity_doFixedUpdates(this.__ptr)
  429. }
  430. Entity.prototype.buildPositionMatrix = function() {
  431. var retVal = new Matrix4("__skip_ptr__")
  432. retVal.__ptr = Polycode.Entity_buildPositionMatrix(this.__ptr)
  433. return retVal
  434. }
  435. Entity.prototype.customHitDetection = function(ray) {
  436. return Polycode.Entity_customHitDetection(this.__ptr, ray)
  437. }
  438. Entity.prototype.getNumTags = function() {
  439. return Polycode.Entity_getNumTags(this.__ptr)
  440. }
  441. Entity.prototype.getTagAtIndex = function(index) {
  442. return Polycode.Entity_getTagAtIndex(this.__ptr, index)
  443. }
  444. Entity.prototype.hasTag = function(tag) {
  445. return Polycode.Entity_hasTag(this.__ptr, tag)
  446. }
  447. Entity.prototype.clearTags = function() {
  448. Polycode.Entity_clearTags(this.__ptr)
  449. }
  450. Entity.prototype.addTag = function(tag) {
  451. Polycode.Entity_addTag(this.__ptr, tag)
  452. }
  453. Entity.prototype.getScreenPosition = function(projectionMatrix,cameraMatrix,viewport) {
  454. var retVal = new Vector2("__skip_ptr__")
  455. retVal.__ptr = Polycode.Entity_getScreenPosition(this.__ptr, projectionMatrix, cameraMatrix, viewport)
  456. return retVal
  457. }
  458. Entity.prototype.recalculateAABBAllChildren = function() {
  459. Polycode.Entity_recalculateAABBAllChildren(this.__ptr)
  460. }
  461. Entity.prototype.recalculateAABB = function() {
  462. Polycode.Entity_recalculateAABB(this.__ptr)
  463. }
  464. Entity.prototype.getWorldAABB = function() {
  465. var retVal = new AABB("__skip_ptr__")
  466. retVal.__ptr = Polycode.Entity_getWorldAABB(this.__ptr)
  467. return retVal
  468. }
  469. Entity.prototype.getLocalBoundingBox = function() {
  470. var retVal = new Vector3("__skip_ptr__")
  471. retVal.__ptr = Polycode.Entity_getLocalBoundingBox(this.__ptr)
  472. return retVal
  473. }
  474. Entity.prototype.setLocalBoundingBox = function(box) {
  475. Polycode.Entity_setLocalBoundingBox(this.__ptr, box)
  476. }
  477. Entity.prototype.setLocalBoundingBoxX = function(x) {
  478. Polycode.Entity_setLocalBoundingBoxX(this.__ptr, x)
  479. }
  480. Entity.prototype.setLocalBoundingBoxY = function(y) {
  481. Polycode.Entity_setLocalBoundingBoxY(this.__ptr, y)
  482. }
  483. Entity.prototype.setLocalBoundingBoxZ = function(z) {
  484. Polycode.Entity_setLocalBoundingBoxZ(this.__ptr, z)
  485. }
  486. Entity.prototype.attachScript = function(script) {
  487. Polycode.Entity_attachScript(this.__ptr, script)
  488. }
  489. Entity.prototype.getNumScripts = function() {
  490. return Polycode.Entity_getNumScripts(this.__ptr)
  491. }