History

merge with hifi/plugins

Sam Gondelman committed 11 years ago

Commit f69b7552 parents 8fbbb26 95000ee231 files · +6439 −5987Browse files

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

Unified · Split

interface/src/avatar/SkeletonModel.cpp+6−8
@@ -780,7 +780,7 @@ void SkeletonModel::resetShapePositionsToDefaultPose() { · 779 unmodified lines
780 _boundingShape.setRotation(_rotation);780 _boundingShape.setRotation(_rotation);
781}781}
782 782
783void SkeletonModel::renderBoundingCollisionShapes(float alpha) {783void SkeletonModel::renderBoundingCollisionShapes(gpu::Batch& batch, float alpha) {
784 const int BALL_SUBDIVISIONS = 10;784 const int BALL_SUBDIVISIONS = 10;
785#if 0785#if 0
786 if (_shapes.isEmpty()) {786 if (_shapes.isEmpty()) {
@@ -788,17 +788,17 @@ void SkeletonModel::renderBoundingCollisionShapes(float alpha) { · 1 unmodified line
788 // so no need to render it788 // so no need to render it
789 return;789 return;
790 }790 }
791 glPushMatrix();
792
793 Application::getInstance()->loadTranslatedViewMatrix(_translation);791 Application::getInstance()->loadTranslatedViewMatrix(_translation);
794 792
795 // draw a blue sphere at the capsule endpoint793 // draw a blue sphere at the capsule endpoint
796 glm::vec3 endPoint;794 glm::vec3 endPoint;
797 _boundingShape.getEndPoint(endPoint);795 _boundingShape.getEndPoint(endPoint);
798 endPoint = endPoint - _translation;796 endPoint = endPoint - _translation;
799 glTranslatef(endPoint.x, endPoint.y, endPoint.z);797 Transform transform = Transform();
798 transform.setTranslation(endPoint);
799 batch.setModelTransform(transform);
800 auto geometryCache = DependencyManager::get<GeometryCache>();800 auto geometryCache = DependencyManager::get<GeometryCache>();
801 geometryCache->renderSphere(_boundingShape.getRadius(), BALL_SUBDIVISIONS, BALL_SUBDIVISIONS, glm::vec4(0.6f, 0.6f, 0.8f, alpha));801 geometryCache->renderSphere(batch, _boundingShape.getRadius(), BALL_SUBDIVISIONS, BALL_SUBDIVISIONS, glm::vec4(0.6f, 0.6f, 0.8f, alpha));
802 802
803 // draw a yellow sphere at the capsule startpoint803 // draw a yellow sphere at the capsule startpoint
804 glm::vec3 startPoint;804 glm::vec3 startPoint;
@@ -810,9 +810,7 @@ void SkeletonModel::renderBoundingCollisionShapes(float alpha) { · 5 unmodified lines
810 810
811 // draw a green cylinder between the two points811 // draw a green cylinder between the two points
812 glm::vec3 origin(0.0f);812 glm::vec3 origin(0.0f);
813 Avatar::renderJointConnectingCone( origin, axis, _boundingShape.getRadius(), _boundingShape.getRadius(), glm::vec4(0.6f, 0.8f, 0.6f, alpha));813 Avatar::renderJointConnectingCone(batch, origin, axis, _boundingShape.getRadius(), _boundingShape.getRadius(), glm::vec4(0.6f, 0.8f, 0.6f, alpha));
814
815 glPopMatrix();
816#endif814#endif
817}815}
818 816

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