| 5533 | } |
| 5534 | |
| 5535 | void Player::getRenderEyeTransform(MatrixF* mat) |
| 5536 | { |
| 5537 | getRenderEyeBaseTransform(mat, true); |
| 5538 | |
| 5539 | // Use the first image that is set to use the eye node |
| 5540 | for (U32 i=0; i<ShapeBase::MaxMountedImages; ++i) |
| 5541 | { |
| 5542 | MountedImage& image = mMountedImageList[i]; |
| 5543 | if (image.dataBlock) |
| 5544 | { |
| 5545 | ShapeBaseImageData& data = *image.dataBlock; |
| 5546 | U32 shapeIndex = getImageShapeIndex(image); |
| 5547 | if ( data.useEyeNode && isFirstPerson() && data.eyeMountNode[shapeIndex] != -1 && data.eyeNode[shapeIndex] != -1 ) |
| 5548 | { |
| 5549 | // Get the eye node's position relative to the eye mount node |
| 5550 | MatrixF mountTransform = image.shapeInstance[shapeIndex]->mNodeTransforms[data.eyeMountNode[shapeIndex]]; |
| 5551 | Point3F eyeMountNodePos = mountTransform.getPosition(); |
| 5552 | mountTransform = image.shapeInstance[shapeIndex]->mNodeTransforms[data.eyeNode[shapeIndex]]; |
| 5553 | Point3F eyeNodePos = mountTransform.getPosition() - eyeMountNodePos; |
| 5554 | |
| 5555 | // Now transform to the image's eye node (position only) |
| 5556 | MatrixF xfm(true); |
| 5557 | xfm.setPosition(eyeNodePos); |
| 5558 | mat->mul(xfm); |
| 5559 | |
| 5560 | return; |
| 5561 | } |
| 5562 | } |
| 5563 | } |
| 5564 | } |
| 5565 | |
| 5566 | void Player::getRenderEyeBaseTransform(MatrixF* mat, bool includeBank) |
| 5567 | { |
no test coverage detected