VEC3 and EasyObject Libraries updated.

Posted by on May 10, 2009

Today I updated both VEC3 and EasyObject, the download links remain the same.

VEC3 got angle helpers (now you can easily find the angle between two vec3, etc) as well as a curve function to smoothly interpolate variables (you can see it in action in one of the new examples where an enemy turret slowly aims toward the player).

EasyObject now allows you to send a user variable on all iterators. New example provided (particles)


4 Comments on VEC3 and EasyObject Libraries updated.

Respond | Trackback

  1. Tenzo says:

    ok I owe you an apology you do keep your stuff up to date!

    now to the questions: is it way slower to use the iterators rather than doing a foreach loop yourself? also why isn’t there a method to obtain the list name?

    will you implement other templates like this one? (vector, list, map they all come to mind)

    • admin says:

      The only overhead lies in the function calls. The list name is not attainable because it’s not within the scope of an object factory, however you can easily deduce it (take a look at the source).
      I’d like others to implement useful templates to ultimately mimic the STL but I think that won’t happen any time soon…

  2. danny says:

    hi i wanted to know if you have a matrix library just like this vector one you made? i cant find anything on the net. i just want an easy and fast lib for matrices but its all gibberish to me!

    by the way could you add “is greater than” and similar routines to the vector lib? im working on a pathfinder algorithm and i found those functions quite useful. send me an email if you want me to forward the code!

    • admin says:

      The MAT4_VECTOR library actually exists, but it’s unfinished. Do you want to define model/view/projection matrices? (To pass over OpenGL for instance) or do you need to define SRT transformation for your objects?, the latter would require a specific SRT library rather than just using a 4×4 matrix for each object (it’s quite expensive otherwise and I’d recommend a 3×3 matrix anyway, but it obviously depends on your needs).

      Ideally I would simply implement a template solution for matrices, but because the PB compiler cannot unroll loops at the time being, it wouldn’t be an efficient library at all. (We already lack MMX/SSE* intrinsics and whatnot…)

      I just added the methods you asked for in VEC3, thanks for the suggestion!. I’ll be fixing a few minor details and releasing the new version soon, perhaps with new examples to go with it.