-----------------------------------------------------------------------
| 220 | } |
| 221 | //----------------------------------------------------------------------- |
| 222 | unsigned short SubEntity::getNumWorldTransforms() const |
| 223 | { |
| 224 | if( !mParentEntity->mNumBoneMatrices || !mParentEntity->isHardwareAnimationEnabled() ) |
| 225 | { |
| 226 | // No skeletal animation, or software skinning |
| 227 | return 1; |
| 228 | } |
| 229 | else |
| 230 | { |
| 231 | // Hardware skinning, pass all actually used matrices |
| 232 | const Mesh::IndexMap &indexMap = mSubMesh->useSharedVertices |
| 233 | ? mSubMesh->parent->sharedBlendIndexToBoneIndexMap |
| 234 | : mSubMesh->blendIndexToBoneIndexMap; |
| 235 | assert( indexMap.size() <= mParentEntity->mNumBoneMatrices ); |
| 236 | |
| 237 | return static_cast<unsigned short>( indexMap.size() ); |
| 238 | } |
| 239 | } |
| 240 | //----------------------------------------------------------------------- |
| 241 | Real SubEntity::getSquaredViewDepth( const Camera *cam ) const |
| 242 | { |
no test coverage detected