Entity.js 19 KB

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