Exemple #1
0
	int Java_zte_irrlib_scene_SceneNode_nativeRemoveAnimator(
		JNIEnv*  env, jobject thiz, jint count, jint Id)
	{
		ISceneNode* node = smgr->getSceneNodeFromId(Id);
		if (!node) 
		{
			WARN_NODE_NOT_FOUND(Id, RemoveAnimator);
			return -1;
		}
		const core::list<ISceneNodeAnimator*> anims = node->getAnimators();
		core::list<ISceneNodeAnimator*>::ConstIterator itr = anims.begin();
		while (count--) itr++;
		node->removeAnimator(*itr);
		return 0;
	}
Exemple #2
0
	int Java_zte_irrlib_scene_SceneNode_nativeRemoveLastAnimator(
		JNIEnv *env, jobject defaultObj, jint id)
	{
		ISceneNode* node = smgr->getSceneNodeFromId(id);
		if (!node) 
		{
			WARN_NODE_NOT_FOUND(id, RemoveAllAnimator);
			return -1;
		}
		
		const core::list<ISceneNodeAnimator*> anims = node->getAnimators();
		if (anims.empty()) return -2;
		node->removeAnimator(*(anims.getLast()));
		return 0;
	}