new function to get aiVectorKey size

pull/514/head
Ser Lev Arris 2015-03-27 18:09:39 +01:00
parent 9e4a499383
commit bdf813ecf0
3 changed files with 17 additions and 2 deletions

View File

@ -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 JNIEXPORT jstring JNICALL Java_jassimp_Jassimp_getErrorString
(JNIEnv *env, jclass jClazz) (JNIEnv *env, jclass jClazz)
{ {

View File

@ -70,7 +70,7 @@ public final class AiNodeAnim {
/** /**
* Size of one position key entry. * 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. * Size of one rotation key entry.
@ -80,7 +80,7 @@ public final class AiNodeAnim {
/** /**
* Size of one scaling key entry. * Size of one scaling key entry.
*/ */
private static final int SCALE_KEY_SIZE = 20; private static final int SCALE_KEY_SIZE = Jassimp.getVKeysize();
/** /**

View File

@ -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> * Returns a human readable error description.<p>
* *