History

Set clip near distance per skeleton model if no separate head model

David Rowe committed 11 years ago

Commit a04bd091 parent 468b62e3 files · +22 −4Browse files

Showing the changes to interface/src/avatar/SkeletonModel.cpp (1 of 3 files). Show all

Unified · Split

interface/src/avatar/SkeletonModel.cpp+6−1
@@ -37,7 +37,8 @@ SkeletonModel::SkeletonModel(Avatar* owningAvatar, QObject* parent) : · 36 unmodified lines
37 _defaultEyeModelPosition(glm::vec3(0.0f, 0.0f, 0.0f)),37 _defaultEyeModelPosition(glm::vec3(0.0f, 0.0f, 0.0f)),
38 _standingFoot(NO_FOOT),38 _standingFoot(NO_FOOT),
39 _standingOffset(0.0f),39 _standingOffset(0.0f),
40 _clampedFootPosition(0.0f)40 _clampedFootPosition(0.0f),
41 _headClipDistance(DEFAULT_NEAR_CLIP)
41{42{
42}43}
43 44
@@ -78,6 +79,10 @@ void SkeletonModel::setJointStates(QVector<JointState> states) { · 34 unmodified lines
78 buildShapes();79 buildShapes();
79 }80 }
80 81
82 Extents meshExtents = getMeshExtents();
83 _headClipDistance = -(meshExtents.minimum.z / _scale.z - _defaultEyeModelPosition.z);
84 _headClipDistance = std::max(_headClipDistance, DEFAULT_NEAR_CLIP);
85
81 emit skeletonLoaded();86 emit skeletonLoaded();
82}87}
83 88

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t