remove unused legacy Shapes from Model and friends
Showing the changes to libraries/render-utils/src/Model.cpp (1 of 9 files). Show all
Unified · Split
| @@ -23,8 +23,6 @@ · 22 unmodified lines | ||
| 23 | 23 | #include <PathUtils.h> |
| 24 | 24 | #include <PerfStat.h> |
| 25 | 25 | #include "PhysicsEntity.h" |
| 26 | −#include <ShapeCollider.h> | |
| 27 | −#include <SphereShape.h> | |
| 28 | 26 | #include <ViewFrustum.h> |
| 29 | 27 | |
| 30 | 28 | #include "AbstractViewStateInterface.h" |
| @@ -223,10 +221,6 @@ void Model::setScaleInternal(const glm::vec3& scale) { · 192 unmodified lines | ||
| 223 | 221 | if (relativeDeltaScale > ONE_PERCENT || scaleLength < EPSILON) { |
| 224 | 222 | _scale = scale; |
| 225 | 223 | initJointTransforms(); |
| 226 | − if (_shapes.size() > 0) { | |
| 227 | − clearShapes(); | |
| 228 | − buildShapes(); | |
| 229 | − } | |
| 230 | 224 | } |
| 231 | 225 | } |
| 232 | 226 | |
| @@ -1169,15 +1163,6 @@ QStringList Model::getJointNames() const { · 936 unmodified lines | ||
| 1169 | 1163 | return isActive() ? _geometry->getFBXGeometry().getJointNames() : QStringList(); |
| 1170 | 1164 | } |
| 1171 | 1165 | |
| 1172 | −// virtual override from PhysicsEntity | |
| 1173 | −void Model::buildShapes() { | |
| 1174 | − // TODO: figure out how to load/build collision shapes for general models | |
| 1175 | −} | |
| 1176 | − | |
| 1177 | −void Model::updateShapePositions() { | |
| 1178 | − // TODO: implement this when we know how to build shapes for regular Models | |
| 1179 | −} | |
| 1180 | − | |
| 1181 | 1166 | class Blender : public QRunnable { |
| 1182 | 1167 | public: |
| 1183 | 1168 | |
| @@ -1348,8 +1333,6 @@ void Model::simulateInternal(float deltaTime, const glm::vec3& worldPosition, co · 164 unmodified lines | ||
| 1348 | 1333 | glm::mat4 parentTransform = glm::scale(_scale) * glm::translate(_offset) * geometry.offset; |
| 1349 | 1334 | _rig->simulateInternal(deltaTime, parentTransform, worldPosition, worldVelocity, worldRotation); |
| 1350 | 1335 | |
| 1351 | − _shapesAreDirty = !_shapes.isEmpty(); | |
| 1352 | − | |
| 1353 | 1336 | glm::mat4 modelToWorld = glm::mat4_cast(_rotation); |
| 1354 | 1337 | for (int i = 0; i < _meshStates.size(); i++) { |
| 1355 | 1338 | MeshState& state = _meshStates[i]; |
| @@ -1389,7 +1372,6 @@ bool Model::setJointPosition(int jointIndex, const glm::vec3& position, const gl · 33 unmodified lines | ||
| 1389 | 1372 | glm::mat4 parentTransform = glm::scale(_scale) * glm::translate(_offset) * geometry.offset; |
| 1390 | 1373 | if (_rig->setJointPosition(jointIndex, position, rotation, useRotation, |
| 1391 | 1374 | lastFreeIndex, allIntermediatesFree, alignment, priority, freeLineage, parentTransform)) { |
| 1392 | − _shapesAreDirty = !_shapes.isEmpty(); | |
| 1393 | 1375 | return true; |
| 1394 | 1376 | } |
| 1395 | 1377 | return false; |
| @@ -1400,7 +1382,6 @@ void Model::inverseKinematics(int endIndex, glm::vec3 targetPosition, const glm: · 4 unmodified lines | ||
| 1400 | 1382 | const QVector<int>& freeLineage = geometry.joints.at(endIndex).freeLineage; |
| 1401 | 1383 | glm::mat4 parentTransform = glm::scale(_scale) * glm::translate(_offset) * geometry.offset; |
| 1402 | 1384 | _rig->inverseKinematics(endIndex, targetPosition, targetRotation, priority, freeLineage, parentTransform); |
| 1403 | − _shapesAreDirty = !_shapes.isEmpty(); | |
| 1404 | 1385 | } |
| 1405 | 1386 | |
| 1406 | 1387 | bool Model::restoreJointPosition(int jointIndex, float fraction, float priority) { |
| @@ -1415,10 +1396,6 @@ float Model::getLimbLength(int jointIndex) const { · 8 unmodified lines | ||
| 1415 | 1396 | return _rig->getLimbLength(jointIndex, freeLineage, _scale, geometry.joints); |
| 1416 | 1397 | } |
| 1417 | 1398 | |
| 1418 | −void Model::renderJointCollisionShapes(float alpha) { | |
| 1419 | − // implement this when we have shapes for regular models | |
| 1420 | −} | |
| 1421 | − | |
| 1422 | 1399 | bool Model::maybeStartBlender() { |
| 1423 | 1400 | const FBXGeometry& fbxGeometry = _geometry->getFBXGeometry(); |
| 1424 | 1401 | if (fbxGeometry.hasBlendedMeshes()) { |
| @@ -1484,7 +1461,6 @@ void Model::deleteGeometry() { · 59 unmodified lines | ||
| 1484 | 1461 | _blendedVertexBuffers.clear(); |
| 1485 | 1462 | _rig->clearJointStates(); |
| 1486 | 1463 | _meshStates.clear(); |
| 1487 | − clearShapes(); | |
| 1488 | 1464 | |
| 1489 | 1465 | _rig->deleteAnimations(); |
| 1490 | 1466 | |