Jump to content




Matrix4 and Vector4 APIs

api lua utility

5 replies to this topic

#1 Incinirate

  • Members
  • 216 posts
  • LocationDanktown, Memeland

Posted 02 June 2016 - 05:35 AM

So I just got done porting a Matrix4f and a Vector4f api to lua. Decided to release the source in case anyone else needed them. So, here you go.
Matrix4: ewsWU1RZ
Vector4: M45y8y5z

They are created OOP style for your convenience
Usage:
  • Load them in with dofile
    Spoiler
  • To create a matrix4 or vector4 just call Matrix4f() or Vector4f() and an object will be returned
    Spoiler
Available functions:

Matrix4f:
Spoiler

Vector4f:
Spoiler

PS: If you don't know what these functions do, then you probably don't need these APIs.

Note: These apis were ported from this github repo

Please report any bugs you find here and I will fix them! :D Thanks!

#2 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 02 June 2016 - 03:54 PM

Dude, awesome!

#3 jv110

  • Members
  • 108 posts
  • LocationIn front of my PC

Posted 05 June 2016 - 06:19 PM

Well... VertexGL had that (+ quaternion). Not complaining tho, it's pretty good.

#4 Incinirate

  • Members
  • 216 posts
  • LocationDanktown, Memeland

Posted 07 June 2016 - 01:38 AM

View Postjv110, on 05 June 2016 - 06:19 PM, said:

Well... VertexGL had that (+ quaternion). Not complaining tho, it's pretty good.
K.

Well, the libraries that are included in VertexGL are packaged with VertexGL and would need to be seperated from it for use. I posted this purely as a convenience for others. Also, I ended up adding quaternion to this, but I haven't updated the pastebin/op yet.
Thanks though! :)

#5 apemanzilla

  • Members
  • 1,421 posts

Posted 07 June 2016 - 02:44 AM

Psst, return the API tables instead of loading them into _G!

matrix4 = dofile "matrix4"

Edited by apemanzilla, 07 June 2016 - 02:44 AM.


#6 Incinirate

  • Members
  • 216 posts
  • LocationDanktown, Memeland

Posted 07 June 2016 - 02:57 AM

View Postapemanzilla, on 07 June 2016 - 02:44 AM, said:

Psst, return the API tables instead of loading them into _G!

matrix4 = dofile "matrix4"

Yeah, bad habit of mine that I really should stop doing. :P

Edit: Updated pastebins to return the tables

Edited by Incinirate, 07 June 2016 - 03:23 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users