MyGit
🚩收到GitHub仓库的更新通知

kotlin-graphics/glm

Fork: 19 Star: 121 (更新于 2024-05-18 13:08:02)

license: 暂无

Language: Kotlin .

jvm glm

最后发布版本: v0.9.9.1-build-11 ( 2023-04-26 16:39:28)

GitHub网址

✨免费申请网站SSL证书,支持多域名和泛域名,点击查看

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 elect86@gmail.com.

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

最近版本更新:(数据更新于 2024-04-28 12:52:06)

2023-04-26 16:39:28 v0.9.9.1-build-11

2023-04-25 21:09:31 v0.9.9.1-build-10

2023-04-14 15:15:01 v0.9.9.1-build-9

2023-04-13 21:12:01 v0.9.9.1-build-8

2023-04-04 18:09:11 v0.9.9.1-build-7

2020-09-06 22:03:28 v0.9.9.1-build-3

2020-05-27 17:16:08 v0.9.9.1-build-2

2020-03-09 18:30:07 v0.9.9.1-build-1

2019-12-11 18:15:20 v0.9.9.1-build-0

2019-02-26 22:44:30 v0.9.9.0-build-13

主题(topics):

android, geometry-library, glm, graphics, java, jogl, kotlin, lwjgl, math-library, mathematics, matrices, vectors

kotlin-graphics/glm同语言 Kotlin最近更新仓库

2024-05-17 12:20:56 simondankelmann/Bluetooth-LE-Spam

2024-05-11 02:57:18 markusfisch/BinaryEye

2024-05-10 03:57:07 recloudstream/cloudstream

2024-05-09 14:12:10 tiann/KernelSU

2024-05-09 06:30:21 ReVanced/revanced-patches

2024-05-08 19:57:32 unit-mesh/auto-dev