|
| 1 | +/* |
| 2 | + * Copyright LWJGL. All rights reserved. |
| 3 | + * License terms: https://www.lwjgl.org/license |
| 4 | + * MACHINE GENERATED FILE, DO NOT EDIT |
| 5 | + */ |
| 6 | +#include "common_tools.h" |
| 7 | +#include "lwjgl_malloc.h" |
| 8 | +#define PAR_MALLOC(T, N) ((T*) org_lwjgl_malloc(N * sizeof(T))) |
| 9 | +#define PAR_CALLOC(T, N) ((T*) org_lwjgl_calloc(N, sizeof(T))) |
| 10 | +#define PAR_REALLOC(T, BUF, N) ((T*) org_lwjgl_realloc(BUF, sizeof(T) * N)) |
| 11 | +#define PAR_FREE(BUF) org_lwjgl_free(BUF) |
| 12 | +DISABLE_WARNINGS() |
| 13 | +#define PAR_STREAMLINES_IMPLEMENTATION |
| 14 | +#include "par_streamlines.h" |
| 15 | +ENABLE_WARNINGS() |
| 16 | + |
| 17 | +EXTERN_C_ENTER |
| 18 | + |
| 19 | +JNIEXPORT jlong JNICALL JavaCritical_org_lwjgl_util_par_ParStreamlines_nparsl_1create_1context(jlong configAddress) { |
| 20 | + parsl_config *config = (parsl_config *)(intptr_t)configAddress; |
| 21 | + return (jlong)(intptr_t)parsl_create_context(*config); |
| 22 | +} |
| 23 | +JNIEXPORT jlong JNICALL Java_org_lwjgl_util_par_ParStreamlines_nparsl_1create_1context(JNIEnv *__env, jclass clazz, jlong configAddress) { |
| 24 | + UNUSED_PARAMS(__env, clazz) |
| 25 | + return JavaCritical_org_lwjgl_util_par_ParStreamlines_nparsl_1create_1context(configAddress); |
| 26 | +} |
| 27 | + |
| 28 | +JNIEXPORT void JNICALL JavaCritical_org_lwjgl_util_par_ParStreamlines_nparsl_1destroy_1context(jlong ctxAddress) { |
| 29 | + parsl_context *ctx = (parsl_context *)(intptr_t)ctxAddress; |
| 30 | + parsl_destroy_context(ctx); |
| 31 | +} |
| 32 | +JNIEXPORT void JNICALL Java_org_lwjgl_util_par_ParStreamlines_nparsl_1destroy_1context(JNIEnv *__env, jclass clazz, jlong ctxAddress) { |
| 33 | + UNUSED_PARAMS(__env, clazz) |
| 34 | + JavaCritical_org_lwjgl_util_par_ParStreamlines_nparsl_1destroy_1context(ctxAddress); |
| 35 | +} |
| 36 | + |
| 37 | +JNIEXPORT jlong JNICALL JavaCritical_org_lwjgl_util_par_ParStreamlines_nparsl_1mesh_1from_1lines(jlong ctxAddress, jlong spinesAddress) { |
| 38 | + parsl_context *ctx = (parsl_context *)(intptr_t)ctxAddress; |
| 39 | + parsl_spine_list *spines = (parsl_spine_list *)(intptr_t)spinesAddress; |
| 40 | + return (jlong)(intptr_t)parsl_mesh_from_lines(ctx, *spines); |
| 41 | +} |
| 42 | +JNIEXPORT jlong JNICALL Java_org_lwjgl_util_par_ParStreamlines_nparsl_1mesh_1from_1lines(JNIEnv *__env, jclass clazz, jlong ctxAddress, jlong spinesAddress) { |
| 43 | + UNUSED_PARAMS(__env, clazz) |
| 44 | + return JavaCritical_org_lwjgl_util_par_ParStreamlines_nparsl_1mesh_1from_1lines(ctxAddress, spinesAddress); |
| 45 | +} |
| 46 | + |
| 47 | +JNIEXPORT jlong JNICALL JavaCritical_org_lwjgl_util_par_ParStreamlines_nparsl_1mesh_1from_1streamlines(jlong contextAddress, jlong advectAddress, jint first_tick, jint num_ticks, jlong userdataAddress) { |
| 48 | + parsl_context *context = (parsl_context *)(intptr_t)contextAddress; |
| 49 | + parsl_advection_callback advect = (parsl_advection_callback)(intptr_t)advectAddress; |
| 50 | + void *userdata = (void *)(intptr_t)userdataAddress; |
| 51 | + return (jlong)(intptr_t)parsl_mesh_from_streamlines(context, advect, (uint32_t)first_tick, (uint32_t)num_ticks, userdata); |
| 52 | +} |
| 53 | +JNIEXPORT jlong JNICALL Java_org_lwjgl_util_par_ParStreamlines_nparsl_1mesh_1from_1streamlines(JNIEnv *__env, jclass clazz, jlong contextAddress, jlong advectAddress, jint first_tick, jint num_ticks, jlong userdataAddress) { |
| 54 | + UNUSED_PARAMS(__env, clazz) |
| 55 | + return JavaCritical_org_lwjgl_util_par_ParStreamlines_nparsl_1mesh_1from_1streamlines(contextAddress, advectAddress, first_tick, num_ticks, userdataAddress); |
| 56 | +} |
| 57 | + |
| 58 | +JNIEXPORT jlong JNICALL JavaCritical_org_lwjgl_util_par_ParStreamlines_nparsl_1mesh_1from_1curves_1cubic(jlong contextAddress, jlong spinesAddress) { |
| 59 | + parsl_context *context = (parsl_context *)(intptr_t)contextAddress; |
| 60 | + parsl_spine_list *spines = (parsl_spine_list *)(intptr_t)spinesAddress; |
| 61 | + return (jlong)(intptr_t)parsl_mesh_from_curves_cubic(context, *spines); |
| 62 | +} |
| 63 | +JNIEXPORT jlong JNICALL Java_org_lwjgl_util_par_ParStreamlines_nparsl_1mesh_1from_1curves_1cubic(JNIEnv *__env, jclass clazz, jlong contextAddress, jlong spinesAddress) { |
| 64 | + UNUSED_PARAMS(__env, clazz) |
| 65 | + return JavaCritical_org_lwjgl_util_par_ParStreamlines_nparsl_1mesh_1from_1curves_1cubic(contextAddress, spinesAddress); |
| 66 | +} |
| 67 | + |
| 68 | +JNIEXPORT jlong JNICALL JavaCritical_org_lwjgl_util_par_ParStreamlines_nparsl_1mesh_1from_1curves_1quadratic(jlong contextAddress, jlong spinesAddress) { |
| 69 | + parsl_context *context = (parsl_context *)(intptr_t)contextAddress; |
| 70 | + parsl_spine_list *spines = (parsl_spine_list *)(intptr_t)spinesAddress; |
| 71 | + return (jlong)(intptr_t)parsl_mesh_from_curves_quadratic(context, *spines); |
| 72 | +} |
| 73 | +JNIEXPORT jlong JNICALL Java_org_lwjgl_util_par_ParStreamlines_nparsl_1mesh_1from_1curves_1quadratic(JNIEnv *__env, jclass clazz, jlong contextAddress, jlong spinesAddress) { |
| 74 | + UNUSED_PARAMS(__env, clazz) |
| 75 | + return JavaCritical_org_lwjgl_util_par_ParStreamlines_nparsl_1mesh_1from_1curves_1quadratic(contextAddress, spinesAddress); |
| 76 | +} |
| 77 | + |
| 78 | +EXTERN_C_EXIT |
0 commit comments