Giter Club home page Giter Club logo

glm's People

Contributors

alicanalbayrak avatar allwritesri avatar elect86 avatar sunny1337 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glm's Issues

Changing arithmetic method names for operator overloading support

There is a nice project here that allows to have operator overloading support.

It is basic but still a huge step for java devs.

There are some drawbacks though at the moment:

    Map<String, String> binary = new HashMap<String, String>() {{
        put("+",    "add");
        put("-",    "subtract");
        put("*",    "multiply");
        put("/",    "divide");
        put("%",    "remainder");
        put("&",    "and");
        put("|",    "or");
        put("^",    "xor");
        put("<<",   "shiftLeft");
        put(">>",   "shiftRight");
        put("<",    compareTo);
        put(">",    compareTo);
        put("<=",   compareTo);
        put(">=",   compareTo);
    }};
    String revSuffix = "Rev";
    Map<String, String> unary = new java.util.HashMap<String, String>() {{
        put("-", "negate");     // jdk7
        put("---", "negate");   // jdk8
        put("~", "not");
    }};
    String   compareTo = "compareTo";
    String   indexGet = "get";
    String[] indexSet = new String[]{"set", "put"};
    String[] valueOf = new String[]{"valueOf", "of"};

Can't use openvr dependency on Android API 14

I tried to add this library on gradle.build to use it on an Android app. It didn't work. Gradle sync fails because openvr requires API 22 runtimes (not sure if it was sync or build that fails.)

So, I looked into the code and found that not much of the code was using openvr. After realising that, I removed a few lines of code to compile without openvr dependency. Gradle synced, the app was built, and obviously, glm worked on the app without any problem.

For anyone having the same problem as I did, refer to my forked repo if you want to see what parts of the code I modified/removed. There are still many Android 4.0 phones out there. My phone is the very example.

Please do not verbatim-copy JOML code

The Mat4d class is almost a verbatim copy of JOML's Matrix4f, including the JavaDocs, whose references do not match anymore, because glm just renamed the class and method names.

Examples:
JOML 1.7.1: https://github.com/JOML-CI/JOML/blob/5b9b0c0aa7e374dba08cfca4fe47bdd9c8cc6d03/src/org/joml/Matrix4f.java#L7283-L7300

glm:

/**
* Compute a normal matrix from the upper left 3x3 submatrix of
* <code>this</code> and store it into the upper left 3x3 submatrix of
* <code>dest</code>. All other values of <code>dest</code> will be set to
* {@link #identity() identity}.
* <p>
* The normal matrix of <tt>m</tt> is the transpose of the inverse of
* <tt>m</tt>.
* <p>
* Please note that, if <code>this</code> is an orthogonal matrix or a
* matrix whose columns are orthogonal vectors, then this method <i>need
* not</i> be invoked, since in that case <code>this</code> itself is its
* normal matrix. In that case, use {@link #set3x3(Matrix4f)} to set a given
* Matrix4f to only the upper left 3x3 submatrix of this matrix.
*
* @see #set3x3(Matrix4f)
*
* @param dest will hold the result
* @return dest
*/
public Mat4d invTransp3(Mat4d dest) {

If you want to copy code and even JavaDoc verbatim, then you should at least give credit or ask for permission.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.