Skip to content
This repository was archived by the owner on Jun 19, 2024. It is now read-only.

Commit 535c481

Browse files
committed
add docs
1 parent cc5977e commit 535c481

File tree

2 files changed

+27
-4
lines changed

2 files changed

+27
-4
lines changed

ultralight-java-native/src/main/c/include/ultralight_java/java_bridges/ultralight_matrix4x4_jni.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@
2525
namespace ultralight_java {
2626
class UltralightMatrix4x4JNI {
2727
public:
28+
///
29+
/// Raw 4x4 matrix as an array
30+
///
2831
static jfloatArray get_data(JNIEnv *env, jobject instance);
32+
///
33+
/// Set to identity matrix.
34+
///
2935
static void set_identity(JNIEnv *env, jobject instance);
3036
static jobject create(JNIEnv *env, ultralight::Matrix4x4 matrix);
3137
static jlong construct(JNIEnv *env, jclass caller_class);

ultralight-java-native/src/main/c/include/ultralight_java/java_bridges/ultralight_matrix_jni.hpp

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@
2525
namespace ultralight_java {
2626
class UltralightMatrixJNI {
2727
public:
28+
///
29+
/// Set to another matrix.
30+
///
2831
static void set1(JNIEnv *env, jobject instance, jobject matrix4x4);
2932

33+
///
34+
/// Set from raw 4x4 components.
35+
///
3036
static void set(
3137
JNIEnv *env,
3238
jobject instance,
@@ -47,17 +53,28 @@ namespace ultralight_java {
4753
jdouble m43,
4854
jdouble m44);
4955

56+
///
57+
/// Get this matrix as unaligned 4x4 float components (for use passing to
58+
/// GPU driver APIs).
59+
///
5060
static jobject getMatrix4x4(JNIEnv *env, jobject instance);
5161

52-
static jobject create(JNIEnv *env, ultralight::Matrix matrix);
53-
54-
static jlong construct(JNIEnv *env, jclass caller_class);
55-
62+
///
63+
/// Set to an orthographic projection matrix suitable for use with our
64+
/// vertex shaders. Optionally flip the y-coordinate space (eg, for OpenGL).
65+
///
5666
static void setOrthographicProjection(
5767
JNIEnv *env, jobject instance, jdouble width, jdouble height, jboolean flipY);
5868

69+
///
70+
/// Transform (multiply) by another Matrix
71+
///
5972
static void transform(JNIEnv *env, jobject instance, jobject transformMatrix);
6073

74+
static jobject create(JNIEnv *env, ultralight::Matrix matrix);
75+
76+
static jlong construct(JNIEnv *env, jclass caller_class);
77+
6178
static void _delete(JNIEnv *env, jclass caller_class, jlong handle);
6279
};
6380
} // namespace ultralight_java

0 commit comments

Comments
 (0)