mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:27:04 +02:00
Merge pull request #4560 from AndrewMeadows/bispinor
improved bounding shape calculation for Mery model
This commit is contained in:
commit
d57959503b
1 changed files with 4 additions and 2 deletions
|
@ -685,6 +685,10 @@ void SkeletonModel::computeBoundingShape(const FBXGeometry& geometry) {
|
||||||
* joint.preTransform * glm::mat4_cast(modifiedRotation) * joint.postTransform;
|
* joint.preTransform * glm::mat4_cast(modifiedRotation) * joint.postTransform;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Each joint contributes its point to the bounding box
|
||||||
|
glm::vec3 jointPosition = extractTranslation(transforms[i]);
|
||||||
|
totalExtents.addPoint(jointPosition);
|
||||||
|
|
||||||
Shape* shape = _shapes[i];
|
Shape* shape = _shapes[i];
|
||||||
if (!shape) {
|
if (!shape) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -694,8 +698,6 @@ void SkeletonModel::computeBoundingShape(const FBXGeometry& geometry) {
|
||||||
// that contains the sphere centered at the end of the joint with radius of the bone.
|
// that contains the sphere centered at the end of the joint with radius of the bone.
|
||||||
|
|
||||||
// TODO: skip hand and arm shapes for bounding box calculation
|
// TODO: skip hand and arm shapes for bounding box calculation
|
||||||
glm::vec3 jointPosition = extractTranslation(transforms[i]);
|
|
||||||
|
|
||||||
int type = shape->getType();
|
int type = shape->getType();
|
||||||
if (type == CAPSULE_SHAPE) {
|
if (type == CAPSULE_SHAPE) {
|
||||||
// add the two furthest surface points of the capsule
|
// add the two furthest surface points of the capsule
|
||||||
|
|
Loading…
Reference in a new issue