move_particles   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/particles.xtm

Implementation

(bind-func move_particles
  "move the particles_verts according to their velocities"
  (lambda (np:i64 step:float)
    (let ((p:float* null))
      (doloop (i np)
        (set! p (pref-ptr particles_verts (* i 4)))
        ;; update x pos
        (pset! p 0 (% (+ (pref p 0)
                         (* (pref p 2) step))
                      1.0))
        ;; update y pos
        (pset! p 1 (% (+ (pref p 1)
                         (* (pref p 3) step))
                      1.0))))))


Back to Index

Similar Entries

  • Widget_type_remove_flags    xtlang
  • aiProcess_RemoveComponent    scheme
  • aiProcess_RemoveRedundantMaterials    scheme
  • analogue_remove_file    xtlang
  • cerberus_remove_file    xtlang
  • cl:remove    scheme
  • cl:remove-duplicates    scheme
  • cl:remove-if    scheme
  • cl:remove-if-not    scheme
  • create_particles_shader    xtlang
  • distribute_particles    xtlang
  • gl_draw_particles    xtlang
  • impc:ti:remove-polyfunc-candidate    scheme
  • impc:ti:remove-single-element-lists    scheme
  • is_touch_move    xtlang
  • move_triangle    xtlang
  • particles-frag    scheme
  • particles-frag    scheme
  • particles-vert    scheme
  • particles-vert    scheme
  • pc:move-chord    scheme
  • remove    scheme
  • remove-all    scheme
  • remove-first    scheme
  • remove-func    macro
  • set-data-particles    xtlang
  • sys_dir_remove    xtlang
  • sys_file_remove    xtlang
  • sys_g_remove    xtlang