//void _getOffsetTransform(Matrix4& m) const; void bone__get_offset_transform(const BoneHandle handle, coiMatrix4* m) { const Ogre::Bone* bone = static_cast<const Ogre::Bone*>(handle); Ogre::Matrix4 result; bone->_getOffsetTransform(result); ogre_matrix4_to_llcoi_matrix4(result, *m); }
//void _getBoneMatrices(Matrix4* pMatrices); void skeleton__get_bone_matrices(SkeletonHandle handle, coiMatrix4* matrices[]) { Ogre::Skeleton* skeleton = static_cast<Ogre::Skeleton*>(handle); // Borrowed from OgreEntity.cpp unsigned short num = skeleton->getNumBones(); Ogre::Matrix4* BoneMatrices = static_cast<Ogre::Matrix4*>(OGRE_MALLOC_SIMD(sizeof(Ogre::Matrix4) * num, Ogre::MEMCATEGORY_ANIMATION)); skeleton->_getBoneMatrices(BoneMatrices); for (unsigned short current = 0; current != num; ++current) { Ogre::Matrix4 o_matrix = *BoneMatrices; ogre_matrix4_to_llcoi_matrix4(o_matrix, *matrices[current]); } }
///const Matrix4& _getParentNodeFullTransform(void) const; void movableobject__get_parent_node_full_transform(const MovableObjectHandle handle, coiMatrix4* result) { const Ogre::MovableObject* obj = static_cast<const Ogre::MovableObject*>(handle); const Ogre::Matrix4& xform = obj->_getParentNodeFullTransform(); ogre_matrix4_to_llcoi_matrix4(xform, *result); }