📄 org_ogre4j_skeleton.cpp
字号:
/* Ogre4J
Copyright (C) 2002 macross
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "org_ogre4j_Skeleton.h"
#include "Ogre4JRoot.h"
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT jobject JNICALL Java_org_ogre4j_Skeleton_createBone__
(JNIEnv *env, jobject obj) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
return OGRE4J.newJRef(OGRE4J.boneClass, o->createBone());
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT jobject JNICALL Java_org_ogre4j_Skeleton_createBone__I
(JNIEnv *env, jobject obj, jint i) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
return OGRE4J.newJRef(OGRE4J.boneClass, o->createBone(i));
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT jobject JNICALL Java_org_ogre4j_Skeleton_createBone__Ljava_lang_String_2
(JNIEnv *env, jobject obj, jstring name) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
const char* _name = env->GetStringUTFChars(name, 0);
Bone* res = o->createBone(_name);
env->ReleaseStringUTFChars(name, _name);
return OGRE4J.newJRef(OGRE4J.boneClass, res);
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT jobject JNICALL Java_org_ogre4j_Skeleton_createBone__Ljava_lang_String_2I
(JNIEnv *env, jobject obj, jstring name, jint i) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
const char* _name = env->GetStringUTFChars(name, 0);
Bone* res = o->createBone(_name, i);
env->ReleaseStringUTFChars(name, _name);
return OGRE4J.newJRef(OGRE4J.boneClass, res);
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT jint JNICALL Java_org_ogre4j_Skeleton_getNumBones
(JNIEnv *env, jobject obj) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
return o->getNumBones();
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT jobject JNICALL Java_org_ogre4j_Skeleton_getRootBone
(JNIEnv *env, jobject obj) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
return OGRE4J.newJRef(OGRE4J.boneClass, o->getRootBone());
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT jobject JNICALL Java_org_ogre4j_Skeleton_getBone__I
(JNIEnv *env, jobject obj, jint i) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
return OGRE4J.newJRef(OGRE4J.boneClass, o->getBone(i));
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT jobject JNICALL Java_org_ogre4j_Skeleton_getBone__Ljava_lang_String_2
(JNIEnv *env, jobject obj, jstring name) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
const char* _name = env->GetStringUTFChars(name, 0);
Bone* res = o->getBone(_name);
env->ReleaseStringUTFChars(name, _name);
return OGRE4J.newJRef(OGRE4J.boneClass, res);
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT void JNICALL Java_org_ogre4j_Skeleton_setBindingPose
(JNIEnv *env, jobject obj) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
o->setBindingPose();
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT void JNICALL Java_org_ogre4j_Skeleton_reset
(JNIEnv *env, jobject obj) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
o->reset();
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT jobject JNICALL Java_org_ogre4j_Skeleton_createAnimation
(JNIEnv *env, jobject obj, jstring name, jfloat len) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
const char* _name = env->GetStringUTFChars(name, 0);
Animation* a = o->createAnimation(_name, len);
env->ReleaseStringUTFChars(name, _name);
return OGRE4J.newJRef(OGRE4J.animationClass, a);
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT jobject JNICALL Java_org_ogre4j_Skeleton_getAnimation__Ljava_lang_String_2
(JNIEnv *env, jobject obj, jstring name) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
const char* _name = env->GetStringUTFChars(name, 0);
Animation* a = o->getAnimation(_name);
env->ReleaseStringUTFChars(name, _name);
return OGRE4J.newJRef(OGRE4J.animationClass, a);
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT void JNICALL Java_org_ogre4j_Skeleton_removeAnimation
(JNIEnv *env, jobject obj, jstring name) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
const char* _name = env->GetStringUTFChars(name, 0);
o->removeAnimation(_name);
env->ReleaseStringUTFChars(name, _name);
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT jint JNICALL Java_org_ogre4j_Skeleton_getNumAnimations
(JNIEnv *, jobject obj) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
return o->getNumAnimations();
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT jobject JNICALL Java_org_ogre4j_Skeleton_getAnimation__I
(JNIEnv *, jobject obj, jint handle) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
return OGRE4J.newJRef(OGRE4J.animationClass, o->getAnimation(handle));
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT jint JNICALL Java_org_ogre4j_Skeleton_getBlendMode
(JNIEnv *env, jobject obj) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
return o->getBlendMode();
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
JNIEXPORT void JNICALL Java_org_ogre4j_Skeleton_setBlendMode
(JNIEnv *env, jobject obj, jint mode) {
Skeleton* o = (Skeleton*)OGRE4J.getCppRef(obj);
o->setBlendMode((SkeletonAnimationBlendMode)mode);
}
//==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==~==
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -