ProductPromotion
Logo

Kotlin

made by https://0x3d.site

GitHub - kotlin-graphics/glm: jvm glm
jvm glm. Contribute to kotlin-graphics/glm development by creating an account on GitHub.
Visit Site

GitHub - kotlin-graphics/glm: jvm glm

GitHub - kotlin-graphics/glm: jvm glm

glm

Build Status license Release Size Github All Releases Awesome Kotlin Badge

This is the Kotlin port of OpenGL Mathematics (GLM), written by g-truc (repository), a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specifications.

GLM provides classes and functions designed and implemented with the same naming conventions and functionality than GLSL so that anyone who knows GLSL, can use GLM as well in Kotlin and Java.

This project isn't limited to GLSL features. An extension system, based on the GLSL extension conventions, provides extended capabilities: matrix transformations, quaternions, data packing, random numbers, noise, etc...

This library works perfectly with OpenGL but it also ensures interoperability with other third party libraries and SDK. It is a good candidate for software rendering (raytracing / rasterisation), image processing, physic simulations and any development context that requires a simple and convenient mathematics library.

GLM is written entirely in Kotlin, but can be also used from Java. It is a platform independent library with no dependences other than kotlin-unsigned for unsigned support and kotlin-test for testing.

For more information about GLM, please have a look at the manual and the original API reference documentation. The source code and the documentation are licensed under both the Happy Bunny License (Modified MIT) or the MIT License.

Don't hesitate to contribute to the project by submitting issues or pull requests for bugs and features. Any feedback is welcome at [email protected].

import glm_.vec2.Vec2
import glm_.vec3.Vec3
import glm_.mat4x4.Mat4
import glm_.glm

fun camera(translate: Float, rotate: Vec2): Mat4 {
    val projection = glm.perspective(glm.PIf * 0.25f, 4.0f / 3.0f, 0.1f, 100.0f)
    var view = glm.translate(Mat4(1.0f), Vec3(0.0f, 0.0f, -translate))
    view = glm.rotate(view, rotate.y, Vec3(-1.0f, 0.0f, 0.0f))
    view = glm.rotate(view, rotate.x, Vec3(0.0f, 1.0f, 0.0f))
    val model = glm.scale(Mat4(1.0f), Vec3(0.5f))
    return projection * view * model
}

How to retrieve it:

mary

repositories {
    maven("https://raw.githubusercontent.com/kotlin-graphics/mary/master")
    // or with magik plugin
    //github("kotlin-graphics/mary")
}
dependencies {
    implementation("kotlin.graphics:glm:0.9.9.1-11")
}

maven central

dependencies {
    implementation("io.github.kotlin-graphics:glm:0.9.9.1-12")
}

You can find more info by mary

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory