new function to get aiVectorKey size
parent
9e4a499383
commit
bdf813ecf0
|
@ -1340,6 +1340,14 @@ static bool loadCameras(JNIEnv *env, const aiScene* cScene, jobject& jScene)
|
|||
}
|
||||
|
||||
|
||||
JNIEXPORT jint JNICALL Java_jassimp_Jassimp_getVKeysize
|
||||
(JNIEnv *env, jclass jClazz)
|
||||
{
|
||||
const int res = sizeof(aiVectorKey);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_jassimp_Jassimp_getErrorString
|
||||
(JNIEnv *env, jclass jClazz)
|
||||
{
|
||||
|
|
|
@ -70,7 +70,7 @@ public final class AiNodeAnim {
|
|||
/**
|
||||
* Size of one position key entry.
|
||||
*/
|
||||
private static final int POS_KEY_SIZE = 20;
|
||||
private static final int POS_KEY_SIZE = Jassimp.getVKeysize();
|
||||
|
||||
/**
|
||||
* Size of one rotation key entry.
|
||||
|
@ -80,7 +80,7 @@ public final class AiNodeAnim {
|
|||
/**
|
||||
* Size of one scaling key entry.
|
||||
*/
|
||||
private static final int SCALE_KEY_SIZE = 20;
|
||||
private static final int SCALE_KEY_SIZE = Jassimp.getVKeysize();
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -96,6 +96,13 @@ public final class Jassimp {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the size of a struct.<p>
|
||||
*
|
||||
* @return the result of sizeof call
|
||||
*/
|
||||
public static native int getVKeysize();
|
||||
|
||||
/**
|
||||
* Returns a human readable error description.<p>
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue